db_instance_automated_backups
Creates, updates, deletes, gets or lists a db_instance_automated_backups resource.
Overview
| Name | db_instance_automated_backups |
| Type | Resource |
| Id | aws.rds.db_instance_automated_backups |
Fields
The following fields are returned by SELECT queries:
- describe_db_instance_automated_backups
| Name | Datatype | Description |
|---|---|---|
additional_storage_volumes | string | The additional storage volumes associated with the automated backup. Valid Values: GP3 | IO2 |
allocated_storage | integer | The allocated storage size for the automated backup in gibibytes (GiB). |
availability_zone | string | The Availability Zone that the automated backup was created in. For information on Amazon Web Services Regions and Availability Zones, see Regions and Availability Zones. |
aws_backup_recovery_point_arn | string | The Amazon Resource Name (ARN) of the recovery point in Amazon Web Services Backup. |
backup_retention_period | integer | The retention period for the automated backups. |
backup_target | string | The location where automated backups are stored: Dedicated Local Zones, Amazon Web Services Outposts or the Amazon Web Services Region. |
db_instance_arn | string | The Amazon Resource Name (ARN) for the automated backups. |
db_instance_automated_backups_arn | string | The Amazon Resource Name (ARN) for the replicated automated backups. |
db_instance_automated_backups_replications | string | The list of replications to different Amazon Web Services Regions associated with the automated backup. |
db_instance_identifier | string | The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region. |
dbi_resource_id | string | The resource ID for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region. |
dedicated_log_volume | boolean | Indicates whether the DB instance has a dedicated log volume (DLV) enabled. |
encrypted | boolean | Indicates whether the automated backup is encrypted. |
engine | string | The name of the database engine for this automated backup. |
engine_version | string | The version of the database engine for the automated backup. |
iam_database_authentication_enabled | boolean | True if mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false. |
instance_create_time | string | The date and time when the DB instance was created. |
iops | integer | The IOPS (I/O operations per second) value for the automated backup. |
kms_key_id | string | The Amazon Web Services KMS key ID for an automated backup. The Amazon Web Services KMS key identifier is the key ARN, key ID, alias ARN, or alias name for the KMS key. |
license_model | string | The license model information for the automated backup. |
master_username | string | The master user name of an automated backup. |
multi_tenant | boolean | Specifies whether the automatic backup is for a DB instance in the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE). |
option_group_name | string | The option group the automated backup is associated with. If omitted, the default option group for the engine specified is used. |
port | integer | The port number that the automated backup used for connections. Default: Inherits from the source DB instance Valid Values: 1150-65535 |
preferred_backup_window | string | The daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod. |
region | string | The Amazon Web Services Region associated with the automated backup. |
restore_window | string | The earliest and latest time a DB instance can be restored to. |
status | string | A list of status information for an automated backup: active - Automated backups for current instances. retained - Automated backups for deleted instances. creating - Automated backups that are waiting for the first automated snapshot to be available. |
storage_encryption_type | string | The type of encryption used to protect data at rest in the automated backup. Possible values: none - The automated backup is not encrypted. sse-rds - The automated backup is encrypted using an Amazon Web Services owned KMS key. sse-kms - The automated backup is encrypted using a customer managed KMS key or Amazon Web Services managed KMS key. |
storage_throughput | integer | The storage throughput for the automated backup. |
storage_type | string | The storage type associated with the automated backup. |
tag_list | string | A list of tags. For more information, see Tagging Amazon RDS resources in the Amazon RDS User Guide or Tagging Amazon Aurora and Amazon RDS resources in the Amazon Aurora User Guide. |
tde_credential_arn | string | The ARN from the key store with which the automated backup is associated for TDE encryption. |
timezone | string | The time zone of the automated backup. In most cases, the Timezone element is empty. Timezone content appears only for Microsoft SQL Server DB instances that were created with a time zone specified. |
vpc_id | string | The VPC ID associated with the DB instance. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_db_instance_automated_backups | select | region | DbiResourceId, DBInstanceIdentifier, Filters, MaxRecords, Marker, DBInstanceAutomatedBackupsArn | Displays backups for both current and deleted instances. For example, use this operation to find details about automated backups for previously deleted instances. Current instances with retention periods greater than zero (0) are returned for both the DescribeDBInstanceAutomatedBackups and DescribeDBInstances operations. All parameters are optional. |
delete_db_instance_automated_backup | delete | region | DbiResourceId, DBInstanceAutomatedBackupsArn | Deletes automated backups using the DbiResourceId value of the source DB instance or the Amazon Resource Name (ARN) of the automated backups. |
start_db_instance_automated_backups_replication | exec | SourceDBInstanceArn, region | BackupRetentionPeriod, KmsKeyId, PreSignedUrl, Tags | Enables replication of automated backups to a different Amazon Web Services Region. This command doesn't apply to RDS Custom. For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide. |
stop_db_instance_automated_backups_replication | exec | SourceDBInstanceArn, region | Stops automated backup replication for a DB instance. This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL. For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
SourceDBInstanceArn | string | The Amazon Resource Name (ARN) of the source DB instance for which to stop replicating automate backups, for example, arn:aws:rds:us-west-2:123456789012:db:mydatabase. |
region | string | AWS region (default: us-east-1) |
BackupRetentionPeriod | integer | The retention period for the replicated automated backups. |
DBInstanceAutomatedBackupsArn | string | The Amazon Resource Name (ARN) of the automated backups to delete, for example, arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE. This setting doesn't apply to RDS Custom. |
DBInstanceIdentifier | string | (Optional) The user-supplied instance identifier. If this parameter is specified, it must match the identifier of an existing DB instance. It returns information from the specific DB instance's automated backup. This parameter isn't case-sensitive. |
DbiResourceId | string | The identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region. |
Filters | array | A filter that specifies which resources to return based on status. Supported filters are the following: status active - Automated backups for current instances. creating - Automated backups that are waiting for the first automated snapshot to be available. retained - Automated backups for deleted instances and after backup replication is stopped. db-instance-id - Accepts DB instance identifiers and Amazon Resource Names (ARNs). The results list includes only information about the DB instance automated backups identified by these ARNs. dbi-resource-id - Accepts DB resource identifiers and Amazon Resource Names (ARNs). The results list includes only information about the DB instance resources identified by these ARNs. Returns all resources by default. The status for each resource is specified in the response. |
KmsKeyId | string | The Amazon Web Services KMS key identifier for encryption of the replicated automated backups. The KMS key ID is the Amazon Resource Name (ARN) for the KMS encryption key in the destination Amazon Web Services Region, for example, arn:aws:kms:us-east-1:123456789012:key/AKIAIOSFODNN7EXAMPLE. |
Marker | string | The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords. |
MaxRecords | integer | The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a pagination token called a marker is included in the response so that you can retrieve the remaining results. |
PreSignedUrl | string | In an Amazon Web Services GovCloud (US) Region, an URL that contains a Signature Version 4 signed request for the StartDBInstanceAutomatedBackupsReplication operation to call in the Amazon Web Services Region of the source DB instance. The presigned URL must be a valid request for the StartDBInstanceAutomatedBackupsReplication API operation that can run in the Amazon Web Services Region that contains the source DB instance. This setting applies only to Amazon Web Services GovCloud (US) Regions. It's ignored in other Amazon Web Services Regions. To learn how to generate a Signature Version 4 signed request, see Authenticating Requests: Using Query Parameters (Amazon Web Services Signature Version 4) and Signature Version 4 Signing Process. If you are using an Amazon Web Services SDK tool or the CLI, you can specify SourceRegion (or --source-region for the CLI) instead of specifying PreSignedUrl manually. Specifying SourceRegion autogenerates a presigned URL that is a valid request for the operation that can run in the source Amazon Web Services Region. |
Tags | array | A list of tags to associate with the replicated automated backups. |
SELECT examples
- describe_db_instance_automated_backups
Displays backups for both current and deleted instances. For example, use this operation to find details about automated backups for previously deleted instances. Current instances with retention periods greater than zero (0) are returned for both the DescribeDBInstanceAutomatedBackups and DescribeDBInstances operations. All parameters are optional.
SELECT
additional_storage_volumes,
allocated_storage,
availability_zone,
aws_backup_recovery_point_arn,
backup_retention_period,
backup_target,
db_instance_arn,
db_instance_automated_backups_arn,
db_instance_automated_backups_replications,
db_instance_identifier,
dbi_resource_id,
dedicated_log_volume,
encrypted,
engine,
engine_version,
iam_database_authentication_enabled,
instance_create_time,
iops,
kms_key_id,
license_model,
master_username,
multi_tenant,
option_group_name,
port,
preferred_backup_window,
region,
restore_window,
status,
storage_encryption_type,
storage_throughput,
storage_type,
tag_list,
tde_credential_arn,
timezone,
vpc_id
FROM aws.rds.db_instance_automated_backups
WHERE region = '{{ region }}' -- required
AND DbiResourceId = '{{ DbiResourceId }}'
AND DBInstanceIdentifier = '{{ DBInstanceIdentifier }}'
AND Filters = '{{ Filters }}'
AND MaxRecords = '{{ MaxRecords }}'
AND Marker = '{{ Marker }}'
AND DBInstanceAutomatedBackupsArn = '{{ DBInstanceAutomatedBackupsArn }}'
;
DELETE examples
- delete_db_instance_automated_backup
Deletes automated backups using the DbiResourceId value of the source DB instance or the Amazon Resource Name (ARN) of the automated backups.
DELETE FROM aws.rds.db_instance_automated_backups
WHERE region = '{{ region }}' --required
AND DbiResourceId = '{{ DbiResourceId }}'
AND DBInstanceAutomatedBackupsArn = '{{ DBInstanceAutomatedBackupsArn }}'
;
Lifecycle Methods
- start_db_instance_automated_backups_replication
- stop_db_instance_automated_backups_replication
Enables replication of automated backups to a different Amazon Web Services Region. This command doesn't apply to RDS Custom. For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide.
EXEC aws.rds.db_instance_automated_backups.start_db_instance_automated_backups_replication
@SourceDBInstanceArn='{{ SourceDBInstanceArn }}' --required,
@region='{{ region }}' --required,
@BackupRetentionPeriod='{{ BackupRetentionPeriod }}',
@KmsKeyId='{{ KmsKeyId }}',
@PreSignedUrl='{{ PreSignedUrl }}',
@Tags='{{ Tags }}'
;
Stops automated backup replication for a DB instance. This command doesn't apply to RDS Custom, Aurora MySQL, and Aurora PostgreSQL. For more information, see Replicating Automated Backups to Another Amazon Web Services Region in the Amazon RDS User Guide.
EXEC aws.rds.db_instance_automated_backups.stop_db_instance_automated_backups_replication
@SourceDBInstanceArn='{{ SourceDBInstanceArn }}' --required,
@region='{{ region }}' --required
;