list_resource_scan_resources
¶
list_resource_scan_resources(
*,
config_overrides: Optional[CloudFormationClientConfig] = None,
resource_scan_id: Optional[ResourceScanId] = None,
resource_identifier: Optional[ResourceIdentifier] = None,
resource_type_prefix: Optional[ResourceTypePrefix] = None,
tag_key: Optional[TagKey] = None,
tag_value: Optional[TagValue] = None,
next_token: Optional[NextToken] = None,
max_results: Optional[ResourceScannerMaxResults] = None,
) -> ListResourceScanResourcesOutput
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.
Parameters:
-
resource_scan_id(Optional[ResourceScanId], default:None) –The Amazon Resource Name (ARN) of the resource scan.
-
resource_identifier(Optional[ResourceIdentifier], default:None) –If specified, the returned resources will have the specified resource identifier (or one of them in the case where the resource has multiple identifiers).
-
resource_type_prefix(Optional[ResourceTypePrefix], default:None) –If specified, the returned resources will be of any of the resource types with the specified prefix.
-
tag_key(Optional[TagKey], default:None) –If specified, the returned resources will have a matching tag key.
-
tag_value(Optional[TagValue], default:None) –If specified, the returned resources will have a matching tag value.
-
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[ResourceScannerMaxResults], 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 theListResourceScanResourcesAPI action will return at most 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 the resources in your resource scan This example lists the resources in your resource scan
>>> client.list_resource_scan_resources(resource_scan_id='arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1')
To list the resources in your resource scan for specific resource type
This example lists the resources in your resource scan filtering only the resources that start with the passed in prefix
>>> client.list_resource_scan_resources(resource_scan_id='arn:aws:cloudformation:us-east-1:123456789012:resourceScan/c19304f6-c4f1-4ff8-8e1f-35162e41d7e1', resource_type_prefix='AWS::S3')
Source code in docs_src/capo_cloudformation/_services/cloud_formation.py
4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 | |