updateAccount method
Updates account details for the specified Amazon Chime account. Currently, only account name updates are supported for this action.
May throw UnauthorizedClientException. May throw NotFoundException. May throw ForbiddenException. May throw BadRequestException. May throw ThrottledClientException. May throw ServiceUnavailableException. May throw ServiceFailureException.
Parameter accountId
:
The Amazon Chime account ID.
Parameter name
:
The new name for the specified Amazon Chime account.
Implementation
Future<UpdateAccountResponse> updateAccount({
required String accountId,
String? name,
}) async {
ArgumentError.checkNotNull(accountId, 'accountId');
_s.validateStringLength(
'name',
name,
1,
100,
);
final $payload = <String, dynamic>{
if (name != null) 'Name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/accounts/${Uri.encodeComponent(accountId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateAccountResponse.fromJson(response);
}