VM::EC...ervice(3pm)

πŸ“¦
version 1.28 Β· 7 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

🌸 VM::EC2::REST::relational_database_service πŸ’–

okay so bestie, this is part of the VM::EC2 family β€” it's the User Contributed Perl Documentation page for the 3pm manual, and it's literally your backstage pass to the AWS Relational Database Service. pull up a chair, we're doing this together 🫢


✨ NAME ✨

VM::EC2::REST::relational_database_service β€” accessors for the AWS Relational Database Service. that's it, that's the name, no notes πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

use VM::EC2 ':rds';

that's the whole vibe check. import the :rds tag and you're in. periodt ✨


πŸ’– METHODS πŸ’–

These methods give access and control over the AWS Relational Database Service. RDS provides easy access to creating and managing an Oracle or MySQL database in the AWS cloud. lowkey iconic of it, honestly πŸ‘‘

Implemented: AddSourceIdentifierToSubscription, AddTagsToResource, AuthorizeDBSecurityGroupIngress, CopyDBSnapshot, CreateDBInstance, CreateDBInstanceReadReplica, CreateDBParameterGroup, CreateDBSecurityGroup, CreateDBSnapshot, CreateDBSubnetGroup, CreateEventSubscription, CreateOptionGroup, DescribeDBEngineVersions, DescribeDBInstances, DescribeDBParameterGroups, DescribeDBParameters, DescribeDBSecurityGroups, DescribeDBSnapshots, DescribeDBSubnetGroups, DescribeEngineDefaultParameters, DescribeEventCategories, DescribeEventSubscriptions, DescribeEvents, DescribeOptionGroupOptions, DescribeOptionGroups, DescribeOrderableDBInstanceOptions, DescribeReservedDBInstances, DescribeReservedDBInstancesOfferings, DownloadDBLogFilePortion, ListTagsForResource, ModifyDBInstance, ModifyDBParameterGroup, ModifyDBSubnetGroup, ModifyEventSubscription, ModifyOptionGroup, PromoteReadReplica, PurchaseReservedDBInstancesOffering, RebootDBInstance, RemoveSourceIdentifierFromSubscription, RemoveTagsFromResource, ResetDBParameterGroup, RestoreDBInstanceFromDBSnapshot, RestoreDBInstanceToPointInTime, RevokeDBSecurityGroupIngress

look at that list. ate and left no crumbs πŸ”₯

Unimplemented:

  • (none)

not a single gap. we love a fully-fleshed-out queen 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

VM::EC2

the mothership. go say hi πŸ’œ


πŸ’… $ec2->add_source_identifier_to_subscription(%args)

Adds a source identifier to an existing RDS event notification subscription. basically you're introducing a new source to a subscription that already exists β€” very "let me add you to the group chat" energy 🫢

Required arguments:

  • -source_identifier β€” The identifier of the event source to be added.
  • -subscription_name β€” The name of the RDS event notification subscription you want to add a source identifier to.

Returns a VM::EC2::DB::Event::Subscription object. cute little object, love that for us ✨


πŸ’– $ec2->add_tags_to_resource(-resource_name => $name, -tags => \@tags)

Adds metadata tags to an Amazon RDS resource. These tags can also be used with cost allocation reporting to track costs associated with Amazon RDS resources, or used in a Condition statement in an IAM policy for Amazon RDS. yes bestie, tags are how you keep your money and your permissions in check πŸ’Έ

Required arguments:

This method does not return a value but will raise an error if unsuccessful. no return value, just vibes (and possibly a tantrum) 😭


⭐ $sg = $ec2->authorize_db_security_group_ingress(%args)

Enables ingress to a DBSecurityGroup using one of two forms of authorization. First, EC2 or VPC security groups can be added to the DBSecurityGroup if the application using the database is running on EC2 or VPC instances. Second, IP ranges are available if the application accessing your database is running on the Internet. two paths, one destination, main character energy either way πŸ‘‘

Required arguments:

  • -db_security_group_name β€” The name of the DB Security Group to add authorization to.

Optional arguments:

  • -cidrip β€” The IP range to authorize.
  • -ec2_security_group_id β€” ID of the EC2 Security Group to authorize. For VPC DB security groups, EC2SecurityGroupId must be provided.
  • -ec2_security_group_name β€” Name of the EC2 Security Group to authorize.
  • -ec2_security_group_owner_id β€” AWS Account Number of the owner of the EC2 Security Group specified in the -ec2_security_group_name parameter.

Returns a VM::EC2::DB::SecurityGroup object. πŸŽ€


🌸 $snapshot = $ec2->copy_db_snapshot(-source_db_snapshot_identifier => $db_id, -target_db_snapshot_identifier => $snap_id)

Copies the specified DBSnapshot. The source DBSnapshot must be in the "available" state. ngl, if it's not "available" you're not getting anywhere, so check first bestie πŸ™ˆ

Required arguments:

  • -source_db_snapshot_identifier β€” The identifier for the source DB snapshot.

Constraints:

  • Must specify a valid system snapshot in the "available" state
  • If the source snapshot is in the same region as the copy, specify a valid DB snapshot identifier
  • If the source snapshot is in a different region than the copy, specify a valid DB snapshot ARN

For more information, see: http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CopySnapshot.html

  • -target_db_snapshot_identifier β€” The identifier for the copied snapshot.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -source β€” Alias for -source_db_snapshot_identifier
  • -target β€” Alias for -target_db_snapshot_identifier

Optional arguments:

  • -tags β€” hashref or arrayref of hashrefs containing Key/Value pairs

Returns a VM::EC2::DB::Snapshot object. πŸ’œ


πŸ”₯ $instance = $ec2->create_db_instance(%args)

Creates a new DB instance. the birth of a whole database, we're so proud πŸ₯Ή

Required arguments:

  • -allocated_storage β€” MySQL:
    • Must be an integer from 5 to 1024.

Oracle:

  • Must be an integer from 10 to 1024.

SQL Server:

  • Must be an integer from 200 to 1024 (Standard Edition and Enterprise Edition) or from 30 to 1024 (Express Edition and Web Edition)
  • -db_instance_class β€” The compute and memory capacity of the DB Instance.

db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge

  • -db_instance_identifier β€” The DB Instance identifier. This parameter is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server).
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • -engine β€” The name of the database engine to be used for this instance.

Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web

  • -master_user_password β€” The password for the master database user. Can be any printable ASCII character except "/", "\", or "@".

Constraints:

  • MySQL: Must contain from 8 to 41 alphanumeric characters.
  • Oracle: Must contain from 8 to 30 alphanumeric characters.
  • SQL Server: Must contain from 8 to 128 alphanumeric characters.
  • -master_username β€” The name of master user for the client DB Instance.

Constraints:

  • First character must be a letter.
  • Cannot be a reserved word for the chosen database engine.

MySQL:

  • Must be 1 to 16 alphanumeric characters.

Oracle:

  • Must be 1 to 30 alphanumeric characters.

SQL Server:

  • Must be 1 to 128 alphanumeric characters.

