Skip to content

delete_response_plan

delete_response_plan(
    arn: Arn, *, config_overrides: Optional[SSMIncidentsClientConfig] = None
) -> DeleteResponsePlanOutput

Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge events from creating an incident with this response plan.

Parameters:

  • arn (Arn) –

    The Amazon Resource Name (ARN) of the response plan.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/ssm_incidents.py
def delete_response_plan(
    self,
    arn: "capo_ssm_incidents.types.arn.Arn",
    *,
    config_overrides: Optional[SSMIncidentsClientConfig] = None,
) -> (
    "capo_ssm_incidents.types.delete_response_plan_output.DeleteResponsePlanOutput"
):
    """<p>Deletes the specified response plan. Deleting a response plan stops all linked CloudWatch alarms and EventBridge events from creating an incident with this response plan.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) of the response plan.</p>

    Raises:
        capo_ssm_incidents.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_incidents.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_ssm_incidents.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_incidents.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_incidents.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_incidents.types.delete_response_plan_input.DeleteResponsePlanInput]",
    ) -> OperationResponse[
        "capo_ssm_incidents.types.delete_response_plan_output.DeleteResponsePlanOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.delete_response_plan

        output, http_response = (
            capo_ssm_incidents._operations.ssm_incidents.delete_response_plan.delete_response_plan(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteResponsePlan")
    )
    input_: capo_ssm_incidents.types.delete_response_plan_input.DeleteResponsePlanInput = {
        "arn": arn
    }

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