createAccountAlias method

Future<void> createAccountAlias({
  1. required String accountAlias,
})

Creates an alias for your AWS account. For information about using an AWS account alias, see Using an Alias for Your AWS Account ID in the IAM User Guide.

May throw EntityAlreadyExistsException. May throw LimitExceededException. May throw ServiceFailureException.

Parameter accountAlias : The account alias to create.

This parameter allows (through its regex pattern) a string of characters consisting of lowercase letters, digits, and dashes. You cannot start or finish with a dash, nor can you have two dashes in a row.

Implementation

Future<void> createAccountAlias({
  required String accountAlias,
}) async {
  ArgumentError.checkNotNull(accountAlias, 'accountAlias');
  _s.validateStringLength(
    'accountAlias',
    accountAlias,
    3,
    63,
    isRequired: true,
  );
  final $request = <String, dynamic>{};
  $request['AccountAlias'] = accountAlias;
  await _protocol.send(
    $request,
    action: 'CreateAccountAlias',
    version: '2010-05-08',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    shape: shapes['CreateAccountAliasRequest'],
    shapes: shapes,
  );
}