Skip to content

/AWS1/IF_AAA=>GETENTITLEMENT()

About GetEntitlement

Retrieves details about a specific entitlement for an account access manager application, including the principal, IAM role, and target account.

Method Signature

METHODS /AWS1/IF_AAA~GETENTITLEMENT
  IMPORTING
    !IV_APPLICATIONARN TYPE /AWS1/AAAAPPLICATIONARN OPTIONAL
    !IV_ENTITLEMENTID TYPE /AWS1/AAASTRING OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_aaagetentresponse
  RAISING
    /AWS1/CX_AAAACCESSDENIEDEX
    /AWS1/CX_AAAINTERNALSERVEREX
    /AWS1/CX_AAARESOURCENOTFOUNDEX
    /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 that the entitlement belongs to.

iv_entitlementid TYPE /AWS1/AAASTRING /AWS1/AAASTRING

Specifies the unique identifier of the entitlement to retrieve.

RETURNING

oo_output TYPE REF TO /aws1/cl_aaagetentresponse /AWS1/CL_AAAGETENTRESPONSE

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->getentitlement(
  iv_applicationarn = |string|
  iv_entitlementid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_applicationarn = lo_result->get_applicationarn( ).
  lv_string = lo_result->get_entitlementid( ).
  lo_entitlementdetails = lo_result->get_entitlement( ).
  IF lo_entitlementdetails IS NOT INITIAL.
    lo_principalroleentitlemen = lo_entitlementdetails->get_principalrole( ).
    IF lo_principalroleentitlemen IS NOT INITIAL.
      lo_principal = lo_principalroleentitlemen->get_principal( ).
      IF lo_principal IS NOT INITIAL.
        lo_identitycenterprincipal = lo_principal->get_identitycenter( ).
        IF lo_identitycenterprincipal IS NOT INITIAL.
          lv_userid = lo_identitycenterprincipal->get_userid( ).
          lv_groupid = lo_identitycenterprincipal->get_groupid( ).
        ENDIF.
      ENDIF.
      lv_rolearn = lo_principalroleentitlemen->get_rolearn( ).
      lv_account = lo_principalroleentitlemen->get_account( ).
      lv_string = lo_principalroleentitlemen->get_accountname( ).
    ENDIF.
  ENDIF.
  lv_datetime = lo_result->get_createdat( ).
ENDIF.