Optional arguments:

  • -auto_minor_version_upgrade β€” Indicates that minor engine upgrades will be applied automatically to the DB Instance during the maintenance window. (Boolean). Default: true
  • -availability_zone β€” The EC2 Availability Zone that the database instance will be created in.

Default: A random, system-chosen Availability Zone in the endpoint's region.

  • -backup_retention_period β€” The number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.

Default: 1

Constraints:

  • Must be a value from 0 to 8
  • Cannot be set to 0 if the DB Instance is a master instance with read replicas
  • -character_set_name β€” For supported engines, indicates that the DB Instance should be associated with the specified CharacterSet.
  • -db_name β€” The meaning of this parameter differs according to the database engine you use.

Okay so the database-name argument is giving major "it depends" energy πŸ’… β€” here's the per-engine tea, bestie:

  • MySQL: the name of the database to create when the DB Instance is created. If this parameter is not specified, no database is created in the DB Instance.
    • Constraints:
      • Must contain 1 to 64 alphanumeric characters
      • Cannot be a reserved word
  • Oracle: the Oracle System ID (SID) of the created DB Instance.
    • Constraints:
      • Cannot be longer than 8 characters
  • SQL Server: not applicable. Must be null.

and now back to your regularly scheduled option list, no interruption 🫢

  • -db_parameter_group_name β€” the name of the DB Parameter Group to associate with this DB instance. If this argument is omitted, the default DBParameterGroup for the specified engine will be used.
    • Constraints:
      • Must be 1 to 255 alphanumeric characters
      • First character must be a letter.
      • Cannot end with a hyphen or contain two consecutive hyphens
  • -db_security_groups β€” an arrayref of DB Security Groups to associate with the instance
  • -db_subnet_group_name β€” a DB Subnet Group to associate with this DB Instance. If not specified, then it is a non-VPC DB instance.
  • -engine_version β€” the version number of the database engine to use.
  • -iops β€” the amount of Provisioned IOPS initially allocated. Integer between 100-1000
  • -license_model β€” license model information for this DB Instance.
    • Valid values: license-included | bring-your-own-license | general-public-license
  • -multi_az β€” specifies if the DB Instance is a Multi-AZ deployment. You cannot set the -availability_zone argument if the -multi_az argument is set to true.
  • -option_group_name β€” indicates that the DB Instance should be associated with the specified option group.
  • -port β€” the port number on which the database accepts connections.
    • MySQL:
      • Default: 3306, Valid values: 1150-65535
    • Oracle:
      • Default: 1521, Valid values: 1150-65535
    • Oracle:
      • Default: 1433, Valid values: 1150-65535 except 1434 and 3389.
not me pointing out it says Oracle twice πŸ™ˆ that's just what the page says, i'm literally just the messenger πŸ’€
  • -preferred_backup_window β€” the daily time range during which automated backups are created if automated backups are enabled using the -backup_retention_period argument.
    • Default: Default: A 30-minute window selected at random from an 8-hour block of time per region. The following list shows the time blocks for each region from which the default backup windows are assigned.
      • US-East (Northern Virginia) Region: 03:00-11:00 UTC
      • US-West (N. California, Oregon) Region: 06:00-14:00 UTC
      • EU (Ireland) Region: 22:00-06:00 UTC
      • Asia Pacific (Singapore) Region: 14:00-22:00 UTC
      • Asia Pacific (Tokyo) Region: 17:00-03:00 UTC
    • Constraints:
      • Must be in the format hh24:mi-hh24:mi
      • Times in Universal Time Coordinated (UTC).
      • Must not conflict with the preferred maintenance window.
      • Must be at least 30 minutes.
double "Default:" up there? yeah. she's dramatic. keeping it exactly as written ✨
  • -preferred_maintenance_window β€” the weekly time range (in UTC) during which system maintenance can occur.
    • Format: ddd:hh24:mi-ddd:hh24:mi
    • Default: A 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. The following list shows the time blocks for each region from which the default maintenance windows are assigned.
      • US-East (Northern Virginia) Region: 03:00-11:00 UTC
      • US-West (N. California, Oregon) Region: 06:00-14:00 UTC
      • EU (Ireland) Region: 22:00-06:00 UTC
      • Asia Pacific (Singapore) Region: 14:00-22:00 UTC
      • Asia Pacific (Tokyo) Region: 17:00-03:00 UTC
    • Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun
    • Constraints: Minimum 30-minute window.
  • -publicly_accessible β€” specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.
    • Default: The default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.
      • DefaultVPC:true
      • VPC:false
    • If no DB subnet group has been specified as part of the request and the -publicly_accessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.
  • -tags β€” hashref or arrayref of hashrefs containing Key/Value pairs
  • -vpc_security_group_ids β€” a list of EC2 VPC Security Groups to associate with this DB Instance.

This method returns a VM::EC2::DB:Instance object.

one colon, not two β€” that's literally how it's written, don't @ me πŸ’€

🌈 $instance = $ec2->create_db_instance_read_replica(%args) 🌈

Creates a DB Instance that acts as a Read Replica of a source DB Instance. All Read Replica DB Instances are created as Single-AZ deployments with backups disabled. All other DB Instance attributes (including DB Security Groups and DB Parameter Groups) are inherited from the source DB Instance, except as specified below. IMPORTANT: The source DB Instance must have backup retention enabled.

πŸ’– Required arguments:

  • -db_instance_identifier β€” the DB Instance identifier of the Read Replica. This is the unique key that identifies a DB Instance. This parameter is stored as a lowercase string.
  • -source_db_instance_identifier β€” the identifier of the DB Instance that will act as the source for the Read Replica. Each DB Instance can have up to five Read Replicas. Constraints: Must be the identifier of an existing DB Instance that is not already a Read Replica DB Instance.

πŸ¦‹ Optional arguments:

  • -auto_minor_version_upgrade β€” indicates that minor engine upgrades will be applied automatically to the Read Replica during the maintenance window. (Boolean)
  • -availability_zone β€” the Amazon EC2 Availability Zone that the Read Replica will be created in. Default: A random, system-chosen Availability Zone in the endpoint's region.
  • -db_instance_class β€” the compute and memory capacity of the Read Replica.
    • Valid Values: db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge
  • -iops β€” the amount of Provisioned IOPS to be initially allocated for the DB Instance.
  • -option_group_name β€” the option group the DB instance will be associated with. If omitted, the default Option Group for the engine specified will be used.
  • -port β€” the port number that the DB Instance uses for connections.
    • Default: Inherits from the source instance
    • Valid Values: 1150-65535
  • -publicly_accessible β€” says whether your DB instance is out here being public or staying cozy and private πŸ’…. Set it to true and you get an Internet-facing instance with a publicly resolvable DNS name that resolves to a public IP address. Set it to false and you get an internal instance whose DNS name resolves to a private IP address.

Default: bestie, the default literally depends on whether a VPC got requested or not 😭. Here's the tea for each case:

  • DefaultVPC: true
  • VPC: false

If no DB subnet group has been specified as part of the request and the -publicly_accessible value hasn't been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value hasn't been set, the DB instance will be private. No cap. 🫢

