Skip to content

stop_db_cluster async

stop_db_cluster(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_identifier: Optional[String] = None,
) -> StopDBClusterResult

Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains the DB cluster's metadata, including its endpoints and DB parameter groups.

Neptune also retains the transaction logs so you can do a point-in-time restore if necessary.

Parameters:

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

    The DB cluster identifier of the Neptune DB cluster to be stopped. This parameter is stored as a lowercase string.

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def stop_db_cluster(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_identifier: Optional["capo_neptune.types.string.String"] = None,
) -> "capo_neptune.types.stop_db_cluster_result.StopDBClusterResult":
    """<p>Stops an Amazon Neptune DB cluster. When you stop a DB cluster, Neptune retains the DB cluster's metadata, including its endpoints and DB parameter groups.</p> <p>Neptune also retains the transaction logs so you can do a point-in-time restore if necessary.</p>

    Args:
        db_cluster_identifier: <p>The DB cluster identifier of the Neptune DB cluster to be stopped. This parameter is stored as a lowercase string.</p>

    Raises:
        capo_neptune.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <i>DBClusterIdentifier</i> does not refer to an existing DB cluster.</p>
        capo_neptune.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The DB cluster is not in a valid state.</p>
        capo_neptune.errors.invalid_db_instance_state_fault.InvalidDBInstanceStateFault: <p>The specified DB instance is not in the <i>available</i> 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.stop_db_cluster_message.StopDBClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.stop_db_cluster_result.StopDBClusterResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.stop_db_cluster

        (
            output,
            http_response,
        ) = await capo_neptune._operations.amazon_rd_sv19.stop_db_cluster.async_stop_db_cluster(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StopDBCluster")
    )
    input_: capo_neptune.types.stop_db_cluster_message.StopDBClusterMessage = {}
    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