list_resource_scan_resources
async
¶
list_resource_scan_resources(
*,
config_overrides: Optional[AsyncCloudFormationClientConfig] = 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
>>> await 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
>>> await 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/async_cloud_formation.py
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 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 | |