update_role
async
¶
update_role(
role_name: roleNameType,
*,
config_overrides: Optional[AsyncIAMClientConfig] = None,
description: Optional[roleDescriptionType] = None,
max_session_duration: Optional[roleMaxSessionDurationType] = None,
) -> UpdateRoleResponse
Updates the description or maximum session duration setting of a role.
Parameters:
-
role_name(roleNameType) –The name of the role that you want to modify.
-
description(Optional[roleDescriptionType], default:None) –The new description that you want to apply to the specified role.
-
max_session_duration(Optional[roleMaxSessionDurationType], default:None) –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
DurationSecondsAPI parameter or theduration-secondsCLI parameter to request a longer session. TheMaxSessionDurationsetting determines the maximum duration that can be requested using theDurationSecondsparameter. If users don't specify a value for theDurationSecondsparameter, 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.
Raises:
-
NoSuchEntityException–The request was rejected because it referenced a resource entity that does not exist. The error message describes the resource.
-
ServiceFailureException–The request processing has failed because of an unknown error, exception or failure.
-
UnmodifiableEntityException–The request was rejected because service-linked roles are protected Amazon Web Services resources. Only the service that depends on the service-linked role can modify or delete the role on your behalf. The error message includes the name of the service that depends on this service-linked role. You must request the change through that service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_iam/_services/async_iam.py
10974 10975 10976 10977 10978 10979 10980 10981 10982 10983 10984 10985 10986 10987 10988 10989 10990 10991 10992 10993 10994 10995 10996 10997 10998 10999 11000 11001 11002 11003 11004 11005 11006 11007 11008 11009 11010 11011 11012 11013 11014 11015 11016 11017 11018 11019 11020 11021 11022 11023 11024 11025 11026 11027 11028 11029 11030 11031 11032 | |