Skip to content

remove_from_global_cluster async

remove_from_global_cluster(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
    db_cluster_identifier: Optional[String] = None,
) -> RemoveFromGlobalClusterResult

Detaches a Neptune DB cluster from a Neptune global database. A secondary cluster becomes a normal standalone cluster with read-write capability instead of being read-only, and no longer receives data from the primary cluster.

Parameters:

  • global_cluster_identifier (Optional[GlobalClusterIdentifier], default: None ) –

    The identifier of the Neptune global database from which to detach the specified Neptune DB cluster.

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

    The Amazon Resource Name (ARN) identifying the cluster to be detached from the Neptune global database cluster.

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def remove_from_global_cluster(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_neptune.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
    db_cluster_identifier: Optional["capo_neptune.types.string.String"] = None,
) -> "capo_neptune.types.remove_from_global_cluster_result.RemoveFromGlobalClusterResult":
    """<p>Detaches a Neptune DB cluster from a Neptune global database. A secondary cluster becomes a normal standalone cluster with read-write capability instead of being read-only, and no longer receives data from the primary cluster.</p>

    Args:
        global_cluster_identifier: <p>The identifier of the Neptune global database from which to detach the specified Neptune DB cluster.</p>
        db_cluster_identifier: <p>The Amazon Resource Name (ARN) identifying the cluster to be detached from the Neptune global database cluster.</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.global_cluster_not_found_fault.GlobalClusterNotFoundFault: <p>The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database cluster. </p>
        capo_neptune.errors.invalid_global_cluster_state_fault.InvalidGlobalClusterStateFault: <p>The global cluster is in an invalid state and can't perform the requested operation. </p>
        capo_neptune.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_neptune.types.remove_from_global_cluster_message.RemoveFromGlobalClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.remove_from_global_cluster_result.RemoveFromGlobalClusterResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.remove_from_global_cluster

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("RemoveFromGlobalCluster")
    )
    input_: capo_neptune.types.remove_from_global_cluster_message.RemoveFromGlobalClusterMessage = {}
    if global_cluster_identifier is not None:
        input_["global_cluster_identifier"] = global_cluster_identifier
    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