Skip to content

delete_db_cluster_snapshot async

delete_db_cluster_snapshot(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_snapshot_identifier: Optional[String] = None,
) -> DeleteDBClusterSnapshotResult

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/async_neptune.py
async def delete_db_cluster_snapshot(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = 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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune.types.delete_db_cluster_snapshot_message.DeleteDBClusterSnapshotMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.delete_db_cluster_snapshot_result.DeleteDBClusterSnapshotResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.delete_db_cluster_snapshot

        (
            output,
            http_response,
        ) = await capo_neptune._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_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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output