listResourceScanResources method

Future<ListResourceScanResourcesOutput> listResourceScanResources({
  1. required String resourceScanId,
  2. int? maxResults,
  3. String? nextToken,
  4. String? resourceIdentifier,
  5. String? resourceTypePrefix,
  6. String? tagKey,
  7. String? tagValue,
})

Lists the resources from a resource scan. The results can be filtered by resource identifier, resource type prefix, tag key, and tag value. Only resources that match all specified filters are returned. The response indicates whether each returned resource is already managed by CloudFormation.

May throw ResourceScanInProgressException. May throw ResourceScanNotFoundException.

Parameter resourceScanId : The Amazon Resource Name (ARN) of the resource scan.

Parameter maxResults : If the number of available results exceeds this maximum, the response includes a NextToken value that you can use for the NextToken parameter to get the next set of results. By default the ListResourceScanResources API action will return at most 100 results in each response. The maximum value is 100.

Parameter nextToken : The token for the next set of items to return. (You received this token from a previous call.)

Parameter resourceIdentifier : If specified, the returned resources will have the specified resource identifier (or one of them in the case where the resource has multiple identifiers).

Parameter resourceTypePrefix : If specified, the returned resources will be of any of the resource types with the specified prefix.

Parameter tagKey : If specified, the returned resources will have a matching tag key.

Parameter tagValue : If specified, the returned resources will have a matching tag value.

Implementation

Future<ListResourceScanResourcesOutput> listResourceScanResources({
  required String resourceScanId,
  int? maxResults,
  String? nextToken,
  String? resourceIdentifier,
  String? resourceTypePrefix,
  String? tagKey,
  String? tagValue,
}) async {
  final $request = <String, String>{
    'ResourceScanId': resourceScanId,
    if (maxResults != null) 'MaxResults': maxResults.toString(),
    if (nextToken != null) 'NextToken': nextToken,
    if (resourceIdentifier != null) 'ResourceIdentifier': resourceIdentifier,
    if (resourceTypePrefix != null) 'ResourceTypePrefix': resourceTypePrefix,
    if (tagKey != null) 'TagKey': tagKey,
    if (tagValue != null) 'TagValue': tagValue,
  };
  final $result = await _protocol.send(
    $request,
    action: 'ListResourceScanResources',
    version: '2010-05-15',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'ListResourceScanResourcesResult',
  );
  return ListResourceScanResourcesOutput.fromXml($result);
}