Skip to main content

db_instance_automated_backups

Creates, updates, deletes, gets or lists a db_instance_automated_backups resource.

Overview

Namedb_instance_automated_backups
TypeResource
Idaws.rds.db_instance_automated_backups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
additional_storage_volumesstringThe additional storage volumes associated with the automated backup. Valid Values: GP3 | IO2
allocated_storageintegerThe allocated storage size for the automated backup in gibibytes (GiB).
availability_zonestringThe 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_arnstringThe Amazon Resource Name (ARN) of the recovery point in Amazon Web Services Backup.
backup_retention_periodintegerThe retention period for the automated backups.
backup_targetstringThe location where automated backups are stored: Dedicated Local Zones, Amazon Web Services Outposts or the Amazon Web Services Region.
db_instance_arnstringThe Amazon Resource Name (ARN) for the automated backups.
db_instance_automated_backups_arnstringThe Amazon Resource Name (ARN) for the replicated automated backups.
db_instance_automated_backups_replicationsstringThe list of replications to different Amazon Web Services Regions associated with the automated backup.
db_instance_identifierstringThe identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
dbi_resource_idstringThe resource ID for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
dedicated_log_volumebooleanIndicates whether the DB instance has a dedicated log volume (DLV) enabled.
encryptedbooleanIndicates whether the automated backup is encrypted.
enginestringThe name of the database engine for this automated backup.
engine_versionstringThe version of the database engine for the automated backup.
iam_database_authentication_enabledbooleanTrue if mapping of Amazon Web Services Identity and Access Management (IAM) accounts to database accounts is enabled, and otherwise false.
instance_create_timestringThe date and time when the DB instance was created.
iopsintegerThe IOPS (I/O operations per second) value for the automated backup.
kms_key_idstringThe 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_modelstringThe license model information for the automated backup.
master_usernamestringThe master user name of an automated backup.
multi_tenantbooleanSpecifies whether the automatic backup is for a DB instance in the multi-tenant configuration (TRUE) or the single-tenant configuration (FALSE).
option_group_namestringThe option group the automated backup is associated with. If omitted, the default option group for the engine specified is used.
portintegerThe port number that the automated backup used for connections. Default: Inherits from the source DB instance Valid Values: 1150-65535
preferred_backup_windowstringThe daily time range during which automated backups are created if automated backups are enabled, as determined by the BackupRetentionPeriod.
regionstringThe Amazon Web Services Region associated with the automated backup.
restore_windowstringThe earliest and latest time a DB instance can be restored to.
statusstringA 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_typestringThe 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_throughputintegerThe storage throughput for the automated backup.
storage_typestringThe storage type associated with the automated backup.
tag_liststringA 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_arnstringThe ARN from the key store with which the automated backup is associated for TDE encryption.
timezonestringThe 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_idstringThe VPC ID associated with the DB instance.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_db_instance_automated_backupsselectregionDbiResourceId, DBInstanceIdentifier, Filters, MaxRecords, Marker, DBInstanceAutomatedBackupsArnDisplays 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_backupdeleteregionDbiResourceId, DBInstanceAutomatedBackupsArnDeletes 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_replicationexecSourceDBInstanceArn, regionBackupRetentionPeriod, KmsKeyId, PreSignedUrl, TagsEnables 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_replicationexecSourceDBInstanceArn, regionStops 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.

NameDatatypeDescription
SourceDBInstanceArnstringThe 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.
regionstringAWS region (default: us-east-1)
BackupRetentionPeriodintegerThe retention period for the replicated automated backups.
DBInstanceAutomatedBackupsArnstringThe 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.
DBInstanceIdentifierstring(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.
DbiResourceIdstringThe identifier for the source DB instance, which can't be changed and which is unique to an Amazon Web Services Region.
FiltersarrayA 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.
KmsKeyIdstringThe 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.
MarkerstringThe pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.
MaxRecordsintegerThe 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.
PreSignedUrlstringIn 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.
TagsarrayA list of tags to associate with the replicated automated backups.

SELECT examples

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

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

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 }}'
;