Assurance / Client / list_discovered_resources

list_discovered_resources

Assurance.Client.list_discovered_resources(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.list_discovered_resources(
    environmentArn='string',
    project='string',
    accountId='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • environmentArn (string) –

    [REQUIRED]

    The ARN of this governance environment.

  • project (string) – The name of the project.

  • accountId (string) – The AWS account whose resources the operation returns. When set, the operation returns only resources owned by this account.

  • maxResults (integer) – 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 nextToken value from the response to get the next page.

  • nextToken (string) – 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.

Return type:

dict

Returns:

Response Syntax

{
    'resourceIdentifiers': [
        {
            'resourceIdentifier': 'string',
            'resourceType': 'string',
            'accountId': 'string',
            'region': 'string'
        },
    ],
    'coverage': 'COMPLETE'|'PARTIAL',
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • resourceIdentifiers (list) –

      The resources for this page of results.

      • (dict) –

        A resource that is in scope for an environment, project, or control, as returned by ListDiscoveredResources and ListControlResources.

        • resourceIdentifier (string) –

          The identifier (typically the ARN) of the resource.

        • resourceType (string) –

          The resource type, in lowercase service:type form (for example, s3:bucket). This is the form that resourcetype: filters use.

        • accountId (string) –

          The AWS account the resource belongs to.

        • region (string) –

          The AWS Region that the resource is in. The value is global for global resources such as IAM.

    • coverage (string) –

      Specifies whether the environment’s resource inventory has finished loading. When the value is absent, treat it as COMPLETE. Valid values:

      • COMPLETE – The inventory has finished loading.

      • PARTIAL – The inventory is still loading after the environment was created, so the list can be missing resources that a later call returns.

    • nextToken (string) –

      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.

Exceptions