Skip to content

aws.resource_explorer_2.search

Example SQL Queries

SELECT * FROM
aws.resource_explorer_2.search
WHERE
"query_string" = 'VALUE';

Description

Searches for resources and displays details about all resources that match the specified criteria. You must specify a query string.

All search queries must use a view. If you don't explicitly specify a view, then Amazon Web Services Resource Explorer uses the default view for the Amazon Web Services Region in which you call this operation. The results are the logical intersection of the results that match both the QueryString parameter supplied to this operation and the SearchFilter parameter attached to the view.

For the complete syntax supported by the QueryString parameter, see Search query syntax reference for Resource Explorer.

If your search results are empty, or are missing results that you think should be there, see Troubleshooting Resource Explorer search.

Table Definition

Column NameColumn Data Type
query_string Required Input Column

A string that includes keywords and filters that specify the resources that you want to include in the results.

For the complete syntax supported by the QueryString parameter, see Search query syntax reference for Resource Explorer.

The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.

The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for QueryString to refine the results.

VARCHAR
view_arn Input Column

The Amazon resource name (ARN) of the view that this operation used to perform the search.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
count

The number of resources that match the query.

STRUCT(
"complete" BOOLEAN,
"total_resources" BIGINT
)
Show child fields
count.complete

Indicates whether the TotalResources value represents an exhaustive count of search results.

  • If True, it indicates that the search was exhaustive. Every resource that matches the query was counted.

  • If False, then the search reached the limit of 1,000 matching results, and stopped counting.

count.total_resources

The number of resources that match the search query. This value can't exceed 1,000. If there are more than 1,000 resources that match the query, then only 1,000 are counted and the Complete field is set to false. We recommend that you refine your query to return a smaller number of results.

resources

The list of structures that describe the resources that match the query.

STRUCT(
"arn" VARCHAR,
"last_reported_at" TIMESTAMP_S,
"owning_account_id" VARCHAR,
"properties" STRUCT(
"data" VARCHAR,
"last_reported_at" TIMESTAMP_S,
"name" VARCHAR
)[],
"region" VARCHAR,
"resource_type" VARCHAR,
"service" VARCHAR
)[]
Show child fields
resources[]
Show child fields
resources[].arn

The Amazon resource name (ARN) of the resource.

resources[].last_reported_at

The date and time that Resource Explorer last queried this resource and updated the index with the latest information about the resource.

resources[].owning_account_id

The Amazon Web Services account that owns the resource.

resources[].properties[]
Show child fields
resources[].properties[].data

Details about this property. The content of this field is a JSON object that varies based on the resource type.

resources[].properties[].last_reported_at

The date and time that the information about this resource property was last updated.

resources[].properties[].name

The name of this property of the resource.

resources[].region

The Amazon Web Services Region in which the resource was created and exists.

resources[].resource_type

The type of the resource.

resources[].service

The Amazon Web Service that owns the resource and is responsible for creating and updating it.