/AWS1/IF_CGP=>UPDATEGROUP()¶
About UpdateGroup¶
Given the name of a user pool group, updates any of the properties for precedence, IAM role, or description. For more information about user pool groups, see Adding groups to a user pool.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
Method Signature¶
METHODS /AWS1/IF_CGP~UPDATEGROUP
IMPORTING
!IV_GROUPNAME TYPE /AWS1/CGPGROUPNAMETYPE OPTIONAL
!IV_USERPOOLID TYPE /AWS1/CGPUSERPOOLIDTYPE OPTIONAL
!IV_DESCRIPTION TYPE /AWS1/CGPDESCRIPTIONTYPE OPTIONAL
!IV_ROLEARN TYPE /AWS1/CGPARNTYPE OPTIONAL
!IV_PRECEDENCE TYPE /AWS1/CGPPRECEDENCETYPE OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_cgpupdategrouprsp
RAISING
/AWS1/CX_CGPINTERNALERROREX
/AWS1/CX_CGPINVALIDPARAMETEREX
/AWS1/CX_CGPNOTAUTHORIZEDEX
/AWS1/CX_CGPRESOURCENOTFOUNDEX
/AWS1/CX_CGPTOOMANYREQUESTSEX
/AWS1/CX_CGPCLIENTEXC
/AWS1/CX_CGPSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_groupname TYPE /AWS1/CGPGROUPNAMETYPE /AWS1/CGPGROUPNAMETYPE¶
The name of the group that you want to update.
iv_userpoolid TYPE /AWS1/CGPUSERPOOLIDTYPE /AWS1/CGPUSERPOOLIDTYPE¶
The ID of the user pool that contains the group you want to update.
Optional arguments:¶
iv_description TYPE /AWS1/CGPDESCRIPTIONTYPE /AWS1/CGPDESCRIPTIONTYPE¶
A new description of the existing group.
iv_rolearn TYPE /AWS1/CGPARNTYPE /AWS1/CGPARNTYPE¶
The Amazon Resource Name (ARN) of an IAM role that you want to associate with the group. The role assignment contributes to the
cognito:rolesandcognito:preferred_roleclaims in group members' tokens.
iv_precedence TYPE /AWS1/CGPPRECEDENCETYPE /AWS1/CGPPRECEDENCETYPE¶
A non-negative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower
Precedencevalues take precedence over groups with higher or nullPrecedencevalues. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN is given in the user's tokens for thecognito:rolesandcognito:preferred_roleclaims.Two groups can have the same
Precedencevalue. If this happens, neither group takes precedence over the other. If two groups with the samePrecedencehave the same role ARN, that role is used in thecognito:preferred_roleclaim in tokens for users in each group. If the two groups have different role ARNs, thecognito:preferred_roleclaim isn't set in users' tokens.The default
Precedencevalue is null. The maximumPrecedencevalue is2^31-1.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_cgpupdategrouprsp /AWS1/CL_CGPUPDATEGROUPRSP¶
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->updategroup(
iv_description = |string|
iv_groupname = |string|
iv_precedence = 123
iv_rolearn = |string|
iv_userpoolid = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_grouptype = lo_result->get_group( ).
IF lo_grouptype IS NOT INITIAL.
lv_groupnametype = lo_grouptype->get_groupname( ).
lv_userpoolidtype = lo_grouptype->get_userpoolid( ).
lv_descriptiontype = lo_grouptype->get_description( ).
lv_arntype = lo_grouptype->get_rolearn( ).
lv_precedencetype = lo_grouptype->get_precedence( ).
lv_datetype = lo_grouptype->get_lastmodifieddate( ).
lv_datetype = lo_grouptype->get_creationdate( ).
ENDIF.
ENDIF.