putAdminAccount method
Creates or updates an Firewall Manager administrator account. The account must be a member of the organization that was onboarded to Firewall Manager by AssociateAdminAccount. Only the organization's management account can create an Firewall Manager administrator account. When you create an Firewall Manager administrator account, the service checks to see if the account is already a delegated administrator within Organizations. If the account isn't a delegated administrator, Firewall Manager calls Organizations to delegate the account within Organizations. For more information about administrator accounts within Organizations, see Managing the Amazon Web Services Accounts in Your Organization.
May throw InternalErrorException.
May throw InvalidInputException.
May throw InvalidOperationException.
May throw LimitExceededException.
Parameter adminAccount :
The Amazon Web Services account ID to add as an Firewall Manager
administrator account. The account must be a member of the organization
that was onboarded to Firewall Manager by AssociateAdminAccount.
For more information about Organizations, see Managing
the Amazon Web Services Accounts in Your Organization.
Parameter adminScope :
Configures the resources that the specified Firewall Manager administrator
can manage. As a best practice, set the administrative scope according to
the principles of least privilege. Only grant the administrator the
specific resources or permissions that they need to perform the duties of
their role.
Implementation
Future<void> putAdminAccount({
required String adminAccount,
AdminScope? adminScope,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSFMS_20180101.PutAdminAccount'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'AdminAccount': adminAccount,
if (adminScope != null) 'AdminScope': adminScope,
},
);
}