/AWS1/IF_GRF=>UPDATEPERMISSIONS()¶
About UpdatePermissions¶
Updates which users in a workspace have the Grafana Admin or
Editor roles.
Method Signature¶
METHODS /AWS1/IF_GRF~UPDATEPERMISSIONS
IMPORTING
!IT_UPDATEINSTRUCTIONBATCH TYPE /AWS1/CL_GRFUPDATEINSTRUCTION=>TT_UPDATEINSTRUCTIONBATCH OPTIONAL
!IV_WORKSPACEID TYPE /AWS1/GRFWORKSPACEID OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_grfupdatepermsrsp
RAISING
/AWS1/CX_GRFACCESSDENIEDEX
/AWS1/CX_GRFINTERNALSERVEREX
/AWS1/CX_GRFRESOURCENOTFOUNDEX
/AWS1/CX_GRFTHROTTLINGEX
/AWS1/CX_GRFVALIDATIONEX
/AWS1/CX_GRFCLIENTEXC
/AWS1/CX_GRFSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
it_updateinstructionbatch TYPE /AWS1/CL_GRFUPDATEINSTRUCTION=>TT_UPDATEINSTRUCTIONBATCH TT_UPDATEINSTRUCTIONBATCH¶
An array of structures that contain the permission updates to make.
iv_workspaceid TYPE /AWS1/GRFWORKSPACEID /AWS1/GRFWORKSPACEID¶
The ID of the workspace to update.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_grfupdatepermsrsp /AWS1/CL_GRFUPDATEPERMSRSP¶
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->updatepermissions(
it_updateinstructionbatch = VALUE /aws1/cl_grfupdateinstruction=>tt_updateinstructionbatch(
(
new /aws1/cl_grfupdateinstruction(
it_users = VALUE /aws1/cl_grfuser=>tt_userlist(
(
new /aws1/cl_grfuser(
iv_id = |string|
iv_type = |string|
)
)
)
iv_action = |string|
iv_role = |string|
)
)
)
iv_workspaceid = |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_errors( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lv_integer = lo_row_1->get_code( ).
lv_string = lo_row_1->get_message( ).
lo_updateinstruction = lo_row_1->get_causedby( ).
IF lo_updateinstruction IS NOT INITIAL.
lv_updateaction = lo_updateinstruction->get_action( ).
lv_role = lo_updateinstruction->get_role( ).
LOOP AT lo_updateinstruction->get_users( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_ssoid = lo_row_3->get_id( ).
lv_usertype = lo_row_3->get_type( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.