Skip to content

delete_global_cluster

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

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

This action only applies to Aurora DB clusters.

Parameters:

Raises:

Examples:

To delete a global DB cluster The following example deletes an Aurora MySQL-compatible global DB cluster.

>>> client.delete_global_cluster(global_cluster_identifier='myglobalcluster')
Source code in docs_src/capo_rds/_services/rds.py
def delete_global_cluster(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    global_cluster_identifier: Optional[
        "capo_rds.types.global_cluster_identifier.GlobalClusterIdentifier"
    ] = None,
) -> "capo_rds.types.delete_global_cluster_result.DeleteGlobalClusterResult":
    """<p>Deletes a global database cluster. The primary and secondary clusters must already be detached or destroyed first.</p> <note> <p>This action only applies to Aurora DB clusters.</p> </note>

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

    Raises:
        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_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 delete a global DB cluster
        The following example deletes an Aurora MySQL-compatible global DB cluster.

        >>> client.delete_global_cluster(global_cluster_identifier='myglobalcluster')
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.delete_global_cluster_message.DeleteGlobalClusterMessage]",
    ) -> OperationResponse[
        "capo_rds.types.delete_global_cluster_result.DeleteGlobalClusterResult"
    ]:
        import capo_rds._operations.amazon_rd_sv19.delete_global_cluster

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.delete_global_cluster.delete_global_cluster(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

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

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output