Skip to content

delete_email_contact

delete_email_contact(
    arn: EmailContactArn,
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> DeleteEmailContactResponse

Deletes an email contact.

Deleting an email contact removes it from all associated notification configurations.

Parameters:

  • arn (EmailContactArn) –

    The Amazon Resource Name (ARN) of the resource.

Raises:

Source code in docs_src/capo_notificationscontacts/_services/notifications_contacts.py
def delete_email_contact(
    self,
    arn: "capo_notificationscontacts.types.email_contact_arn.EmailContactArn",
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> "capo_notificationscontacts.types.delete_email_contact_response.DeleteEmailContactResponse":
    """<p>Deletes an email contact.</p> <note> <p>Deleting an email contact removes it from all associated notification configurations.</p> </note>

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

    Raises:
        capo_notificationscontacts.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_notificationscontacts.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_notificationscontacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_notificationscontacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Your request references a resource which does not exist. </p>
        capo_notificationscontacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_notificationscontacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_notificationscontacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_notificationscontacts.types.delete_email_contact_request.DeleteEmailContactRequest]",
    ) -> OperationResponse[
        "capo_notificationscontacts.types.delete_email_contact_response.DeleteEmailContactResponse"
    ]:
        import capo_notificationscontacts._operations.notifications_contacts.delete_email_contact

        output, http_response = (
            capo_notificationscontacts._operations.notifications_contacts.delete_email_contact.delete_email_contact(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEmailContact")
    )
    input_: capo_notificationscontacts.types.delete_email_contact_request.DeleteEmailContactRequest = {
        "arn": arn
    }

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