/AWS1/CL_IAM=>UPDATEROLE()
¶
About UpdateRole¶
Updates the description or maximum session duration setting of a role.
Method Signature¶
IMPORTING¶
Required arguments:¶
iv_rolename
TYPE /AWS1/IAMROLENAMETYPE
/AWS1/IAMROLENAMETYPE
¶
The name of the role that you want to modify.
Optional arguments:¶
iv_description
TYPE /AWS1/IAMROLEDESCRIPTIONTYPE
/AWS1/IAMROLEDESCRIPTIONTYPE
¶
The new description that you want to apply to the specified role.
iv_maxsessionduration
TYPE /AWS1/IAMROLEMAXSESSIONDURTYPE
/AWS1/IAMROLEMAXSESSIONDURTYPE
¶
The maximum session duration (in seconds) that you want to set for the specified role. If you do not specify a value for this setting, the default value of one hour is applied. This setting can have a value from 1 hour to 12 hours.
Anyone who assumes the role from the CLI or API can use the
DurationSeconds
API parameter or theduration-seconds
CLI parameter to request a longer session. TheMaxSessionDuration
setting determines the maximum duration that can be requested using theDurationSeconds
parameter. If users don't specify a value for theDurationSeconds
parameter, their security credentials are valid for one hour by default. This applies when you use theAssumeRole
API operations or theassume-role
CLI operations but does not apply when you use those operations to create a console URL. For more information, see Using IAM roles in the IAM User Guide.IAM role credentials provided by Amazon EC2 instances assigned to the role are not subject to the specified maximum session duration.
RETURNING¶
oo_output
TYPE REF TO /aws1/cl_iamupdateroleresponse
/AWS1/CL_IAMUPDATEROLERESPONSE
¶
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~updaterole(
iv_description = |string|
iv_maxsessionduration = 123
iv_rolename = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.