Skip to content

delete_db_shard_group async

delete_db_shard_group(
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_shard_group_identifier: Optional[DBShardGroupIdentifier] = None,
) -> DBShardGroup

Deletes an Aurora Limitless Database DB shard group.

Parameters:

Raises:

Source code in docs_src/capo_rds/_services/async_rds.py
async def delete_db_shard_group(
    self,
    *,
    config_overrides: Optional[AsyncRDSClientConfig] = None,
    db_shard_group_identifier: Optional[
        "capo_rds.types.db_shard_group_identifier.DBShardGroupIdentifier"
    ] = None,
) -> "capo_rds.types.db_shard_group.DBShardGroup":
    """<p>Deletes an Aurora Limitless Database DB shard group.</p>

    Args:
        db_shard_group_identifier: <p>The name of the DB shard group to delete.</p>

    Raises:
        capo_rds.errors.db_shard_group_not_found_fault.DBShardGroupNotFoundFault: <p>The specified DB shard group name wasn't found.</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_db_shard_group_state_fault.InvalidDBShardGroupStateFault: <p>The DB shard group must be in the available state.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_rds.types.delete_db_shard_group_message.DeleteDBShardGroupMessage]",
    ) -> AsyncOperationResponse["capo_rds.types.db_shard_group.DBShardGroup"]:
        import capo_rds._operations.amazon_rd_sv19.delete_db_shard_group

        (
            output,
            http_response,
        ) = await capo_rds._operations.amazon_rd_sv19.delete_db_shard_group.async_delete_db_shard_group(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDBShardGroup")
    )
    input_: capo_rds.types.delete_db_shard_group_message.DeleteDBShardGroupMessage = {}
    if db_shard_group_identifier is not None:
        input_["db_shard_group_identifier"] = db_shard_group_identifier

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