Skip to content

stop_cluster

stop_cluster(
    cluster_arn: str, *, config_overrides: Optional[DocDBElasticClientConfig] = None
) -> StopClusterOutput

Stops the running elastic cluster that is specified by clusterArn. The elastic cluster must be in the available state.

Parameters:

  • cluster_arn (str) –

    The ARN identifier of the elastic cluster.

Raises:

Examples:

Basic Stop Cluster Example update applied

>>> client.stop_cluster(cluster_arn='arn:aws:docdb-elastic:us-east-1:$AWS_ACCOUNT_ID:cluster/$CLUSTER_ID')
Source code in docs_src/capo_docdb_elastic/_services/doc_db_elastic.py
def stop_cluster(
    self,
    cluster_arn: str,
    *,
    config_overrides: Optional[DocDBElasticClientConfig] = None,
) -> "capo_docdb_elastic.types.stop_cluster_output.StopClusterOutput":
    """<p>Stops the running elastic cluster that is specified by <code>clusterArn</code>. The elastic cluster must be in the <i>available</i> state. </p>

    Args:
        cluster_arn: <p>The ARN identifier of the elastic cluster.</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.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.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.

    Examples:
        Basic Stop Cluster Example
        update applied

        >>> client.stop_cluster(cluster_arn='arn:aws:docdb-elastic:us-east-1:$AWS_ACCOUNT_ID:cluster/$CLUSTER_ID')
    """

    def _handler(
        req: "OperationRequest[capo_docdb_elastic.types.stop_cluster_input.StopClusterInput]",
    ) -> OperationResponse[
        "capo_docdb_elastic.types.stop_cluster_output.StopClusterOutput"
    ]:
        import capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.stop_cluster

        output, http_response = (
            capo_docdb_elastic._operations.chimera_db_lionfish_service_lambda.stop_cluster.stop_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopCluster")
    )
    input_: capo_docdb_elastic.types.stop_cluster_input.StopClusterInput = {
        "cluster_arn": cluster_arn
    }

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