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.
Parameters:
-
dbi_resource_id
(Optional[String], default:
None
)
–
The resource ID of the DB instance that is the source of the automated backup. This parameter isn't case-sensitive.
-
db_instance_identifier
(Optional[String], default:
None
)
–
(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.
-
filters
(Optional[FilterList], default:
None
)
–
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.
-
max_records
(Optional[IntegerOptional], default:
None
)
–
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.
-
marker
(Optional[String], default:
None
)
–
The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to MaxRecords.
-
db_instance_automated_backups_arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the replicated automated backups, for example, arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE.
This setting doesn't apply to RDS Custom.
Raises:
Examples:
To describe the automated backups for a DB instance
The following example displays details about the automated backups for the specified DB instance. The details include replicated automated backups in other AWS Regions.
>>> client.describe_db_instance_automated_backups(db_instance_identifier='new-orcl-db')
Source code in docs_src/capo_rds/_services/rds.py
| def describe_db_instance_automated_backups(
self,
*,
config_overrides: Optional[RDSClientConfig] = None,
dbi_resource_id: Optional["capo_rds.types.string.String"] = None,
db_instance_identifier: Optional["capo_rds.types.string.String"] = None,
filters: Optional["capo_rds.types.filter_list.FilterList"] = None,
max_records: Optional["capo_rds.types.integer_optional.IntegerOptional"] = None,
marker: Optional["capo_rds.types.string.String"] = None,
db_instance_automated_backups_arn: Optional[
"capo_rds.types.string.String"
] = None,
) -> "capo_rds.types.db_instance_automated_backup_message.DBInstanceAutomatedBackupMessage":
"""<p>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 <code>DescribeDBInstanceAutomatedBackups</code> and <code>DescribeDBInstances</code> operations.</p> <p>All parameters are optional.</p>
Args:
dbi_resource_id: <p>The resource ID of the DB instance that is the source of the automated backup. This parameter isn't case-sensitive.</p>
db_instance_identifier: <p>(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.</p>
filters: <p>A filter that specifies which resources to return based on status.</p> <p>Supported filters are the following:</p> <ul> <li> <p> <code>status</code> </p> <ul> <li> <p> <code>active</code> - Automated backups for current instances.</p> </li> <li> <p> <code>creating</code> - Automated backups that are waiting for the first automated snapshot to be available.</p> </li> <li> <p> <code>retained</code> - Automated backups for deleted instances and after backup replication is stopped.</p> </li> </ul> </li> <li> <p> <code>db-instance-id</code> - 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.</p> </li> <li> <p> <code>dbi-resource-id</code> - Accepts DB resource identifiers and Amazon Resource Names (ARNs). The results list includes only information about the DB instance resources identified by these ARNs.</p> </li> </ul> <p>Returns all resources by default. The status for each resource is specified in the response.</p>
max_records: <p>The maximum number of records to include in the response. If more records exist than the specified <code>MaxRecords</code> value, a pagination token called a marker is included in the response so that you can retrieve the remaining results.</p>
marker: <p>The pagination token provided in the previous request. If this parameter is specified the response includes only records beyond the marker, up to <code>MaxRecords</code>.</p>
db_instance_automated_backups_arn: <p>The Amazon Resource Name (ARN) of the replicated automated backups, for example, <code>arn:aws:rds:us-east-1:123456789012:auto-backup:ab-L2IJCEXJP7XQ7HOJ4SIEXAMPLE</code>.</p> <p>This setting doesn't apply to RDS Custom.</p>
Raises:
capo_rds.errors.db_instance_automated_backup_not_found_fault.DBInstanceAutomatedBackupNotFoundFault: <p>No automated backup for this DB instance was found.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe the automated backups for a DB instance
The following example displays details about the automated backups for the specified DB instance. The details include replicated automated backups in other AWS Regions.
>>> client.describe_db_instance_automated_backups(db_instance_identifier='new-orcl-db')
"""
def _handler(
req: "OperationRequest[capo_rds.types.describe_db_instance_automated_backups_message.DescribeDBInstanceAutomatedBackupsMessage]",
) -> OperationResponse[
"capo_rds.types.db_instance_automated_backup_message.DBInstanceAutomatedBackupMessage"
]:
import capo_rds._operations.amazon_rd_sv19.describe_db_instance_automated_backups
output, http_response = (
capo_rds._operations.amazon_rd_sv19.describe_db_instance_automated_backups.describe_db_instance_automated_backups(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeDBInstanceAutomatedBackups")
)
input_: capo_rds.types.describe_db_instance_automated_backups_message.DescribeDBInstanceAutomatedBackupsMessage = {}
if dbi_resource_id is not None:
input_["dbi_resource_id"] = dbi_resource_id
if db_instance_identifier is not None:
input_["db_instance_identifier"] = db_instance_identifier
if filters is not None:
input_["filters"] = filters
if max_records is not None:
input_["max_records"] = max_records
if marker is not None:
input_["marker"] = marker
if db_instance_automated_backups_arn is not None:
input_["db_instance_automated_backups_arn"] = (
db_instance_automated_backups_arn
)
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|