updateRoleAlias method
Updates a role alias.
Requires permission to access the UpdateRoleAlias action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
Parameter roleAlias :
The role alias to update.
Parameter credentialDurationSeconds :
The number of seconds the credential will be valid.
This value must be less than or equal to the maximum session duration of the IAM role that the role alias references.
Parameter roleArn :
The role ARN.
Implementation
Future<UpdateRoleAliasResponse> updateRoleAlias({
required String roleAlias,
int? credentialDurationSeconds,
String? roleArn,
}) async {
_s.validateNumRange(
'credentialDurationSeconds',
credentialDurationSeconds,
900,
43200,
);
final $payload = <String, dynamic>{
if (credentialDurationSeconds != null)
'credentialDurationSeconds': credentialDurationSeconds,
if (roleArn != null) 'roleArn': roleArn,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri: '/role-aliases/${Uri.encodeComponent(roleAlias)}',
exceptionFnMap: _exceptionFns,
);
return UpdateRoleAliasResponse.fromJson(response);
}