Skip to content

delete_db_parameter_group

delete_db_parameter_group(
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_parameter_group_name: Optional[String] = None,
) -> None

Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted can't be associated with any DB instances.

Parameters:

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

    The name of the DB parameter group.

    Constraints:

    • Must be the name of an existing DB parameter group

    • You can't delete a default DB parameter group

    • Cannot be associated with any DB instances

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/neptune.py
def delete_db_parameter_group(
    self,
    *,
    config_overrides: Optional[NeptuneClientConfig] = None,
    db_parameter_group_name: Optional["capo_neptune.types.string.String"] = None,
) -> None:
    """<p>Deletes a specified DBParameterGroup. The DBParameterGroup to be deleted can't be associated with any DB instances.</p>

    Args:
        db_parameter_group_name: <p>The name of the DB parameter group.</p> <p>Constraints:</p> <ul> <li> <p>Must be the name of an existing DB parameter group</p> </li> <li> <p>You can't delete a default DB parameter group</p> </li> <li> <p>Cannot be associated with any DB instances</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.
    """

    def _handler(
        req: "OperationRequest[capo_neptune.types.delete_db_parameter_group_message.DeleteDBParameterGroupMessage]",
    ) -> OperationResponse[None]:
        import capo_neptune._operations.amazon_rd_sv19.delete_db_parameter_group

        output, http_response = (
            capo_neptune._operations.amazon_rd_sv19.delete_db_parameter_group.delete_db_parameter_group(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteDBParameterGroup")
    )
    input_: capo_neptune.types.delete_db_parameter_group_message.DeleteDBParameterGroupMessage = {}
    if db_parameter_group_name is not None:
        input_["db_parameter_group_name"] = db_parameter_group_name

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