/AWS1/CL_IAM=>CREATEGROUP()
¶
About CreateGroup¶
Creates a new group.
For information about the number of groups you can create, see IAM and STS quotas in the IAM User Guide.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_groupname
TYPE /AWS1/IAMGROUPNAMETYPE
/AWS1/IAMGROUPNAMETYPE
¶
The name of the group to create. Do not include the path in this value.
IAM user, group, role, and policy names must be unique within the account. Names are not distinguished by case. For example, you cannot create resources named both "MyResource" and "myresource".
Optional arguments:¶
iv_path
TYPE /AWS1/IAMPATHTYPE
/AWS1/IAMPATHTYPE
¶
The path to the group. For more information about paths, see IAM identifiers in the IAM User Guide.
This parameter is optional. If it is not included, it defaults to a slash (/).
This parameter allows (through its regex pattern) a string of characters consisting of either a forward slash (/) by itself or a string that must begin and end with forward slashes. In addition, it can contain any ASCII character from the ! (
\u0021
) through the DEL character (\u007F
), including most punctuation characters, digits, and upper and lowercased letters.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_iamcreategrouprsp
/AWS1/CL_IAMCREATEGROUPRSP
¶
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->/aws1/if_iam~creategroup(
iv_groupname = |string|
iv_path = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
lo_group = lo_result->get_group( ).
IF lo_group IS NOT INITIAL.
lv_pathtype = lo_group->get_path( ).
lv_groupnametype = lo_group->get_groupname( ).
lv_idtype = lo_group->get_groupid( ).
lv_arntype = lo_group->get_arn( ).
lv_datetype = lo_group->get_createdate( ).
ENDIF.
ENDIF.
To create an IAM group¶
The following command creates an IAM group named Admins.
DATA(lo_result) = lo_client->/aws1/if_iam~creategroup( iv_groupname = |Admins| ) .