updateAccountPool method

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

Updates the account pool.

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

Parameter domainIdentifier : The domain ID where the account pool that is to be updated lives.

Parameter identifier : The ID of the account pool that is to be updated.

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 description : The description of the account pool that is to be udpated.

Parameter name : The name of the account pool that is to be updated.

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

Implementation

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