/AWS1/IF_IOS=>LISTACCESSPOLICIES()¶
About ListAccessPolicies¶
Retrieves a paginated list of access policies for an identity (an IAM Identity Center user, an IAM Identity Center group, or an IAM user) or an IoT SiteWise Monitor resource (a portal or project).
Method Signature¶
METHODS /AWS1/IF_IOS~LISTACCESSPOLICIES
IMPORTING
!IV_IDENTITYTYPE TYPE /AWS1/IOSIDENTITYTYPE OPTIONAL
!IV_IDENTITYID TYPE /AWS1/IOSIDENTITYID OPTIONAL
!IV_RESOURCETYPE TYPE /AWS1/IOSRESOURCETYPE OPTIONAL
!IV_RESOURCEID TYPE /AWS1/IOSID OPTIONAL
!IV_IAMARN TYPE /AWS1/IOSIAMARN OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/IOSNEXTTOKEN OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/IOSMAXRESULTS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ioslistaccesspolrsp
RAISING
/AWS1/CX_IOSINTERNALFAILUREEX
/AWS1/CX_IOSINVALIDREQUESTEX
/AWS1/CX_IOSTHROTTLINGEX
/AWS1/CX_IOSCLIENTEXC
/AWS1/CX_IOSSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Optional arguments:¶
iv_identitytype TYPE /AWS1/IOSIDENTITYTYPE /AWS1/IOSIDENTITYTYPE¶
The type of identity (IAM Identity Center user, IAM Identity Center group, or IAM user). This parameter is required if you specify
identityId.
iv_identityid TYPE /AWS1/IOSIDENTITYID /AWS1/IOSIDENTITYID¶
The ID of the identity. This parameter is required if you specify
USERorGROUPforidentityType.
iv_resourcetype TYPE /AWS1/IOSRESOURCETYPE /AWS1/IOSRESOURCETYPE¶
The type of resource (portal or project). This parameter is required if you specify
resourceId.
iv_resourceid TYPE /AWS1/IOSID /AWS1/IOSID¶
The ID of the resource. This parameter is required if you specify
resourceType.
iv_iamarn TYPE /AWS1/IOSIAMARN /AWS1/IOSIAMARN¶
The ARN of the IAM user. For more information, see IAM ARNs in the IAM User Guide. This parameter is required if you specify
IAMforidentityType.
iv_nexttoken TYPE /AWS1/IOSNEXTTOKEN /AWS1/IOSNEXTTOKEN¶
The token to be used for the next set of paginated results.
iv_maxresults TYPE /AWS1/IOSMAXRESULTS /AWS1/IOSMAXRESULTS¶
The maximum number of results to return for each paginated request.
Default: 50
RETURNING¶
oo_output TYPE REF TO /aws1/cl_ioslistaccesspolrsp /AWS1/CL_IOSLISTACCESSPOLRSP¶
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->listaccesspolicies(
iv_iamarn = |string|
iv_identityid = |string|
iv_identitytype = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_resourceid = |string|
iv_resourcetype = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
LOOP AT lo_result->get_accesspolicysummaries( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_id = lo_row_1->get_id( ).
lo_identity = lo_row_1->get_identity( ).
IF lo_identity IS NOT INITIAL.
lo_useridentity = lo_identity->get_user( ).
IF lo_useridentity IS NOT INITIAL.
lv_identityid = lo_useridentity->get_id( ).
ENDIF.
lo_groupidentity = lo_identity->get_group( ).
IF lo_groupidentity IS NOT INITIAL.
lv_identityid = lo_groupidentity->get_id( ).
ENDIF.
lo_iamuseridentity = lo_identity->get_iamuser( ).
IF lo_iamuseridentity IS NOT INITIAL.
lv_iamarn = lo_iamuseridentity->get_arn( ).
ENDIF.
lo_iamroleidentity = lo_identity->get_iamrole( ).
IF lo_iamroleidentity IS NOT INITIAL.
lv_iamarn = lo_iamroleidentity->get_arn( ).
ENDIF.
ENDIF.
lo_resource = lo_row_1->get_resource( ).
IF lo_resource IS NOT INITIAL.
lo_portalresource = lo_resource->get_portal( ).
IF lo_portalresource IS NOT INITIAL.
lv_id = lo_portalresource->get_id( ).
ENDIF.
lo_projectresource = lo_resource->get_project( ).
IF lo_projectresource IS NOT INITIAL.
lv_id = lo_projectresource->get_id( ).
ENDIF.
ENDIF.
lv_permission = lo_row_1->get_permission( ).
lv_timestamp = lo_row_1->get_creationdate( ).
lv_timestamp = lo_row_1->get_lastupdatedate( ).
ENDIF.
ENDLOOP.
lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.