associateAdminAccount method

Future<void> associateAdminAccount({
  1. required String adminAccount,
})

Sets the AWS Firewall Manager administrator account. AWS Firewall Manager must be associated with the master account of your AWS organization or associated with a member account that has the appropriate permissions. If the account ID that you submit is not an AWS Organizations master account, AWS Firewall Manager will set the appropriate permissions for the given member account.

The account that you associate with AWS Firewall Manager is called the AWS Firewall Manager administrator account.

May throw InvalidOperationException. May throw InvalidInputException. May throw ResourceNotFoundException. May throw InternalErrorException.

Parameter adminAccount : The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall Manager administrator account. This can be an AWS Organizations master account or a member account. For more information about AWS Organizations and master accounts, see Managing the AWS Accounts in Your Organization.

Implementation

Future<void> associateAdminAccount({
  required String adminAccount,
}) async {
  ArgumentError.checkNotNull(adminAccount, 'adminAccount');
  _s.validateStringLength(
    'adminAccount',
    adminAccount,
    1,
    1024,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSFMS_20180101.AssociateAdminAccount'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AdminAccount': adminAccount,
    },
  );
}