Skip to content

batch_delete_cluster_snapshots

batch_delete_cluster_snapshots(
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    identifiers: Optional[DeleteClusterSnapshotMessageList] = None,
) -> BatchDeleteClusterSnapshotsResult

Deletes a set of cluster snapshots.

Parameters:

Raises:

Source code in docs_src/capo_redshift/_services/redshift.py
def batch_delete_cluster_snapshots(
    self,
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    identifiers: Optional[
        "capo_redshift.types.delete_cluster_snapshot_message_list.DeleteClusterSnapshotMessageList"
    ] = None,
) -> "capo_redshift.types.batch_delete_cluster_snapshots_result.BatchDeleteClusterSnapshotsResult":
    """<p>Deletes a set of cluster snapshots.</p>

    Args:
        identifiers: <p>A list of identifiers for the snapshots that you want to delete.</p>

    Raises:
        capo_redshift.errors.batch_delete_request_size_exceeded_fault.BatchDeleteRequestSizeExceededFault: <p>The maximum number for a batch delete of snapshots has been reached. The limit is 100. </p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_redshift.types.batch_delete_cluster_snapshots_request.BatchDeleteClusterSnapshotsRequest]",
    ) -> OperationResponse[
        "capo_redshift.types.batch_delete_cluster_snapshots_result.BatchDeleteClusterSnapshotsResult"
    ]:
        import capo_redshift._operations.redshift_service_version20121201.batch_delete_cluster_snapshots

        output, http_response = (
            capo_redshift._operations.redshift_service_version20121201.batch_delete_cluster_snapshots.batch_delete_cluster_snapshots(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchDeleteClusterSnapshots")
    )
    input_: capo_redshift.types.batch_delete_cluster_snapshots_request.BatchDeleteClusterSnapshotsRequest = {}
    if identifiers is not None:
        input_["identifiers"] = identifiers

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output