Skip to content

delete_global_cluster async

delete_global_cluster(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[GlobalClusterIdentifier] = None,
) -> DeleteGlobalClusterResult

Deletes a global database. The primary and all secondary clusters must already be detached or deleted first.

Parameters:

Raises:

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def delete_global_cluster(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_neptune.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
) -> "capo_neptune.types.delete_global_cluster_result.DeleteGlobalClusterResult":
    """<p>Deletes a global database. The primary and all secondary clusters must already be detached or deleted first.</p>

    Args:
        global_cluster_identifier: <p>The cluster identifier of the global database cluster being deleted.</p>

    Raises:
        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.delete_global_cluster_message.DeleteGlobalClusterMessage]",
    ) -> AsyncOperationResponse[
        "capo_neptune.types.delete_global_cluster_result.DeleteGlobalClusterResult"
    ]:
        import capo_neptune._operations.amazon_rd_sv19.delete_global_cluster

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteGlobalCluster")
    )
    input_: capo_neptune.types.delete_global_cluster_message.DeleteGlobalClusterMessage = {}
    if global_cluster_identifier is not None:
        input_["global_cluster_identifier"] = global_cluster_identifier

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