/AWS1/IF_AAA=>CREATEENTITLEMENT()¶
About CreateEntitlement¶
Creates an entitlement (assignment) in account access manager. An entitlement (assignment) grants a principal (IAM Identity Center user or group) permission to assume a specified IAM role in an Amazon Web Services account. This operation is idempotent.
Method Signature¶
METHODS /AWS1/IF_AAA~CREATEENTITLEMENT
IMPORTING
!IV_APPLICATIONARN TYPE /AWS1/AAAAPPLICATIONARN OPTIONAL
!IO_ENTITLEMENT TYPE REF TO /AWS1/CL_AAAENTITLEMENT OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_aaacreateentresponse
RAISING
/AWS1/CX_AAAACCESSDENIEDEX
/AWS1/CX_AAACONFLICTEXCEPTION
/AWS1/CX_AAAINTERNALSERVEREX
/AWS1/CX_AAARESOURCENOTFOUNDEX
/AWS1/CX_AAASERVICEQUOTAEXCDEX
/AWS1/CX_AAATHROTTLINGEX
/AWS1/CX_AAAVLDTNEXCEPTION
/AWS1/CX_AAACLIENTEXC
/AWS1/CX_AAASERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_applicationarn TYPE /AWS1/AAAAPPLICATIONARN /AWS1/AAAAPPLICATIONARN¶
Specifies the ARN of the application to create the entitlement for.
io_entitlement TYPE REF TO /AWS1/CL_AAAENTITLEMENT /AWS1/CL_AAAENTITLEMENT¶
Specifies the entitlement configuration, including the principal and the IAM role to grant access to.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_aaacreateentresponse /AWS1/CL_AAACREATEENTRESPONSE¶
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->createentitlement(
io_entitlement = new /aws1/cl_aaaentitlement(
io_principalrole = new /aws1/cl_aaaprincipalroleent(
io_principal = new /aws1/cl_aaaprincipal(
io_identitycenter = new /aws1/cl_aaaidcenterprinc(
iv_groupid = |string|
iv_userid = |string|
)
)
iv_rolearn = |string|
)
)
iv_applicationarn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lv_string = lo_result->get_entitlementid( ).
ENDIF.