createAccountPool method

Future<CreateAccountPoolOutput> createAccountPool({
  1. required AccountSource accountSource,
  2. required String domainIdentifier,
  3. required String name,
  4. required ResolutionStrategy resolutionStrategy,
  5. String? description,
})

Creates an account pool.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter accountSource : The source of accounts for the account pool. In the current release, it's either a static list of accounts provided by the customer or a custom Amazon Web Services Lambda handler.

Parameter domainIdentifier : The ID of the domain where the account pool is created.

Parameter name : The name of the account pool.

Parameter resolutionStrategy : The mechanism used to resolve the account selection from the account pool.

Parameter description : The description of the account pool.

Implementation

Future<CreateAccountPoolOutput> createAccountPool({
  required AccountSource accountSource,
  required String domainIdentifier,
  required String name,
  required ResolutionStrategy resolutionStrategy,
  String? description,
}) async {
  final $payload = <String, dynamic>{
    'accountSource': accountSource,
    'name': name,
    'resolutionStrategy': resolutionStrategy.value,
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/account-pools',
    exceptionFnMap: _exceptionFns,
  );
  return CreateAccountPoolOutput.fromJson(response);
}