updateAccount method

Future<UpdateAccountResponse> updateAccount({
  1. required String accountId,
  2. License? defaultLicense,
  3. String? name,
})

Updates account details for the specified Amazon Chime account. Currently, only account name and default license updates are supported for this action.

May throw BadRequestException. May throw ForbiddenException. May throw NotFoundException. May throw ServiceFailureException. May throw ServiceUnavailableException. May throw ThrottledClientException. May throw UnauthorizedClientException.

Parameter accountId : The Amazon Chime account ID.

Parameter defaultLicense : The default license applied when you add users to an Amazon Chime account.

Parameter name : The new name for the specified Amazon Chime account.

Implementation

Future<UpdateAccountResponse> updateAccount({
  required String accountId,
  License? defaultLicense,
  String? name,
}) async {
  final $payload = <String, dynamic>{
    if (defaultLicense != null) 'DefaultLicense': defaultLicense.value,
    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);
}