VM::EC...ervice(3pm)
πΈ 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:
-resource_nameβ The Amazon RDS resource the tags will be removed from. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) at:http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html#USER_Tagging.ARN-tagsβ hashref or arrayref of hashrefs containing tag Key/Value pairs
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,EC2SecurityGroupIdmust 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_nameparameter.
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 specifiedCharacterSet.-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
- Constraints:
- Oracle: the Oracle System ID (SID) of the created DB Instance.
- Constraints:
- Cannot be longer than 8 characters
- Constraints:
- 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
- Constraints:
-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 between100-1000-license_modelβ license model information for this DB Instance.- Valid values:
license-included|bring-your-own-license|general-public-license
- Valid values:
-multi_azβ specifies if the DB Instance is a Multi-AZ deployment. You cannot set the-availability_zoneargument if the-multi_azargument 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
- Default:
- Oracle:
- Default:
1521, Valid values:1150-65535
- Default:
- Oracle:
- Default:
1433, Valid values:1150-65535except1434and3389.
- Default:
- MySQL:
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_periodargument.- 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
- US-East (Northern Virginia) Region:
- 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.
- Must be in the format
- 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.
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
- US-East (Northern Virginia) Region:
- Valid Days:
Mon,Tue,Wed,Thu,Fri,Sat,Sun - Constraints: Minimum 30-minute window.
- Format:
-publicly_accessibleβ specifies the accessibility options for the DB instance. A value oftruespecifies an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value offalsespecifies 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:trueVPC:false
- If no DB subnet group has been specified as part of the request and the
-publicly_accessiblevalue 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 thePubliclyAccessiblevalue has not been set, the DB instance will be private.
- 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.
-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
- Valid Values:
-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 totrueto activate the subscription, set tofalseto create the subscription but not active it. (Their words, not mine π)-event_categoriesβ an arrayref of event categories for a-source_typethat you want to subscribe to. You can see a list of the categories for a given-source_typein the Events topic in the Amazon RDS User Guide or by using thedescribe_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 todb-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_recordssays-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_recordsallows-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_recordslimit-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_nameis documented as an alias for-db_subnet_group_nameright 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_identifieris 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.
-start_timeβ the beginning of the time interval to retrieve events for, specified in ISO 8601 format. for more info on ISO 8601, visit:http://en.wikipedia.org/wiki/ISO_8601
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_nameor-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 toMaxRecords.-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_immediatelyparameter is set totruefor 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_windowsetting 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 totrueduring 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 to0disables 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 thedescribe_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_immediatelyargument is set totruefor 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_immediatelyparameter is set totruefor 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_immediatelyargument is set totruefor 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
8to41alphanumeric characters. - Oracle: must contain from
8to30alphanumeric characters. - SQL Server: must contain from
8to128alphanumeric 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_immediatelyargument is set totruefor 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
1to63alphanumeric characters or hyphens (1to15for 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_immediatelyargument is set totruefor 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_periodargument.
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: theimmediatemethod can be used only for dynamic parameters; thepending-rebootmethod can be used with MySQL and Oracle DB Instances for either dynamic or static parameters. For Microsoft SQL Server DB Instances, thepending-rebootmethod 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
1to255alphanumeric 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 of20parameters 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_typeto subscribe to. A list of the categories for a given-source_typecan be seen in the Events topic in the Amazon RDS User Guide, or by using thedescribe_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 todb-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_periodargument.
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:
-resource_nameβ the Amazon RDS resource the tags will be removed from. This value is an Amazon Resource Name (ARN). For information about creating an ARN, see Constructing an RDS Amazon Resource Name (ARN) at:http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html#USER_Tagging.ARN-tagsβ hashref or arrayref of hashrefs containing tag Key/Value pairs
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_azis 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_zoneargument if the-multi_azargument 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
- Default:
- Oracle:
- Default:
1521, Valid values:1150-65535
- Default:
- Oracle:
- Default:
1433, Valid values:1150-65535except1434and3389.
- Default:
- MySQL:
-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_azis 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_zoneargument if the-multi_azargument 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
- Default:
- Oracle:
- Default:
1521, Valid values:1150-65535
- Default:
- Oracle:
- Default:
1433, Valid values:1150-65535except1434and3389.
- Default:
- MySQL:
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 oftruemeans an Internet-facing instance with a publicly resolvable DNS name, which resolves to a public IP address. A value offalsemeans 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_timeparameter istrue
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-cidripis 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_nameparameter.
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
- debian trixie: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu resolute: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- ubuntu stonking: libvm-ec2-perl 1.28-5 Β· Artistic-2.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms