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
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 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 | |