/AWS1/IF_SE2=>CREATETENANT()¶
About CreateTenant¶
Create a tenant.
Tenants are logical containers that group related SES resources together. Each tenant can have its own set of resources like email identities, configuration sets, and templates, along with reputation metrics and sending status. This helps isolate and manage email sending for different customers or business units within your Amazon SES API v2 account.
You can optionally specify SuppressionAttributes to configure tenant-level
suppression at creation time. When tenant-level suppression is enabled, Amazon SES maintains a
separate suppression list for the tenant instead of using the account-level suppression list.
Method Signature¶
METHODS /AWS1/IF_SE2~CREATETENANT
IMPORTING
!IV_TENANTNAME TYPE /AWS1/SE2TENANTNAME OPTIONAL
!IT_TAGS TYPE /AWS1/CL_SE2TAG=>TT_TAGLIST OPTIONAL
!IO_SUPPRESSIONATTRIBUTES TYPE REF TO /AWS1/CL_SE2TENANTSUPRSNATTRS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_se2createtenantrsp
RAISING
/AWS1/CX_SE2ALREADYEXISTSEX
/AWS1/CX_SE2BADREQUESTEX
/AWS1/CX_SE2LIMITEXCEEDEDEX
/AWS1/CX_SE2TOOMANYREQUESTSEX
/AWS1/CX_SE2CLIENTEXC
/AWS1/CX_SE2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_tenantname TYPE /AWS1/SE2TENANTNAME /AWS1/SE2TENANTNAME¶
The name of the tenant to create. The name can contain up to 64 alphanumeric characters, including letters, numbers, hyphens (-) and underscores (_) only.
Optional arguments:¶
it_tags TYPE /AWS1/CL_SE2TAG=>TT_TAGLIST TT_TAGLIST¶
An array of objects that define the tags (keys and values) to associate with the tenant
io_suppressionattributes TYPE REF TO /AWS1/CL_SE2TENANTSUPRSNATTRS /AWS1/CL_SE2TENANTSUPRSNATTRS¶
An object that contains information about the suppression list preferences for the tenant. Use this to configure tenant-level suppression at creation time.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_se2createtenantrsp /AWS1/CL_SE2CREATETENANTRSP¶
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->createtenant(
io_suppressionattributes = new /aws1/cl_se2tenantsuprsnattrs(
it_suppressedreasons = VALUE /aws1/cl_se2supionlistrsns_w=>tt_suppressionlistreasons(
( new /aws1/cl_se2supionlistrsns_w( |string| ) )
)
iv_suppressionscope = |string|
)
it_tags = VALUE /aws1/cl_se2tag=>tt_taglist(
(
new /aws1/cl_se2tag(
iv_key = |string|
iv_value = |string|
)
)
)
iv_tenantname = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_tenantname = lo_result->get_tenantname( ).
lv_tenantid = lo_result->get_tenantid( ).
lv_amazonresourcename = lo_result->get_tenantarn( ).
lv_timestamp = lo_result->get_createdtimestamp( ).
LOOP AT lo_result->get_tags( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_tagkey = lo_row_1->get_key( ).
lv_tagvalue = lo_row_1->get_value( ).
ENDIF.
ENDLOOP.
lv_sendingstatus = lo_result->get_sendingstatus( ).
lo_tenantsuppressionattrib = lo_result->get_suppressionattributes( ).
IF lo_tenantsuppressionattrib IS NOT INITIAL.
LOOP AT lo_tenantsuppressionattrib->get_suppressedreasons( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_suppressionlistreason = lo_row_3->get_value( ).
ENDIF.
ENDLOOP.
lv_suppressionlistscope = lo_tenantsuppressionattrib->get_suppressionscope( ).
ENDIF.
ENDIF.