Skip to content

/AWS1/IF_SE2=>ASSOCIATEEMAILIDENTITYCERT()

About 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 Certificate Manager (ACM). You identify it by its Amazon Resource Name (ARN).

  • If the email identity is a domain, you must specify a FromAddress that 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, FromAddress is 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.

Method Signature

METHODS /AWS1/IF_SE2~ASSOCIATEEMAILIDENTITYCERT
  IMPORTING
    !IV_EMAILIDENTITY TYPE /AWS1/SE2IDENTITY OPTIONAL
    !IV_FROMADDRESS TYPE /AWS1/SE2EMAILADDRESS OPTIONAL
    !IV_CERTIFICATEARN TYPE /AWS1/SE2CERTIFICATEARN OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_se2assocmailidcertrsp
  RAISING
    /AWS1/CX_SE2ALREADYEXISTSEX
    /AWS1/CX_SE2BADREQUESTEX
    /AWS1/CX_SE2NOTFOUNDEXCEPTION
    /AWS1/CX_SE2TOOMANYREQUESTSEX
    /AWS1/CX_SE2CLIENTEXC
    /AWS1/CX_SE2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_emailidentity TYPE /AWS1/SE2IDENTITY /AWS1/SE2IDENTITY

The email identity, either an email address or a domain, to associate the certificate with.

iv_certificatearn TYPE /AWS1/SE2CERTIFICATEARN /AWS1/SE2CERTIFICATEARN

The Amazon Resource Name (ARN) of the Certificate Manager (ACM) certificate to associate with the email identity.

Optional arguments:

iv_fromaddress TYPE /AWS1/SE2EMAILADDRESS /AWS1/SE2EMAILADDRESS

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.

RETURNING

oo_output TYPE REF TO /aws1/cl_se2assocmailidcertrsp /AWS1/CL_SE2ASSOCMAILIDCERTRSP

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->associateemailidentitycert(
  iv_certificatearn = |string|
  iv_emailidentity = |string|
  iv_fromaddress = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.