Returns a VM::EC2::DB::Instance object on success.


$group = $ec2->create_db_parameter_group(%args)

Creates a new DB Parameter Group. Iconic behaviour, honestly ✨.

A DB Parameter Group starts life with the default parameters for the database engine used by the DB Instance. If you want custom values for any of those parameters, you have to modify the group after creating it, using modify_db_parameter_group(). Once you've created a DB Parameter Group, you need to associate it with your DB Instance using modify_db_instance(). And heads up 🚨 β€” when you associate a new DB Parameter Group with a running DB Instance, you need to reboot the DB Instance for the new DB Parameter Group and its associated settings to actually take effect. It's giving "restart to apply changes", fr fr.

Required arguments:

  • -db_parameter_group_family β€” the DB Parameter Group Family name. A DB Parameter Group can be associated with one and only one DB Parameter Group Family, and can only be applied to a DB Instance running a database engine and engine version compatible with that DB Parameter Group Family. Monogamous, periodt πŸ’
  • -db_parameter_group_name β€” the name of the DB Parameter Group.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
NOTE: This value is stored as a lower-case string.
  • -description β€” the description for the DB Parameter Group.

Returns a VM::EC2::DB::Parameter::Group object.


$group = $ec2->create_db_security_group(%args)

Creates a new DB Security Group. DB Security Groups control access to a DB Instance if not in a VPC 🌸.

Required arguments:

  • -db_security_group_description β€” the description for the DB Security Group.
  • -db_security_group_name β€” the name for the DB Security Group. This value is stored as a lowercase string.

Constraints: must contain no more than 255 alphanumeric characters or hyphens. Must not be "Default". Like, do not name it Default, bestie, it's literally not allowed πŸ’€

  • -name β€” alias for -db_security_group_name
  • -description β€” alias for -db_security_group_description

Returns a VM::EC2::DB::SecurityGroup object.


$dbsnap = $ec2->create_db_snapshot(-db_instance_identifier => $db_id, -db_snapshot_identifier => $snap_id)

Creates a DB snapshot πŸ“Έ. The source DB instance must be in "available" state β€” if it's not, this isn't happening, sorry babe.

Required arguments:

  • -db_instance_identifier β€” the DB instance identifier. This is the unique key that identifies a DB instance. This parameter is not case sensitive.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -db_snapshot_identifier β€” the identifier for the DB snapshot.

Constraints:

  • Cannot be null, empty, or blank
  • Must contain from 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -db_id β€” alias for -db_instance_identifier
  • -snapshot_id β€” alias for -db_snapshot_identifier

Returns a VM::EC2::DB::Snapshot object on success.


$subnet_group = $ec2->create_db_subnet_group(%args)

Creates a new DB subnet group πŸ¦‹. DB subnet groups must contain at least one subnet in at least two availability zones in the region. Two AZs minimum, that's the rule.

Required arguments:

  • -db_subnet_group_description β€” the description for the DB subnet group.
  • -db_subnet_group_name β€” the name for the DB Subnet Group. This value is stored as a lowercase string.

Constraints:

  • Must contain no more than 255 alphanumeric characters or hyphens.
  • Must not be "Default".
  • -subnet_ids β€” arrayref of subnet IDs for the subnet group.
  • -description β€” alias for -db_subnet_group_description
  • -name β€” alias -db_subnet_group_name

Returns a VM::EC2::DB::Subnet::Group object on success.


$event_sub = $ec2->create_event_subscription(%args)

Creates an RDS event notification subscription πŸ””. This action requires a topic ARN (Amazon Resource Name) created by either the RDS console, the SNS console, or the SNS API. To obtain an ARN with SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console. So like, go make the topic first, then come back. πŸŽ€

You can specify the type of source (SourceType) you want to be notified of, provide a list of RDS sources (SourceIds) that triggers the events, and provide a list of event categories (EventCategories) for events you want to be notified of. For example, you can specify SourceType = db-instance, SourceIds = mydbinstance1, mydbinstance2 and EventCategories = Availability, Backup.

If you specify both the SourceType and SourceIds, such as SourceType = db-instance and SourceIdentifier = myDBInstance1, you will be notified of all the db-instance events for the specified source. If you specify a SourceType but do not specify a SourceIdentifier, you will receive notice of the events for that source type for all your RDS sources. If you do not specify either the SourceType nor the SourceIdentifier, you will be notified of events generated from all RDS sources belonging to your customer account. Basically: the less you specify, the louder it gets. πŸ™ˆ

Required arguments:

  • -sns_topic_arn β€” the Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.
  • -subscription_name β€” the name of the subscription.

Optional arguments:

  • -enabled β€” boolean; set to true to activate the subscription, set to false to create the subscription but not active it. (Their words, not mine πŸ’€)
  • -event_categories β€” an arrayref of event categories for a -source_type that you want to subscribe to. You can see a list of the categories for a given -source_type in the Events topic in the Amazon RDS User Guide or by using the describe_event_categories() call.
  • -source_ids β€” an arrayref of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it cannot end with a hyphen or contain two consecutive hyphens.
  • -source_type β€” the type of source that will be generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. If this value is not specified, all events are returned.

Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot

  • -name β€” alias for -subscription_name

Returns a VM::EC2::DB::Event::Subscription object on success.


$option_grp = $ec2->create_option_group(%args)

Creates a new Option Group πŸ‘‘. You can create up to 20 option groups. Twenty. That's the cap, bestie.

Required arguments:

  • -engine_name β€” specifies the name of the engine that this option group should be associated with.
  • -major_engine_version β€” specifies the major version of the engine that this option group should be associated with.
  • -option_group_description β€” the description of the option group.
  • -option_group_name β€” specifies the name of the option group to be created.

Constraints:

  • Must be 1 to 255 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -name β€” alias for -option_group_name
  • -description β€” alias for -option_group_description
returns a VM::EC2::DB::Option::Group object when it works out πŸ’–

🌸 @versions = $ec2->describe_db_engine_versions(%args)

every single argument here is optional, bestie β€” go off, pass none of them

  • -db_parameter_group_family β€” the specific DB Parameter Group family you want details for
  • -family β€” alias for -db_parameter_group_family (same thing, different name, we love a nickname moment)
  • -default_only β€” return only the default version of the specified engine, or of the engine + major version combo you asked for. this one's a boolean, so it's a yes/no vibe πŸŽ€
  • -engine β€” the database engine to return
  • -engine_version β€” the database engine version to return
  • -list_supported_character_sets β€” list supported charsets (boolean, so true/false energy)
  • -marker β€” an optional pagination token handed to you by a previous request. if you pass it, the response only includes records after that marker, up to whatever -max_records says
  • -max_records β€” the max number of records to include in the response. if more records exist than the max, a marker token shows up in the response so you can keep scrolling
  • gives you back an array of VM::EC2::DB::Engine::Version objects.

πŸ¦‹ @db_instances = $ec2->describe_db_instances(-db_instance_identifier => $id, -marker => $marker, -max_records => $integer)

