associateAccounts method
Connects an array of account IDs in a consolidated billing family to a predefined billing group. The account IDs must be a part of the consolidated billing family during the current month, and not already associated with another billing group. The maximum number of accounts that can be associated in one call is 30.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceLimitExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accountIds :
The associating array of account IDs.
Parameter arn :
The Amazon Resource Name (ARN) of the billing group that associates the
array of account IDs.
Implementation
Future<AssociateAccountsOutput> associateAccounts({
required List<String> accountIds,
required String arn,
}) async {
final $payload = <String, dynamic>{
'AccountIds': accountIds,
'Arn': arn,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/associate-accounts',
exceptionFnMap: _exceptionFns,
);
return AssociateAccountsOutput.fromJson(response);
}