list_resource_scan_related_resources
¶
list_resource_scan_related_resources(
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
resource_scan_id: Optional[ResourceScanId] = None,
resources: Optional[ScannedResourceIdentifiers] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[BoxedMaxResults] = None,
) -> ListResourceScanRelatedResourcesOutput
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.
Parameters:
-
resource_scan_id(Optional[ResourceScanId], default:None) –The Amazon Resource Name (ARN) of the resource scan.
-
resources(Optional[ScannedResourceIdentifiers], default:None) –The list of resources for which you want to get the related resources. Up to 100 resources can be provided.
-
next_token(Optional[NextToken], default:None) –The token for the next set of items to return. (You received this token from a previous call.)
-
max_results(Optional[BoxedMaxResults], default:None) –If the number of available results exceeds this maximum, the response includes a
NextTokenvalue that you can use for theNextTokenparameter to get the next set of results. By default theListResourceScanRelatedResourcesAPI action will return up to 100 results in each response. The maximum value is 100.
Raises:
-
ResourceScanInProgressException–A resource scan is currently in progress. Only one can be run at a time for an account in a Region.
-
ResourceScanNotFoundException–The resource scan was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list resource scan related resources This example lists the resources related to the passed in resources
>>> client.list_resource_scan_related_resources(resource_scan_id='arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1', resources=[{'ResourceType': 'AWS::S3::Bucket', 'ResourceIdentifier': {'BucketName': 'jazz-bucket'}}, {'ResourceType': 'AWS::EC2::DHCPOptions', 'ResourceIdentifier': {'DhcpOptionsId': 'random-id123'}}])
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 | |