again β€” all args optional, no pressure

  • -db_instance_identifier β€” the user-supplied instance identifier. if you pass this, you only get info for that specific DB Instance, nothing else
  • -marker β€” optional pagination token from a previous request. pass it and you only get records after the marker, up to what -max_records allows
  • -max_records β€” max number of records in the response. too many records? boom, marker token in the response
  • -db_instance_id β€” alias for -db_instance_identifier

returns an array of VM::EC2::DB::Instance objects, if any exist.


πŸ’œ @groups = $ec2->describe_db_parameter_groups(-db_parameter_group_name => $name, -marker => $marker, -max_records => $integer)

all args optional, as always

  • -db_parameter_group_name β€” the name of the DB parameter group you wanna describe
  • -marker β€” optional pagination token from a previous request. specify it and the response only includes records after the marker, up to the -max_records limit
  • -max_records β€” max number of records to include. more than the max? marker token gets added to the response
  • -group_name β€” alias for -db_subnet_group_name
ngl, that alias line is exactly what the original says β€” -group_name is documented as an alias for -db_subnet_group_name right here. copying it verbatim, no notes πŸ’…

returns an array of VM::EC2::DB::Parameter::Group objects if any exist.


πŸŽ€ @params = $ec2->describe_db_parameters(-db_parameter_group_name => $name, -source => $source, -marker => $marker, -max_records => $integer)

required arguments:

  • -db_parameter_group_name β€” the name of the DB parameter group. this one is mandatory, no skipping

optional arguments:

  • -source β€” the parameter types to return. valid values: user | system | engine-default. default is all parameter types
  • -marker β€” optional pagination token from a previous request. if specified, the response includes only records after the marker, up to the value specified by -max_records
  • -max_records β€” the maximum number of records to include in the response. if more records than the max exist, a marker token is included in the response

returns an array of VM::EC2::DB::Parameter objects.


✨ @groups = $ec2->describe_db_security_groups(-db_security_group_name => $name, -marker => $marker, -max_records => $integer)

all args optional

  • -db_security_group_name β€” the name of the DB security group
  • -marker β€” optional pagination token from a previous request. if specified, the response includes only records after the marker, up to the value specified by -max_records
  • -max_records β€” the maximum number of records to include in the response. if more records than the max exist, a marker token is included in the response
  • -group_name β€” alias for -db_security_group_name

returns an array of VM::EC2::DB::SecurityGroup objects if any exist.


🌈 @snapshots = $ec2->describe_db_snapshots(%args)

all args optional, you already know the vibe

  • -db_instance_identifier β€” a DB Instance Identifier to retrieve the list of DB snapshots for. cannot be used in conjunction with -db_snapshot_identifier. this parameter is not case sensitive
  • -db_snapshot_identifier β€” a specific DB Snapshot Identifier to describe. cannot be used in conjunction with . this value is stored as a lowercase string
  • -marker β€” an optional pagination token provided by a previous request. if specified, the response includes only records after the marker, up to the value specified by -max_records
  • -max_records β€” the maximum number of records to include in the response. if more records than the max exist, a marker token is included in the response
  • -snapshot_type β€” an optional snapshot type for which snapshots will be returned. if not specified, the returned results include snapshots of all types
  • -db_instance_id β€” alias for -db_instance_identifier
  • -db_snapshot_id β€” alias for -db_snapshot_identifier
yes, "cannot be used in conjunction with ." β€” that trailing bit is empty in the original too. i'm not filling it in, i'm not guessing, i'm just holding it up like 🫢

returns an array of VM::EC2:DB::Snapshot objects if any exist.

and yeah, that's VM::EC2:DB::Snapshot with one colon in the original β€” keeping it exactly as written, no cap πŸ’€

🧚 @groups = $ec2->describe_db_subnet_groups(-db_subnet_group_name => $name, -marker => $marker, -max_records => $integer)

all args optional

  • -db_subnet_group_name β€” the name of the DB Subnet Group to describe
  • -marker β€” an optional pagination token provided by a previous request. if specified, the response includes only records after the marker, up to the value specified by -max_records
  • -max_records β€” the maximum number of records to include in the response. if more records than the max exist, a marker token is included in the response
  • -group_name β€” alias for -db_subnet_group_name

returns an array of VM::EC2::DB::Subnet::Group objects if any exist.


🌸 @params = $ec2->describe_engine_default_parameters(%args)

required arguments:

  • -db_parameter_group_family β€” the name of the DB Parameter Group Family
  • -family β€” alias for -db_parameter_group_family

returns an array of VM::EC2::DB::Parameter objects.


πŸ’… @categories = $ec2->describe_event_categories(-source_type => $type)

optional argument:

  • -source_type β€” the type of source that will be generating the events. valid values: db-instance | db-parameter-group | db-security-group | db-snapshot

returns an array of VM::EC2::DB::Event::Category objects.


πŸ¦‹ @subs = $ec2->describe_event_subscriptions(-subscription_name => $name)

optional argument:

  • -subscription_name β€” the name of the RDS event notification subscription

returns an array of VM::EC2::DB::Event::Subscription objects.


πŸ”₯ @events = $ec2->describe_events(%args)

all arguments are optional but some conditions apply β€” so like, optional with ✨terms and conditions✨

  • -duration β€” the number of minutes to retrieve events for
  • -end_time β€” the end of the time interval for which to retrieve events, specified in ISO 8601 format. for more info on ISO 8601, visit: http://en.wikipedia.org/wiki/ISO_8601
  • -event_categories β€” a string or arrayref of event categories that trigger notifications for an event notification subscription
  • -source_identifier β€” the identifier of the event source for which events will be returned. if not specified, then all sources are included in the response
  • -source_type β€” the event source to retrieve events for. if no value is specified, all events are returned. REQUIRED if -source_identifier is provided.

if 'DBInstance', then a DBInstanceIdentifier must be supplied in -source_identifier.

if 'DBSecurityGroup', a DBSecurityGroupName must be supplied in -source_identifier.

if 'DBParameterGroup', a DBParameterGroupName must be supplied in -source_identifier.

if 'DBSnapshot', a DBSnapshotIdentifier must be supplied in -source_identifier.

returns an array of VM::EC2::DB::Event objects.


⭐ @options = $ec2->describe_option_group_options(-engine_name => $name, -major_engine_version => $version)

describes all available options for a particular database engine ✨

required arguments:

  • -engine_name β€” database engine to describe options for

optional arguments:

  • -major_engine_version β€” if specified, filters the results to include only options for the specified major engine version

returns an array of VM::EC2::DB::Option::Group::Option objects.

  • @groups = $ec2->describe_option_groups(-engine_name => $name, -major_engine_version => $version, -option_group_name => $og_name) β€” bestie, this one ✨describes the available option groups✨. Every single argument is optional, she's flexible like that πŸ’…
    • -engine_name β€” the database engine you wanna describe options for.
    • -major_engine_version β€” if you drop this in, results get filtered to only include options for that specific major engine version.
    • -option_group_name β€” the name of the option group to describe. 🚨 Cannot be supplied together with -engine_name or -major_engine_version. Pick a lane, queen.

