Skip to content

start_db_cluster async

start_db_cluster(
    *,
    config_overrides: Optional[AsyncDocDBClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
) -> StartDBClusterResult

Restarts the stopped cluster that is specified by DBClusterIdentifier. For more information, see Stopping and Starting an Amazon DocumentDB Cluster.

Parameters:

  • db_cluster_identifier (Optional[String], default: None ) –

    The identifier of the cluster to restart. Example: docdb-2019-05-28-15-24-52

Raises:

Source code in docs_src/capo_docdb/_services/async_doc_db.py
async def start_db_cluster(
    self,
    *,
    config_overrides: Optional[AsyncDocDBClientConfig] = None,
    db_cluster_identifier: Optional["capo_docdb.types.string.String"] = None,
) -> "capo_docdb.types.start_db_cluster_result.StartDBClusterResult":
    """<p>Restarts the stopped cluster that is specified by <code>DBClusterIdentifier</code>. For more information, see <a href="https://docs.aws.amazon.com/documentdb/latest/devguide/db-cluster-stop-start.html">Stopping and Starting an Amazon DocumentDB Cluster</a>.</p>

    Args:
        db_cluster_identifier: <p>The identifier of the cluster to restart. Example: <code>docdb-2019-05-28-15-24-52</code> </p>

    Raises:
        capo_docdb.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing cluster. </p>
        capo_docdb.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The cluster isn't in a valid state.</p>
        capo_docdb.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p> The specified instance isn't in the <i>available</i> state. </p>
        capo_docdb.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_docdb.types.start_db_cluster_message.StartDBClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_docdb.types.start_db_cluster_result.StartDBClusterResult"
    ]:
        import capo_docdb._operations.amazon_rd_sv19.start_db_cluster

        (
            output,
            http_response,
        ) = await capo_docdb._operations.amazon_rd_sv19.start_db_cluster.async_start_db_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartDBCluster")
    )
    input_: capo_docdb.types.start_db_cluster_message.StartDBClusterMessage = {}
    if db_cluster_identifier is not None:
        input_["db_cluster_identifier"] = db_cluster_identifier

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