Skip to content

delete_db_cluster_parameter_group async

delete_db_cluster_parameter_group(
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_parameter_group_name: Optional[String] = None,
) -> None

Deletes a specified DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated with any DB clusters.

Parameters:

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

    The name of the DB cluster parameter group.

    Constraints:

    • Must be the name of an existing DB cluster parameter group.

    • You can't delete a default DB cluster parameter group.

    • Cannot be associated with any DB clusters.

Raises:

  • DBParameterGroupNotFoundFault –

    DBParameterGroupName does not refer to an existing DB parameter group.

  • InvalidDBParameterGroupStateFault –

    The DB parameter group is in use or is in an invalid state. If you are attempting to delete the parameter group, you cannot delete it when the parameter group is in this state.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_neptune/_services/async_neptune.py
async def delete_db_cluster_parameter_group(
    self,
    *,
    config_overrides: Optional[AsyncNeptuneClientConfig] = None,
    db_cluster_parameter_group_name: Optional[
        "capo_neptune.types.string.String"
    ] = None,
) -> None:
    """<p>Deletes a specified DB cluster parameter group. The DB cluster parameter group to be deleted can't be associated with any DB clusters.</p>

    Args:
        db_cluster_parameter_group_name: <p>The name of the DB cluster parameter group.</p> <p>Constraints:</p> <ul> <li> <p>Must be the name of an existing DB cluster parameter group.</p> </li> <li> <p>You can't delete a default DB cluster parameter group.</p> </li> <li> <p>Cannot be associated with any DB clusters.</p> </li> </ul>

    Raises:
        capo_neptune.errors.db_parameter_group_not_found_fault.DBParameterGroupNotFoundFault: <p> <i>DBParameterGroupName</i> does not refer to an existing DB parameter group.</p>
        capo_neptune.errors.invalid_db_parameter_group_state_fault.InvalidDBParameterGroupStateFault: <p>The DB parameter group is in use or is in an invalid state. If you are attempting to delete the parameter group, you cannot delete it when the parameter group is in this state.</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_db_cluster_parameter_group_message.DeleteDBClusterParameterGroupMessage]",
    ) -> AsyncOperationResponse[None]:
        import capo_neptune._operations.amazon_rd_sv19.delete_db_cluster_parameter_group

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDBClusterParameterGroup")
    )
    input_: capo_neptune.types.delete_db_cluster_parameter_group_message.DeleteDBClusterParameterGroupMessage = {}
    if db_cluster_parameter_group_name is not None:
        input_["db_cluster_parameter_group_name"] = db_cluster_parameter_group_name

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