Returns an array of VM::EC2::DB::Option::Group objects. πŸŽ€


  • @options = $ec2->describe_orderable_db_instance_options(%args) β€” describe all the different RDS instances that can be launched. Window shopping, but for databases πŸ›οΈ

Required arguments:

  • -engine β€” the name of the engine to retrieve DB Instance options for. Non-negotiable, she's required fr fr.

Optional arguments:

  • -db_instance_class β€” the DB Instance class (size) filter value.
  • -engine_version β€” the engine version filter value.
  • -license_model β€” the license model filter value.
  • -vpc β€” the VPC filter value. (boolean)

Returns an array of VM::EC2::DB::Instance::OrderableOption objects. 🌸


  • @instances = $ec2->describe_reserved_db_instances(%args) β€” hands you info about reserved DB Instances for the account, or about one specific reserved DB Instance. All arguments optional, all of them:
    • -db_instance_class β€” the DB Instance class (size) filter.
    • -duration β€” the duration filter value, specified in years or seconds. Valid values: 1 | 3 | 31536000 | 94608000
    • -multi_az β€” the Multi-AZ filter value. (boolean)
    • -offering_type β€” the offering type filter value. Valid Values: "Light Utilization" | "Medium Utilization" | "Heavy Utilization"
    • -product_description β€” the product description filter value.
    • -reserved_db_instance_id β€” the reserved DB Instance identifier filter value.
    • -reserved_db_instances_offering_id β€” the offering identifier filter value.

Returns an array of VM::EC2::DB::Reserved::Instance objects. πŸ’œ


  • @offerings = $ec2->describe_reserved_db_instances_offerings(%args) β€” lists the available reserved DB Instance offerings. Yes it's a whole separate method, no they are not the same thing, iykyk 😌

All arguments are optional:

  • -db_instance_class β€” the DB Instance class (size) filter.
  • -duration β€” the duration filter value, specified in years or seconds. Valid values: 1 | 3 | 31536000 | 94608000
  • -multi_az β€” the Multi-AZ filter value. (boolean)
  • -offering_type β€” the offering type filter value. Valid Values: "Light Utilization" | "Medium Utilization" | "Heavy Utilization"
  • -product_description β€” the product description filter value.
  • -reserved_db_instance_id β€” the reserved DB Instance identifier filter value.
  • -reserved_db_instances_offering_id β€” the offering identifier filter value.

Returns an array of VM::EC2::DB::Reserved::Instance objects. πŸ¦‹


  • $log = $ec2->download_db_log_file_portion(%args) β€” downloads the last line of the specified log file. Just the last line, she's not giving you the whole thing, that's what the marker is for πŸ‘‘

All arguments are optional:

  • -db_instance_identifier β€” the DB Instance class (size) filter.
  • -log_file_name β€” the name of the log file to be downloaded.
  • -marker β€” the pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.
  • -number_of_lines β€” the number of lines remaining to be downloaded.

Returns a VM::EC2::DB::LogFilePortion object. πŸ“


  • %tags = $ec2->list_tags_for_resource(-resource_name => $name) β€” lists all tags on a DB Instance or Snapshot. Tag check complete βœ…

Arguments:

  • -resource_name β€” the name of the resource to list tags for.

Returns a hash or hashref of tags. 🌈


  • $db_instance = $ec2->modify_db_instance(%args) β€” modify settings for a DB Instance. You can change one or more database configuration parameters by specifying these parameters and the new values in the request. Glow-up time, but for your RDS πŸ”₯

Required arguments:

  • -db_instance_identifier β€” the DB Instance identifier.

Optional arguments:

  • -allocated_storage β€” the new storage capacity of the RDS instance. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the -apply_immediately parameter is set to true for this request.

MySQL:

  • Must be an integer from 5 to 1024.
  • Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.

Oracle:

  • Must be an integer from 10 to 1024.
  • Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.

SQL Server:

  • CANNOT BE MODIFIED πŸ’€
  • -allow_major_version_upgrade β€” indicates that major version upgrades are allowed. Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible.

Constraints: this parameter must be set to true when specifying a value for the -engine_version argument that is a different major version than the DB Instance's current version.

  • -apply_immediately β€” specifies whether or not the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the -preferred_maintenance_window setting for the DB Instance.

If this parameter is passed as false, changes to the DB Instance are applied on the next reboot_db_instance() call, the next maintenance reboot, or the next failure reboot, whichever occurs first. See each parameter to determine when a change is applied. Default is false.

  • -auto_minor_version_upgrade β€” indicates that minor engine upgrades will be applied automatically to the DB Instance during the maintenance window. Changing this parameter does not result in an outage except in the following case and the change is asynchronously applied as soon as possible. An outage will result if this parameter is set to true during the maintenance window, and a newer minor version is available, and RDS has enabled auto patching for that engine version. (Boolean) πŸ™ˆ
  • -backup_retention_period β€” the number of days for which automated backups are retained. Setting this parameter to a positive number enables backups. Setting this parameter to 0 disables automated backups.

Default: Existing setting

Constraints:

  • Must be a value from 0 to 8
  • Cannot be set to 0 if the DB Instance is a master instance with read replicas
  • -db_instance_class β€” the new compute and memory capacity of the DB Instance. To determine the available classes, use the describe_orderable_db_instance_options() call.

Passing a value for this parameter causes an outage during the change and is applied during the next maintenance window, unless the -apply_immediately argument is specified as true for this request.

Valid values:

db.t1.micro | db.m1.small | db.m1.medium | db.m1.large |
db.m1.xlarge | db.m2.xlarge |db.m2.2xlarge | db.m2.4xlarge
  • -db_parameter_group_name β€” the name of the DB Parameter Group to apply to this DB Instance. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the -apply_immediately argument is set to true for this request.

Default: Existing setting.

Constraints:

  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -db_security_groups β€” an arrayref of DB Security Groups to authorize on this DB Instance. Changing this parameter does not result in an outage and the change is applied asynchronously as soon as possible. πŸ’…
  • -engine_version β€” the version number of the database engine you wanna upgrade to. Changing this parameter DOES result in an outage 😭 and the change lands during the next maintenance window unless the -apply_immediately parameter is set to true for this request.

For major version upgrades: if a nondefault DB Parameter Group is currently in use, a new DB Parameter Group in the DB Parameter Group Family for the new engine version must be specified. The new DB Parameter Group can be the default for that DB Parameter Group Family.

  • -iops β€” the new Provisioned IOPS (I/O operations per second) value for the RDS instance. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the -apply_immediately argument is set to true for this request.

Default: existing setting.

Constraints:

  • Value supplied must be at least 10% greater than the current value. Values that are not at least 10% greater than the existing value are rounded up so that they are 10% greater than the current value.
  • -master_user_password β€” the new password for the master database user. Can be any printable ASCII character except "/", "\", or "@". 🚫

Changing this parameter does not result in an outage and the change is asynchronously applied as soon as possible. Between the time of the request and the completion of the request, the MasterUserPassword element exists in the PendingModifiedValues element of the operation response. πŸ‘€

