Deletes a DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.
The DB cluster snapshot must be in the available state to be deleted.
For more information on Amazon Aurora, see What is Amazon Aurora? in the Amazon Aurora User Guide.
For more information on Multi-AZ DB clusters, see Multi-AZ DB cluster deployments in the Amazon RDS User Guide.
Parameters:
-
db_cluster_snapshot_identifier
(Optional[String], default:
None
)
–
The identifier of the DB cluster snapshot to delete.
Constraints: Must be the name of an existing DB cluster snapshot in the available state.
Raises:
Examples:
To delete a DB cluster snapshot
>>> await client.delete_db_cluster_snapshot(db_cluster_snapshot_identifier='mydbclustersnapshot')
Source code in docs_src/capo_rds/_services/async_rds.py
| async def delete_db_cluster_snapshot(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
db_cluster_snapshot_identifier: Optional["capo_rds.types.string.String"] = None,
) -> (
"capo_rds.types.delete_db_cluster_snapshot_result.DeleteDBClusterSnapshotResult"
):
"""<p>Deletes a DB cluster snapshot. If the snapshot is being copied, the copy operation is terminated.</p> <note> <p>The DB cluster snapshot must be in the <code>available</code> state to be deleted.</p> </note> <p>For more information on Amazon Aurora, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/CHAP_AuroraOverview.html"> What is Amazon Aurora?</a> in the <i>Amazon Aurora User Guide</i>.</p> <p>For more information on Multi-AZ DB clusters, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/multi-az-db-clusters-concepts.html"> Multi-AZ DB cluster deployments</a> in the <i>Amazon RDS User Guide</i>.</p>
Args:
db_cluster_snapshot_identifier: <p>The identifier of the DB cluster snapshot to delete.</p> <p>Constraints: Must be the name of an existing DB cluster snapshot in the <code>available</code> state.</p>
Raises:
capo_rds.errors.db_cluster_snapshot_not_found_fault.DBClusterSnapshotNotFoundFault: <p> <code>DBClusterSnapshotIdentifier</code> doesn't refer to an existing DB cluster snapshot.</p>
capo_rds.errors.invalid_db_cluster_snapshot_state_fault.InvalidDBClusterSnapshotStateFault: <p>The supplied value isn't a valid DB cluster snapshot state.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To delete a DB cluster snapshot
>>> await client.delete_db_cluster_snapshot(db_cluster_snapshot_identifier='mydbclustersnapshot')
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.delete_db_cluster_snapshot_message.DeleteDBClusterSnapshotMessage]",
) -> AsyncOperationResponse[
"capo_rds.types.delete_db_cluster_snapshot_result.DeleteDBClusterSnapshotResult"
]:
import capo_rds._operations.amazon_rd_sv19.delete_db_cluster_snapshot
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.delete_db_cluster_snapshot.async_delete_db_cluster_snapshot(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDBClusterSnapshot")
)
input_: capo_rds.types.delete_db_cluster_snapshot_message.DeleteDBClusterSnapshotMessage = {}
if db_cluster_snapshot_identifier is not None:
input_["db_cluster_snapshot_identifier"] = db_cluster_snapshot_identifier
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|