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.
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:
Source code in docs_src/capo_neptune/_services/neptune.py
| def delete_db_cluster_snapshot(
self,
*,
config_overrides: Optional[NeptuneClientConfig] = None,
db_cluster_snapshot_identifier: Optional[
"capo_neptune.types.string.String"
] = None,
) -> "capo_neptune.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>
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_neptune.errors.db_cluster_snapshot_not_found_fault.DBClusterSnapshotNotFoundFault: <p> <i>DBClusterSnapshotIdentifier</i> does not refer to an existing DB cluster snapshot.</p>
capo_neptune.errors.invalid_db_cluster_snapshot_state_fault.InvalidDBClusterSnapshotStateFault: <p>The supplied value is not a valid DB cluster snapshot state.</p>
capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_neptune.types.delete_db_cluster_snapshot_message.DeleteDBClusterSnapshotMessage]",
) -> OperationResponse[
"capo_neptune.types.delete_db_cluster_snapshot_result.DeleteDBClusterSnapshotResult"
]:
import capo_neptune._operations.amazon_rd_sv19.delete_db_cluster_snapshot
output, http_response = (
capo_neptune._operations.amazon_rd_sv19.delete_db_cluster_snapshot.delete_db_cluster_snapshot(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DeleteDBClusterSnapshot")
)
input_: capo_neptune.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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|