Constraints:

  • MySQL: must contain from 8 to 41 alphanumeric characters.
  • Oracle: must contain from 8 to 30 alphanumeric characters.
  • SQL Server: must contain from 8 to 128 alphanumeric characters.
  • -multi_az β€” specifies if the DB Instance is a Multi-AZ deployment. Changing this parameter does not result in an outage and the change is applied during the next maintenance window unless the -apply_immediately argument is set to true for this request. (Boolean 🫢)

Constraints:

  • Cannot be specified if the DB Instance is a read replica.
  • -new_db_instance_identifier β€” the new DB Instance identifier for the DB Instance when renaming a DB Instance. This value is stored as a lowercase string.

Constraints:

  • Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server).
  • First character must be a letter.
  • Cannot end with a hyphen or contain two consecutive hyphens.
  • -option_group_name β€” indicates that the DB Instance should be associated with the specified option group. Changing this parameter does not result in an outage except in the following case, and the change is applied during the next maintenance window unless the -apply_immediately argument is set to true for this request. If the parameter change results in an option group that enables OEM, this change can cause a brief (sub-second) period during which new connections are rejected but existing connections are not interrupted. πŸ’€

Note that persistent options, such as the TDE_SQLServer option for Microsoft SQL Server, cannot be removed from an option group while DB instances are associated with the option group. Permanent options, such as the TDE option for Oracle Advanced Security TDE, cannot be removed from an option group, and that option group cannot be removed from a DB instance once it is associated with a DB instance. πŸ”’

  • -preferred_backup_window β€” the daily time range during which automated backups are created if automated backups are enabled using the -backup_retention_period argument.

Default: a 30-minute window selected at random from an 8-hour block of time per region. The following list shows the time blocks for each region from which the default backup windows are assigned.

  • US-East (Northern Virginia) Region: 03:00-11:00 UTC
  • US-West (N. California, Oregon) Region: 06:00-14:00 UTC
  • EU (Ireland) Region: 22:00-06:00 UTC
  • Asia Pacific (Singapore) Region: 14:00-22:00 UTC
  • Asia Pacific (Tokyo) Region: 17:00-03:00 UTC

Constraints:

  • Must be in the format hh24:mi-hh24:mi
  • Times in Universal Time Coordinated (UTC).
  • Must not conflict with the preferred maintenance window.
  • Must be at least 30 minutes.
  • -preferred_maintenance_window β€” the weekly time range (in UTC) during which system maintenance can occur. πŸ› οΈ

Format: ddd:hh24:mi-ddd:hh24:mi

Default: a 30-minute window selected at random from an 8-hour block of time per region, occurring on a random day of the week. The following list shows the time blocks for each region from which the default maintenance windows are assigned.

  • US-East (Northern Virginia) Region: 03:00-11:00 UTC
  • US-West (N. California, Oregon) Region: 06:00-14:00 UTC
  • EU (Ireland) Region: 22:00-06:00 UTC
  • Asia Pacific (Singapore) Region: 14:00-22:00 UTC
  • Asia Pacific (Tokyo) Region: 17:00-03:00 UTC

Valid Days: Mon, Tue, Wed, Thu, Fri, Sat, Sun Constraints: minimum 30-minute window.

  • -vpc_security_group_ids β€” a list of EC2 VPC Security Groups to associate with this DB Instance. This change is asynchronously applied as soon as possible. ✨

This method returns a VM::EC2::DB:Instance object. πŸŽ€


$group_name = $ec2->modify_db_parameter_group(-db_parameter_group_name => $group, -parameters => \@parms)

Modifies the parameters of a DB Parameter Group. 🧚

Note: the immediate method can be used only for dynamic parameters; the pending-reboot method can be used with MySQL and Oracle DB Instances for either dynamic or static parameters. For Microsoft SQL Server DB Instances, the pending-reboot method can be used only for static parameters.

Required arguments: πŸ’–

  • -db_parameter_group_name β€” the name of the DB Parameter Group.

Constraints:

  • Must be the name of an existing DB Parameter Group
  • Must be 1 to 255 alphanumeric characters
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens
  • -parameters β€” an arrayref of hashes containing parameter names, values, and the apply method for the parameter update. At least one parameter name, value, and apply method must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. πŸ”₯

The hash keys must be: ParameterName, ParameterValue, ApplyMethod

ie:

[ { ParameterName => 'db_block_checking',
    ParameterValue => 'FULL',
    ApplyMethod => 'immediate' } ]
  • -name β€” alias for -db_parameter_group_name πŸ’…

Returns the DB Parameter Group name on success. βœ…


$subnet_group = $ec2->modify_db_subnet_group(%args)

Modifies an existing DB subnet group. DB subnet groups must contain at least one subnet in at least two AZs in the region. 🌈

Required arguments:

  • -db_subnet_group_name β€” the name for the DB Subnet Group πŸ’–
  • -subnet_ids β€” an arrayref of EC2 Subnet IDs for the DB Subnet Group ✨

Optional arguments:

  • -db_subnet_group_description β€” the description for the DB Subnet Group 🌸

Returns a VM::EC2::DB::Subnet::Group object on success. slay.


πŸ’« $event_sub = $ec2->modify_event_subscription(%args)

Bestie, this one tweaks an existing RDS event notification subscription. Heads up tho β€” you literally cannot change the source identifiers with this call. Nope. To change source identifiers for a subscription you have to go through add_source_identifier_to_subscription() and remove_source_identifier_from_subscription() instead. iykyk. πŸ’…

Required arguments:

  • -subscription_name β€” the name of the RDS event notification subscription.

Optional arguments:

  • -enabled β€” boolean value; set to true to activate the subscription βœ…
  • -event_categories β€” an arrayref of event categories for a -source_type to subscribe to. A list of the categories for a given -source_type can be seen in the Events topic in the Amazon RDS User Guide, or by using the describe_event_categories() call. πŸ“‹
  • -sns_topic_arn β€” the Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when a topic is created and subscribed to.
  • -source_type β€” the type of source that will be generating the events. For example, to be notified of events generated by a DB instance, set this parameter to db-instance. if this value is not specified, all events are returned.

Valid values: db-instance | db-parameter-group | db-security-group | db-snapshot

Returns a VM::EC2::DB::Event::Subscription object on success. πŸŽ€


πŸ”§ $option_group = $ec2->modify_option_group(%args)

Modifies an existing Option Group. Glow-up time for your option group ✨

Required arguments:

  • -option_group_name β€” the name of the option group to be modified.

Optional arguments:

  • -apply_immediately β€” indicates whether the changes should be applied immediately, or during the next maintenance window for each instance associated with the Option Group. (Boolean) ⏰
  • -options_to_include β€” an arrayref of hashes containing OptionName and other available options.

Available options are: DBSecurityGroupMemberships, OptionName, OptionSettings, Port, VpcSecurityGroupMemberships

OptionName and Port must be provided as scalars. DBSecurityGroupMemberships, VpcSecurityGroupMemberships must be provided as arrayrefs. OptionSettings must be a hashref of Name => Value pairs.

ie:

