Skip to content

/AWS1/IF_IAM=>GETDELEGATIONREQUEST()

About GetDelegationRequest

Retrieves information about a specific delegation request.

If a delegation request has no owner or owner account, GetDelegationRequest for that delegation request can be called by any account. If the owner account is assigned but there is no owner id, only identities within that owner account can call GetDelegationRequest for the delegation request. Once the delegation request is fully owned, the owner of the request gets a default permission to get that delegation request. For more details, see Managing Permissions for Delegation Requests.

Method Signature

METHODS /AWS1/IF_IAM~GETDELEGATIONREQUEST
  IMPORTING
    !IV_DELEGATIONREQUESTID TYPE /AWS1/IAMDELEGATIONREQIDTYPE OPTIONAL
    !IV_DELEGATIONPERMISSIONCHECK TYPE /AWS1/IAMBOOLEANTYPE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_iamgetdelegationreq01
  RAISING
    /AWS1/CX_IAMNOSUCHENTITYEX
    /AWS1/CX_IAMSERVICEFAILUREEX
    /AWS1/CX_IAMCLIENTEXC
    /AWS1/CX_IAMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_delegationrequestid TYPE /AWS1/IAMDELEGATIONREQIDTYPE /AWS1/IAMDELEGATIONREQIDTYPE

The unique identifier of the delegation request to retrieve.

Optional arguments:

iv_delegationpermissioncheck TYPE /AWS1/IAMBOOLEANTYPE /AWS1/IAMBOOLEANTYPE

Specifies whether to perform a permission check for the delegation request.

If set to true, the GetDelegationRequest API call will start a permission check process. This process calculates whether the caller has sufficient permissions to cover the asks from this delegation request.

Setting this parameter to true does not guarantee an answer in the response. See the PermissionCheckStatus and the PermissionCheckResult response attributes for further details.

RETURNING

oo_output TYPE REF TO /aws1/cl_iamgetdelegationreq01 /AWS1/CL_IAMGETDELEGATIONREQ01

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

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->getdelegationrequest(
  iv_delegationpermissioncheck = ABAP_TRUE
  iv_delegationrequestid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_delegationrequest = lo_result->get_delegationrequest( ).
  IF lo_delegationrequest IS NOT INITIAL.
    lv_delegationrequestidtype = lo_delegationrequest->get_delegationrequestid( ).
    lv_accountidtype = lo_delegationrequest->get_owneraccountid( ).
    lv_delegationrequestdescri = lo_delegationrequest->get_description( ).
    lv_requestmessagetype = lo_delegationrequest->get_requestmessage( ).
    lo_delegationpermission = lo_delegationrequest->get_permissions( ).
    IF lo_delegationpermission IS NOT INITIAL.
      lv_arntype = lo_delegationpermission->get_policytemplatearn( ).
      LOOP AT lo_delegationpermission->get_parameters( ) into lo_row.
        lo_row_1 = lo_row.
        IF lo_row_1 IS NOT INITIAL.
          lv_policyparameternametype = lo_row_1->get_name( ).
          LOOP AT lo_row_1->get_values( ) into lo_row_2.
            lo_row_3 = lo_row_2.
            IF lo_row_3 IS NOT INITIAL.
              lv_policyparametervaluetyp = lo_row_3->get_value( ).
            ENDIF.
          ENDLOOP.
          lv_policyparametertypeenum = lo_row_1->get_type( ).
        ENDIF.
      ENDLOOP.
    ENDIF.
    lv_permissiontype = lo_delegationrequest->get_permissionpolicy( ).
    LOOP AT lo_delegationrequest->get_rolepermrestrictionarns( ) into lo_row_4.
      lo_row_5 = lo_row_4.
      IF lo_row_5 IS NOT INITIAL.
        lv_arntype = lo_row_5->get_value( ).
      ENDIF.
    ENDLOOP.
    lv_owneridtype = lo_delegationrequest->get_ownerid( ).
    lv_arntype = lo_delegationrequest->get_approverid( ).
    lv_statetype = lo_delegationrequest->get_state( ).
    lv_accountidtype = lo_delegationrequest->get_requestorid( ).
    lv_requestornametype = lo_delegationrequest->get_requestorname( ).
    lv_datetype = lo_delegationrequest->get_createdate( ).
    lv_sessiondurationtype = lo_delegationrequest->get_sessionduration( ).
    lv_redirecturltype = lo_delegationrequest->get_redirecturl( ).
    lv_notestype = lo_delegationrequest->get_notes( ).
    lv_notestype = lo_delegationrequest->get_rejectionreason( ).
    lv_booleantype = lo_delegationrequest->get_onlysendbyowner( ).
    lv_datetype = lo_delegationrequest->get_updatedtime( ).
  ENDIF.
  lv_permissioncheckstatusty = lo_result->get_permissioncheckstatus( ).
  lv_permissioncheckresultty = lo_result->get_permissioncheckresult( ).
ENDIF.