Skip to content

create_cluster_snapshot async

create_cluster_snapshot(
    cluster_arn: str,
    snapshot_name: str,
    *,
    config_overrides: Optional[AsyncDocDBElasticClientConfig] = None,
    tags: Optional[TagMap] = None,
) -> CreateClusterSnapshotOutput

Creates a snapshot of an elastic cluster.

Parameters:

  • cluster_arn (str) –

    The ARN identifier of the elastic cluster of which you want to create a snapshot.

  • snapshot_name (str) –

    The name of the new elastic cluster snapshot.

  • tags (Optional[TagMap], default: None ) –

    The tags to be assigned to the new elastic cluster snapshot.

Raises:

Source code in docs_src/capo_docdb_elastic/_services/async_doc_db_elastic.py
async def create_cluster_snapshot(
    self,
    cluster_arn: str,
    snapshot_name: str,
    *,
    config_overrides: Optional[AsyncDocDBElasticClientConfig] = None,
    tags: Optional["capo_docdb_elastic.types.tag_map.TagMap"] = None,
) -> "capo_docdb_elastic.types.create_cluster_snapshot_output.CreateClusterSnapshotOutput":
    """<p>Creates a snapshot of an elastic cluster.</p>

    Args:
        cluster_arn: <p>The ARN identifier of the elastic cluster of which you want to create a snapshot.</p>
        snapshot_name: <p>The name of the new elastic cluster snapshot.</p>
        tags: <p>The tags to be assigned to the new elastic cluster snapshot.</p>

    Raises:
        capo_docdb_elastic.errors.access_denied_exception.AccessDeniedException: <p>An exception that occurs when there are not sufficient permissions to perform an action.</p>
        capo_docdb_elastic.errors.conflict_exception.ConflictException: <p>There was an access conflict.</p>
        capo_docdb_elastic.errors.internal_server_exception.InternalServerException: <p>There was an internal server error.</p>
        capo_docdb_elastic.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be located.</p>
        capo_docdb_elastic.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The service quota for the action was exceeded.</p>
        capo_docdb_elastic.errors.throttling_exception.ThrottlingException: <p>ThrottlingException will be thrown when request was denied due to request throttling.</p>
        capo_docdb_elastic.errors.validation_exception.ValidationException: <p>A structure defining a validation exception.</p>
        capo_docdb_elastic.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_docdb_elastic.types.create_cluster_snapshot_input.CreateClusterSnapshotInput]",
    ) -> AsyncOperationResponse[
        "capo_docdb_elastic.types.create_cluster_snapshot_output.CreateClusterSnapshotOutput"
    ]:
        import capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.create_cluster_snapshot

        (
            output,
            http_response,
        ) = await capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.create_cluster_snapshot.async_create_cluster_snapshot(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateClusterSnapshot")
    )
    input_: capo_docdb_elastic.types.create_cluster_snapshot_input.CreateClusterSnapshotInput = {
        "cluster_arn": cluster_arn,
        "snapshot_name": snapshot_name,
    }
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output