list_discovered_resources
¶
list_discovered_resources(
environment_arn: EnvironmentArn,
*,
config_overrides: Optional[AssuranceClientConfig] = None,
project: Optional[ProjectName] = None,
account_id: Optional[AwsAccountId] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
) -> ListDiscoveredResourcesOutput
Lists the resources that are in scope for an environment or project. Results are paginated. If more results are available, use the nextToken value returned in the response to retrieve the next page.
Parameters:
-
environment_arn(EnvironmentArn) –The ARN of this governance environment.
-
project(Optional[ProjectName], default:None) –The name of the project.
-
account_id(Optional[AwsAccountId], default:None) –The AWS account whose resources the operation returns. When set, the operation returns only resources owned by this account.
-
max_results(Optional[MaxResults], default:None) –The maximum number of records to return on one page. If you omit it, the operation uses its default page size. If more records are available, use the
nextTokenvalue from the response to get the next page. -
next_token(Optional[PaginationToken], default:None) –The pagination token returned by a previous request. Use it to retrieve the next page of results. If the value is null, there are no more results to return.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action. This error occurs when the request is unauthenticated, or is authenticated but lacks permission to invoke the operation.
-
InternalServerException–An internal server error occurred.
-
ResourceNotFoundException–The requested resource was not found.
-
ThrottlingException–The request was throttled.
-
ValidationException–The request failed validation.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
List discovered resources Lists the resources found in the payments-prod project so the team can confirm PCI-DSS assessment scope.
>>> client.list_discovered_resources(environment_arn='arn:aws:assurance:us-east-1:111122223333:environment/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', project='payments-prod')
Source code in docs_src/capo_assurance/_services/assurance.py
4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 | |