updateRoleDescription method

Future<UpdateRoleDescriptionResponse> updateRoleDescription({
  1. required String description,
  2. required String roleName,
})

Use UpdateRole instead.

Modifies only the description of a role. This operation performs the same function as the Description parameter in the UpdateRole operation.

May throw NoSuchEntityException. May throw UnmodifiableEntityException. May throw ServiceFailureException.

Parameter description : The new description that you want to apply to the specified role.

Parameter roleName : The name of the role that you want to modify.

Implementation

Future<UpdateRoleDescriptionResponse> updateRoleDescription({
  required String description,
  required String roleName,
}) async {
  ArgumentError.checkNotNull(description, 'description');
  _s.validateStringLength(
    'description',
    description,
    0,
    1000,
    isRequired: true,
  );
  ArgumentError.checkNotNull(roleName, 'roleName');
  _s.validateStringLength(
    'roleName',
    roleName,
    1,
    64,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['Description'] = description;
  $request['RoleName'] = roleName;
  final $result = await _protocol.send(
    $request,
    action: 'UpdateRoleDescription',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['UpdateRoleDescriptionRequest'],
    shapes: shapes,
    resultWrapper: 'UpdateRoleDescriptionResult',
  );
  return UpdateRoleDescriptionResponse.fromXml($result);
}