Skip to content

remove_from_global_cluster async

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

Detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary cluster in a different Region.

This operation only applies to Aurora DB clusters.

Parameters:

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

    The cluster identifier to detach from the Aurora global database cluster.

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

    The Amazon Resource Name (ARN) identifying the cluster that was detached from the Aurora global database cluster.

Raises:

Examples:

To detach an Aurora secondary cluster from an Aurora global database cluster The following example detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster changes from being read-only to a standalone cluster with read-write capability.

>>> await client.remove_from_global_cluster(global_cluster_identifier='myglobalcluster', db_cluster_identifier='arn:aws:rds:us-west-2:123456789012:cluster:DB-1')
Source code in docs_src/capo_rds/_services/async_rds.py
async def remove_from_global_cluster(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_rds.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
    db_cluster_identifier: Optional["capo_rds.types.string.String"] = None,
) -> (
    "capo_rds.types.remove_from_global_cluster_result.RemoveFromGlobalClusterResult"
):
    """<p>Detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster becomes a standalone cluster with read-write capability instead of being read-only and receiving data from a primary cluster in a different Region.</p> <note> <p>This operation only applies to Aurora DB clusters.</p> </note>

    Args:
        global_cluster_identifier: <p>The cluster identifier to detach from the Aurora global database cluster.</p>
        db_cluster_identifier: <p>The Amazon Resource Name (ARN) identifying the cluster that was detached from the Aurora global database cluster.</p>

    Raises:
        capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
        capo_rds.errors.global_cluster_not_found_fault.GlobalClusterNotFoundFault: <p>The <code>GlobalClusterIdentifier</code> doesn't refer to an existing global database cluster.</p>
        capo_rds.errors.invalid_db_cluster_state_fault.InvalidDBClusterStateFault: <p>The requested operation can't be performed while the cluster is in this state.</p>
        capo_rds.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_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To detach an Aurora secondary cluster from an Aurora global database cluster
        The following example detaches an Aurora secondary cluster from an Aurora global database cluster. The cluster changes from being read-only to a standalone cluster with read-write capability.

        >>> await client.remove_from_global_cluster(global_cluster_identifier='myglobalcluster', db_cluster_identifier='arn:aws:rds:us-west-2:123456789012:cluster:DB-1')
    """

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

        (
            output,
            http_response,
        ) = await capo_rds._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_rds.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