Verifies an email identity for use with Amazon Pinpoint. In Amazon Pinpoint, an identity is an email address or domain that you use when you send email. Before you can use an identity to send email with Amazon Pinpoint, you first have to verify it. By verifying an address, you demonstrate that you're the owner of the address, and that you've given Amazon Pinpoint permission to send email from the address.
When you verify an email address, Amazon Pinpoint sends an email to the address. Your email address is verified as soon as you follow the link in the verification email.
When you verify a domain, this operation provides a set of DKIM tokens, which you can convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your domain. Your domain is verified when Amazon Pinpoint detects these records in the DNS configuration for your domain. It usually takes around 72 hours to complete the domain verification process.
Parameters:
-
email_identity
(Identity)
–
The email address or domain that you want to verify.
-
tags
(Optional[TagList], default:
None
)
–
An array of objects that define the tags (keys and values) that you want to associate with the email identity.
Raises:
Source code in docs_src/capo_pinpoint_email/_services/pinpoint_email.py
| def create_email_identity(
self,
email_identity: "capo_pinpoint_email.types.identity.Identity",
*,
config_overrides: Optional[PinpointEmailClientConfig] = None,
tags: Optional["capo_pinpoint_email.types.tag_list.TagList"] = None,
) -> "capo_pinpoint_email.types.create_email_identity_response.CreateEmailIdentityResponse":
"""<p>Verifies an email identity for use with Amazon Pinpoint. In Amazon Pinpoint, an identity is an email address or domain that you use when you send email. Before you can use an identity to send email with Amazon Pinpoint, you first have to verify it. By verifying an address, you demonstrate that you're the owner of the address, and that you've given Amazon Pinpoint permission to send email from the address.</p> <p>When you verify an email address, Amazon Pinpoint sends an email to the address. Your email address is verified as soon as you follow the link in the verification email. </p> <p>When you verify a domain, this operation provides a set of DKIM tokens, which you can convert into CNAME tokens. You add these CNAME tokens to the DNS configuration for your domain. Your domain is verified when Amazon Pinpoint detects these records in the DNS configuration for your domain. It usually takes around 72 hours to complete the domain verification process.</p>
Args:
email_identity: <p>The email address or domain that you want to verify.</p>
tags: <p>An array of objects that define the tags (keys and values) that you want to associate with the email identity.</p>
Raises:
capo_pinpoint_email.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_pinpoint_email.errors.concurrent_modification_exception.ConcurrentModificationException: <p>The resource is being modified by another operation or thread.</p>
capo_pinpoint_email.errors.limit_exceeded_exception.LimitExceededException: <p>There are too many instances of the specified resource type.</p>
capo_pinpoint_email.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_pinpoint_email.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_pinpoint_email.types.create_email_identity_request.CreateEmailIdentityRequest]",
) -> OperationResponse[
"capo_pinpoint_email.types.create_email_identity_response.CreateEmailIdentityResponse"
]:
import capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_email_identity
output, http_response = (
capo_pinpoint_email._operations.amazon_pinpoint_email_service.create_email_identity.create_email_identity(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateEmailIdentity")
)
input_: capo_pinpoint_email.types.create_email_identity_request.CreateEmailIdentityRequest = {
"email_identity": email_identity
}
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|