Skip to content

delete_email_contact async

delete_email_contact(
    arn: EmailContactArn,
    *,
    config_overrides: Optional[AsyncNotificationsContactsClientConfig] = 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/async_notifications_contacts.py
async def delete_email_contact(
    self,
    arn: "capo_notificationscontacts.types.email_contact_arn.EmailContactArn",
    *,
    config_overrides: Optional[AsyncNotificationsContactsClientConfig] = 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.
    """

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

        (
            output,
            http_response,
        ) = await capo_notificationscontacts._operations.notifications_contacts.delete_email_contact.async_delete_email_contact(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output