Returns an email contact.
Parameters:
-
arn
(EmailContactArn)
–
The Amazon Resource Name (ARN) of the email contact to get.
Raises:
Source code in docs_src/capo_notificationscontacts/_services/notifications_contacts.py
| def get_email_contact(
self,
arn: "capo_notificationscontacts.types.email_contact_arn.EmailContactArn",
*,
config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> "capo_notificationscontacts.types.get_email_contact_response.GetEmailContactResponse":
"""<p>Returns an email contact.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the email contact to get.</p>
Raises:
capo_notificationscontacts.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</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.get_email_contact_request.GetEmailContactRequest]",
) -> OperationResponse[
"capo_notificationscontacts.types.get_email_contact_response.GetEmailContactResponse"
]:
import capo_notificationscontacts._operations.notifications_contacts.get_email_contact
output, http_response = (
capo_notificationscontacts._operations.notifications_contacts.get_email_contact.get_email_contact(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_notificationscontacts.types.get_email_contact_response.GetEmailContactResponse",
) -> dict[str, Any]:
import capo_notificationscontacts.types.get_email_contact_response
return capo_notificationscontacts.types.get_email_contact_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("GetEmailContact", redact_output=_redact_output),
)
input_: capo_notificationscontacts.types.get_email_contact_request.GetEmailContactRequest = {
"arn": arn
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|