searchResources method

Future<SearchResourcesResponse> searchResources({
  1. SearchResourcesBucketCriteria? bucketCriteria,
  2. int? maxResults,
  3. String? nextToken,
  4. SearchResourcesSortCriteria? sortCriteria,
})

Retrieves (queries) statistical data and other information about Amazon Web Services resources that Amazon Macie monitors and analyzes for an account.

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

Parameter bucketCriteria : The filter conditions that determine which S3 buckets to include or exclude from the query results.

Parameter maxResults : The maximum number of items to include in each page of the response. The default value is 50.

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

Parameter sortCriteria : The criteria to use to sort the results.

Implementation

Future<SearchResourcesResponse> searchResources({
  SearchResourcesBucketCriteria? bucketCriteria,
  int? maxResults,
  String? nextToken,
  SearchResourcesSortCriteria? sortCriteria,
}) async {
  final $payload = <String, dynamic>{
    if (bucketCriteria != null) 'bucketCriteria': bucketCriteria,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (sortCriteria != null) 'sortCriteria': sortCriteria,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/datasources/search-resources',
    exceptionFnMap: _exceptionFns,
  );
  return SearchResourcesResponse.fromJson(response);
}