Skip to content

delete_contact

delete_contact(
    contact_id: SsmContactsArn,
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
) -> DeleteContactResult

To remove a contact from Incident Manager, you can delete the contact. However, deleting a contact does not remove it from escalation plans and related response plans. Deleting an escalation plan also does not remove it from all related response plans. To modify an escalation plan, we recommend using the UpdateContact action to specify a different existing contact.

Parameters:

  • contact_id (SsmContactsArn) –

    The Amazon Resource Name (ARN) of the contact that you're deleting.

Raises:

Source code in docs_src/capo_ssm_contacts/_services/ssm_contacts.py
def delete_contact(
    self,
    contact_id: "capo_ssm_contacts.types.ssm_contacts_arn.SsmContactsArn",
    *,
    config_overrides: Optional[SSMContactsClientConfig] = None,
) -> "capo_ssm_contacts.types.delete_contact_result.DeleteContactResult":
    """<p>To remove a contact from Incident Manager, you can delete the contact. However, deleting a contact does not remove it from escalation plans and related response plans. Deleting an escalation plan also does not remove it from all related response plans. To modify an escalation plan, we recommend using the <a>UpdateContact</a> action to specify a different existing contact.</p>

    Args:
        contact_id: <p>The Amazon Resource Name (ARN) of the contact that you're deleting.</p>

    Raises:
        capo_ssm_contacts.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_contacts.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource causes an inconsistent state.</p>
        capo_ssm_contacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred while processing the request.</p>
        capo_ssm_contacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_ssm_contacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_contacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_contacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_ssm_contacts.types.delete_contact_request.DeleteContactRequest]",
    ) -> OperationResponse[
        "capo_ssm_contacts.types.delete_contact_result.DeleteContactResult"
    ]:
        import capo_ssm_contacts._operations.ssm_contacts.delete_contact

        output, http_response = (
            capo_ssm_contacts._operations.ssm_contacts.delete_contact.delete_contact(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteContact")
    )
    input_: capo_ssm_contacts.types.delete_contact_request.DeleteContactRequest = {
        "contact_id": contact_id
    }

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