[ { OptionName => 'OEM',
    DBSecurityGroupMemberships => [ 'mygroup' ],
    Port => 1158 },
  { OptionName => 'NATIVE_NETWORK_ENCRYPTION',
    OptionSettings => {
        'SQLNET.ENCRYPTION_SERVER' => 'REQUIRED',
        'SQLNET.CRYPTO_CHECKSUM_SERVER' => 'REQUIRED' } } ]
  • -options_to_remove β€” a string or arrayref containing the option(s) to remove.

ie:

[ 'OEM', 'NATIVE_NETWORK_ENCRYPTION' ]

or

'OEM'

Returns a VM::EC2::DB::Option::Group object on success. πŸ’œ


πŸ‘‘ $db_instance = $ec2->promote_read_replica(%args)

Promotes a Read Replica DB Instance to a standalone DB Instance. main character energy fr fr β€” your replica graduates πŸŽ“βœ¨

Required arguments:

  • -db_instance_identifier β€” the DB Instance identifier. This value is stored as a lowercase string.

Constraints:

  • Must be the identifier for an existing Read Replica DB Instance
  • Must contain from 1 to 63 alphanumeric characters or hyphens
  • First character must be a letter
  • Cannot end with a hyphen or contain two consecutive hyphens

Optional arguments:

  • -backup_retention_period β€” the daily time range during which automated backups are created if automated backups are enabled.
  • -preferred_backup_window β€” the daily time range during which automated backups are created if automated backups are enabled using the -backup_retention_period argument.

Default: Default: A 30-minute window selected at random from an 8-hour block of time per region. The following list shows the time blocks for each region from which the default backup windows are assigned.

  • US-East (Northern Virginia) Region: 03:00-11:00 UTC
  • US-West (N. California, Oregon) Region: 06:00-14:00 UTC
  • EU (Ireland) Region: 22:00-06:00 UTC
  • Asia Pacific (Singapore) Region: 14:00-22:00 UTC
  • Asia Pacific (Tokyo) Region: 17:00-03:00 UTC

Constraints:

  • Must be in the format hh24:mi-hh24:mi
  • Times in Universal Time Coordinated (UTC).
  • Must not conflict with the preferred maintenance window.
  • Must be at least 30 minutes.

Returns a VM::EC2::DB::Instance object on success. πŸ¦‹


πŸ’Έ $reserved_db = $ec2->purchase_reserved_db_instances_offering(%args)

Purchases a reserved DB Instance offering. Treat yourself, bestie πŸ›οΈ

Required arguments:

  • -reserved_db_instances_offering_id β€” the ID of the Reserved DB Instance offering to purchase. ie: 438012d3-4052-4cc7-b2e3-8d3372e0e706

Optional arguments:

  • -db_instance_count β€” the number of instances to reserve. Default: 1
  • -reserved_db_instance_id β€” customer-specified identifier to track this reservation. ie: myreservationID

Returns a VM::EC2::DB::Reserved::Instance object on success. πŸ’–


πŸ”„ $db_instance = $ec2->reboot_db_instance(-db_instance_identifier => $id, -force_failover => $boolean)

Reboots a previously provisioned RDS instance. This API results in the application of modified DBParameterGroup parameters with ApplyStatus of pending-reboot to the RDS instance. This action is taken as soon as possible, and results in a momentary outage to the RDS instance during which the RDS instance status is set to rebooting. 😭 If the RDS instance is configured for MultiAZ, it is possible that the reboot will be conducted through a failover. A DBInstance event is created when the reboot is completed.

Required arguments:

  • -db_instance_identifier β€” the DB Instance identifier.

Optional arguments:

  • -force_failover β€” when true, the reboot will be conducted through a MultiAZ failover.

Constraints:

  • You cannot specify true if the instance is not configured for MultiAZ.

Returns a VM::EC2::DB::Instance object on success. 🌈


🚫 $event_sub = $ec2->remove_source_identifier_from_subscription(-source_identifier => $id, -subscription_name => $name)

Removes a source identifier from an existing RDS event notification subscription. Not me removing things I shouldn't have added πŸ™ˆ

Required arguments:

  • -source_identifier β€” the source identifier to be removed from the subscription, such as the DB instance identifier for a DB instance or the name of a security group.
  • -subscription_name β€” the name of the RDS event notification subscription to remove a source identifier from.

Returns a VM::EC2::DB::Event::Subscription object on success. ✨


🏷️ $ec2->remove_tags_from_resource(-resource_name => $name, -tags => \@tags)

Remove metadata tags from a resource. Marie Kondo that metadata 🧹

Required arguments:

This method does not return a value but will raise an error if unsuccessful. πŸ’€

🧼 $name = $ec2->reset_db_parameter_group(%args)

Modifies the parameters of a DB parameter group to the engine/system default value. To reset specific parameters, submit a hashref of the following: ParameterName and ApplyMethod. To reset the entire DB parameter group, set the -reset_all_parameters argument to true. When resetting the entire group, dynamic parameters are updated immediately and static parameters are set to pending-reboot to take effect on the next DB instance restart or after issuing a reboot_db_instance(). πŸŽ€

Required arguments:

  • -db_parameter_group_name β€” the name of the DB Parameter Group. Constraints, bestie, and they are strict:
    • Must be the name of an existing DB Parameter Group
    • Must be 1 to 255 alphanumeric characters
    • First character must be a letter
    • Cannot end with a hyphen or contain two consecutive hyphens

πŸŽ€ Conditional arguments πŸŽ€

  • -parameters β€” an arrayref of hashes holding parameter names and the apply method for the parameter update.

The hash keys must be: ParameterName and ApplyMethod. Like, literally, ie:

   [ { ParameterName => 'max_user_connections',
       ApplyMethod => 'pending-reboot' },
     { ParameterName => 'max_allowed_packet',
       ApplyMethod => 'immediate' } ]
  • -reset_all_parameters β€” reset all parameters in the DB parameter group back to their default values. Boolean, default is true. ✨

Returns the name of the DB parameter group. πŸ’…


🌸 $db_instance = $ec2->restore_db_instance_from_db_snapshot(%args)

Makes a whole new DB instance out of a DB snapshot. The target database gets built from the source database restore point with the same configuration as the original source database β€” with one lil plot twist: the new RDS instance is created in the default security group. That's just how it is, no cap. πŸ™ˆ

Required arguments:

  • -db_instance_identifier β€” the DB Instance identifier. Constraints:
    • Must contain from 1 to 63 alphanumeric characters or hyphens (1 to 15 for SQL Server).
    • First character must be a letter.
    • Cannot end with a hyphen or contain two consecutive hyphens.
  • -db_snapshot_identifier β€” the identifier for the DB snapshot. Constraints:
    • Must contain 1 to 255 alphanumeric characters or hyphens
    • First character must be a letter
    • Cannot end with a hyphen or contain two consecutive hyphens

