listResourceScanRelatedResources method
Lists the related resources for a list of resources from a resource scan. 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 resources :
The list of resources for which you want to get the related resources. Up
to 100 resources can be provided.
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 ListResourceScanRelatedResources API action will
return up to 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.)
Implementation
Future<ListResourceScanRelatedResourcesOutput>
listResourceScanRelatedResources({
required String resourceScanId,
required List<ScannedResourceIdentifier> resources,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $request = <String, String>{
'ResourceScanId': resourceScanId,
if (resources.isEmpty)
'Resources': ''
else
for (var i1 = 0; i1 < resources.length; i1++)
for (var e3 in resources[i1].toQueryMap().entries)
'Resources.member.${i1 + 1}.${e3.key}': e3.value,
if (maxResults != null) 'MaxResults': maxResults.toString(),
if (nextToken != null) 'NextToken': nextToken,
};
final $result = await _protocol.send(
$request,
action: 'ListResourceScanRelatedResources',
version: '2010-05-15',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
resultWrapper: 'ListResourceScanRelatedResourcesResult',
);
return ListResourceScanRelatedResourcesOutput.fromXml($result);
}