listMemberAccounts method
Returns a MemberAccounts object that lists the member
accounts in the administrator's Amazon Web Services organization.
Either an Firewall Manager administrator or the organization's management account can make this request.
May throw InternalErrorException.
May throw ResourceNotFoundException.
Parameter maxResults :
Specifies the number of member account IDs that you want Firewall Manager
to return for this request. If you have more IDs than the number that you
specify for MaxResults, the response includes a
NextToken value that you can use to get another batch of
member account IDs.
Parameter nextToken :
If you specify a value for MaxResults and you have more
account IDs than the number that you specify for MaxResults,
Firewall Manager returns a NextToken value in the response
that allows you to list another group of IDs. For the second and
subsequent ListMemberAccountsRequest requests, specify the
value of NextToken from the previous response to get
information about another batch of member account IDs.
Implementation
Future<ListMemberAccountsResponse> listMemberAccounts({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSFMS_20180101.ListMemberAccounts'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListMemberAccountsResponse.fromJson(jsonResponse.body);
}