listResourceProfileDetections method

Future<ListResourceProfileDetectionsResponse> listResourceProfileDetections({
  1. required String resourceArn,
  2. int? maxResults,
  3. String? nextToken,
})

Retrieves information about the types and amount of sensitive data that Amazon Macie found in an S3 bucket.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter resourceArn : The Amazon Resource Name (ARN) of the S3 bucket that the request applies to.

Parameter maxResults : The maximum number of items to include in each page of a paginated response.

Parameter nextToken : The nextToken string that specifies which page of results to return in a paginated response.

Implementation

Future<ListResourceProfileDetectionsResponse> listResourceProfileDetections({
  required String resourceArn,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    25,
  );
  final $query = <String, List<String>>{
    'resourceArn': [resourceArn],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/resource-profiles/detections',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListResourceProfileDetectionsResponse.fromJson(response);
}