listS3Resources method
Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId isn't specified, the action lists the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action lists the S3 resources associated with Amazon Macie Classic for the specified member account.
May throw InvalidInputException. May throw AccessDeniedException. May throw InternalException.
Parameter maxResults
:
Use this parameter to indicate the maximum number of items that you want
in the response. The default value is 250.
Parameter memberAccountId
:
The Amazon Macie Classic member account ID whose associated S3 resources
you want to list.
Parameter nextToken
:
Use this parameter when paginating results. Set its value to null on your
first call to the ListS3Resources action. Subsequent calls to the action
fill nextToken in the request with the value of nextToken from the
previous response to continue listing data.
Implementation
Future<ListS3ResourcesResult> listS3Resources({
int? maxResults,
String? memberAccountId,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
250,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
500,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'MacieService.ListS3Resources'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (memberAccountId != null) 'memberAccountId': memberAccountId,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListS3ResourcesResult.fromJson(jsonResponse.body);
}