Optional arguments:

  • -auto_minor_version_upgrade β€” says minor engine upgrades will be applied automatically to the DB Instance during the maintenance window. (Boolean). Default: true
  • -availability_zone β€” the EC2 Availability Zone the database instance will be created in.
    • Default: a random, system-chosen Availability Zone in the endpoint's region.
    • Constraint: cannot specify if -multi_az is true
  • -db_instance_class β€” the compute and memory capacity of the DB Instance. Your options are: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge
  • -db_name β€” the database name for the restored DB instance. NOTE: does not apply to MySQL engine. πŸ’€
  • -db_subnet_group_name β€” a DB Subnet Group to associate with this DB Instance. If not specified, then it is a non-VPC DB instance.
  • -engine β€” the name of the database engine to be used for this instance. Default is that of source. Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web
  • -iops β€” the amount of Provisioned IOPS initially allocated. Must be an integer greater than 1000.
  • -license_model β€” license model information for this DB Instance. Valid values: license-included | bring-your-own-license | general-public-license
  • -multi_az β€” specifies if the DB Instance is a Multi-AZ deployment. You cannot set the -availability_zone argument if the -multi_az argument is set to true.
  • -option_group_name β€” indicates that the DB Instance should be associated with the specified option group.
  • -port β€” the port number on which the database accepts connections.
    • MySQL:
      • Default: 3306, Valid values: 1150-65535
    • Oracle:
      • Default: 1521, Valid values: 1150-65535
    • Oracle:
      • Default: 1433, Valid values: 1150-65535 except 1434 and 3389.
  • -publicly_accessible β€” specifies the accessibility options for the DB instance. A value of true specifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false specifies an internal instance with a DNS name that resolves to a private IP address.

Default: the default behavior varies depending on whether a VPC has been requested or not. The following list shows the default behavior in each case.

  • DefaultVPC: true
  • VPC: false

If no DB subnet group has been specified as part of the request and the -publicly_accessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private.

  • -tags β€” hashref or arrayref of hashrefs containing Key/Value pairs 🏷️

πŸ¦‹ $db_instance = $ec2->restore_db_instance_to_point_in_time(%args)

Restores a DB instance to an arbitrary point-in-time. You can restore to any point in time before the latestRestorableTime for up to backupRetentionPeriod days. The target database is created from the source database with the same configuration as the original database β€” except the DB instance is created with the default DB security group. 🫢

Required arguments:

  • -source_db_instance_identifier β€” the identifier of the source DB instance from which to restore. Constraints: must be the identifier of an existing DB Instance.
  • -target_db_instance_identifier β€” the name of the new database instance to be created. Constraints:
    • Must contain from 1 to 63 alphanumeric characters or hyphens
    • First character must be a letter
    • Cannot end with a hyphen or contain two consecutive hyphens

Optional arguments:

  • -auto_minor_version_upgrade β€” says minor engine upgrades will be applied automatically to the DB Instance during the maintenance window. (Boolean). Default: true
  • -availability_zone β€” the EC2 Availability Zone the database instance will be created in.
    • Default: a random, system-chosen Availability Zone in the endpoint's region.
    • Constraint: cannot specify if -multi_az is true
  • -db_instance_class β€” the compute and memory capacity of the DB Instance. Your options are: db.t1.micro | db.m1.small | db.m1.medium | db.m1.large | db.m1.xlarge | db.m2.xlarge | db.m2.2xlarge | db.m2.4xlarge
  • -db_name β€” the database name for the restored DB instance. NOTE: does not apply to MySQL engine. πŸ’€
  • -db_subnet_group_name β€” a DB Subnet Group to associate with this DB Instance. If not specified, then it is a non-VPC DB instance.
  • -engine β€” the name of the database engine to be used for this instance. Default is that of source. Valid values: MySQL | oracle-se1 | oracle-se | oracle-ee | sqlserver-ee | sqlserver-se | sqlserver-ex | sqlserver-web
  • -iops β€” the amount of Provisioned IOPS initially allocated. Must be an integer greater than 1000.
  • -license_model β€” license model information for this DB Instance. Valid values: license-included | bring-your-own-license | general-public-license
  • -multi_az β€” specifies if the DB Instance is a Multi-AZ deployment. You cannot set the -availability_zone argument if the -multi_az argument is set to true.
  • -option_group_name β€” indicates that the DB Instance should be associated with the specified option group.
  • -port β€” the port number on which the database accepts connections.
    • MySQL:
      • Default: 3306, Valid values: 1150-65535
    • Oracle:
      • Default: 1521, Valid values: 1150-65535
    • Oracle:
      • Default: 1433, Valid values: 1150-65535 except 1434 and 3389.

yes bestie they really did list Oracle twice, I'm just the messenger πŸ’…

  • -publicly_accessible β€” sets the accessibility vibe for the DB instance. A value of true means an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value of false means an internal instance with a DNS name that resolves to a private IP address.

Default: the default behavior varies depending on whether a VPC has been requested or not. Here's the tea for each case:

  • DefaultVPC: true
  • VPC: false

If no DB subnet group has been specified as part of the request and the -publicly_accessible value has not been set, the DB instance will be publicly accessible. If a specific DB subnet group has been specified as part of the request and the PubliclyAccessible value has not been set, the DB instance will be private. so like, it's giving "decide for me" energy but the decision is real 🌸

  • -restore_time β€” the date and time to restore from.

Valid Values: value must be a UTC time

Constraints:

  • Must be prior the latest restorable time for the DB instance
  • Cannot be specified if -use_latest_restorable_time parameter is true

Example: 2009-09-07T23:45:00Z

  • -tags β€” hashref or arrayref of hashrefs containing Key/Value pairs πŸŽ€
  • -use_latest_restorable_time β€” specifies if the DB instance is restored from the latest backup time.

Boolean, default is false.

Constraints: cannot be specified if -restore_time parameter is provided.


πŸ’… $sg = $ec2->revoke_db_security_group_ingress(%args)

Revokes ingress from a DBSecurityGroup for previously authorized IP ranges or EC2 or VPC Security Groups. we are taking the access AWAY, bestie, no take-backsies

Required arguments:

  • -db_security_group_name β€” the name of the DB Security Group to revoke authorization from.

Optional arguments:

  • -cidrip β€” the IP range to revoke. Must be a valid CIDR range. Security group parameters cannot be specified if -cidrip is specified. it's one or the other, pick a lane πŸ™ˆ
  • -ec2_security_group_id β€” ID of the EC2 Security Group to revoke access from. For VPC DB security groups, this must be provided.
  • -ec2_security_group_name β€” name of the EC2 Security Group to revoke access from.
  • -ec2_security_group_owner_id β€” AWS Account Number of the owner of the EC2 Security Group specified in the -ec2_security_group_name parameter.

Returns a VM::EC2::DB::SecurityGroup object. ✨


✨ AUTHOR ✨

Lance Kinley <lkinley@loyaltymethods.com>.

Copyright (c) 2013 Loyalty Methods, Inc.

This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty.


and that's a wrap on the whole page, bestie 🫢 you made it to the end of all nine parts, that's genuinely iconic behavior πŸ‘‘

this lil doc came to you courtesy of <code>perl v5.38.2</code>, dated <code>2024-08-10</code> β€” go forth and relational-database responsibly πŸ’–

πŸ“¦ where this page comes from