AssociateEmailIdentityCertificate
Associates an S/MIME certificate with an email identity. After the certificate is active, Amazon SES API v2 can add an S/MIME signature to messages that you send from the associated address when signing is enabled on the configuration set used to send the message.
The certificate is an X.509 certificate that you manage in AWS Certificate Manager (ACM). You identify it by its Amazon Resource Name (ARN).
-
If the email identity is a domain, you must specify a
FromAddressthat belongs to that domain or one of its subdomains. The certificate applies to messages sent from that address. -
If the email identity is an email address,
FromAddressis optional. If you specify it, it must exactly match the email identity.
When the association is created, the certificate begins provisioning and its status is
PROVISIONING. The status changes to ACTIVE when the certificate
is ready to use for signing. Each email address can have only one certificate
association. If an association already exists for the address, this operation returns an
error, unless the existing association is in the DEPROVISIONING state.
Request Syntax
POST /v2/email/identity/certificates HTTP/1.1
Content-type: application/json
{
"CertificateArn": "string",
"EmailIdentity": "string",
"FromAddress": "string"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- CertificateArn
-
The Amazon Resource Name (ARN) of the AWS Certificate Manager (ACM) certificate to associate with the email identity.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:[\w+=/,.@-]+:[\w+=/,.@-]+:[\w+=/,.@-]*:[0-9]+:certificate/[\w+=,.@-]+Required: Yes
- EmailIdentity
-
The email identity, either an email address or a domain, to associate the certificate with.
Type: String
Length Constraints: Minimum length of 1.
Required: Yes
- FromAddress
-
The email address that the certificate applies to. This value is required when the email identity is a domain, and the address must belong to that domain or one of its subdomains. When the email identity is an email address, this value is optional. If you specify it, it must exactly match the email identity.
Type: String
Required: No
Response Syntax
HTTP/1.1 200
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- AlreadyExistsException
-
The resource specified in your request already exists.
HTTP Status Code: 400
- BadRequestException
-
The input you provided is invalid.
HTTP Status Code: 400
- NotFoundException
-
The resource you attempted to access doesn't exist.
HTTP Status Code: 404
- TooManyRequestsException
-
Too many requests have been made to the operation.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: