/AWS1/IF_LIC=>CREATEGRANT()¶
About CreateGrant¶
Creates a grant for the specified license. A grant shares the use of license entitlements with a specific Amazon Web Services account, an organization, or an organizational unit (OU). For more information, see Granted licenses in License Manager in the License Manager User Guide.
Method Signature¶
METHODS /AWS1/IF_LIC~CREATEGRANT
  IMPORTING
    !IV_CLIENTTOKEN TYPE /AWS1/LICCLIENTTOKEN OPTIONAL
    !IV_GRANTNAME TYPE /AWS1/LICSTRING OPTIONAL
    !IV_LICENSEARN TYPE /AWS1/LICARN OPTIONAL
    !IT_PRINCIPALS TYPE /AWS1/CL_LICPRINCIPALARNLIST_W=>TT_PRINCIPALARNLIST OPTIONAL
    !IV_HOMEREGION TYPE /AWS1/LICSTRING OPTIONAL
    !IT_ALLOWEDOPERATIONS TYPE /AWS1/CL_LICALLOWEDOPLIST_W=>TT_ALLOWEDOPERATIONLIST OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_LICTAG=>TT_TAGLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_liccreategrantrsp
  RAISING
    /AWS1/CX_LICACCESSDENIEDEX
    /AWS1/CX_LICAUTHEXCEPTION
    /AWS1/CX_LICINVPARAMVALUEEX
    /AWS1/CX_LICRLIMEXCEEDEDEX
    /AWS1/CX_LICRESRCLIMITEXCDEX
    /AWS1/CX_LICSERVERINTERNALEX
    /AWS1/CX_LICVALIDATIONEX
    /AWS1/CX_LICCLIENTEXC
    /AWS1/CX_LICSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_clienttoken TYPE /AWS1/LICCLIENTTOKEN /AWS1/LICCLIENTTOKEN¶
Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
iv_grantname TYPE /AWS1/LICSTRING /AWS1/LICSTRING¶
Grant name.
iv_licensearn TYPE /AWS1/LICARN /AWS1/LICARN¶
Amazon Resource Name (ARN) of the license.
it_principals TYPE /AWS1/CL_LICPRINCIPALARNLIST_W=>TT_PRINCIPALARNLIST TT_PRINCIPALARNLIST¶
The grant principals. You can specify one of the following as an Amazon Resource Name (ARN):
An Amazon Web Services account, which includes only the account specified.
An organizational unit (OU), which includes all accounts in the OU.
An organization, which will include all accounts across your organization.
iv_homeregion TYPE /AWS1/LICSTRING /AWS1/LICSTRING¶
Home Region of the grant.
it_allowedoperations TYPE /AWS1/CL_LICALLOWEDOPLIST_W=>TT_ALLOWEDOPERATIONLIST TT_ALLOWEDOPERATIONLIST¶
Allowed operations for the grant.
Optional arguments:¶
it_tags TYPE /AWS1/CL_LICTAG=>TT_TAGLIST TT_TAGLIST¶
Tags to add to the grant. For more information about tagging support in License Manager, see the TagResource operation.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_liccreategrantrsp /AWS1/CL_LICCREATEGRANTRSP¶
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->creategrant(
  it_allowedoperations = VALUE /aws1/cl_licallowedoplist_w=>tt_allowedoperationlist(
    ( new /aws1/cl_licallowedoplist_w( |string| ) )
  )
  it_principals = VALUE /aws1/cl_licprincipalarnlist_w=>tt_principalarnlist(
    ( new /aws1/cl_licprincipalarnlist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_lictag=>tt_taglist(
    (
      new /aws1/cl_lictag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_clienttoken = |string|
  iv_grantname = |string|
  iv_homeregion = |string|
  iv_licensearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_arn = lo_result->get_grantarn( ).
  lv_grantstatus = lo_result->get_status( ).
  lv_string = lo_result->get_version( ).
ENDIF.