Table: aws_resource_explorer_search
AWS Resource Explorer is a resource search and discovery service. This table allows you to search for supported resource types (which can be found using the aws_resource_explorer_supported_resource_type table).
Before using this table, we recommend:
- Configure Resource Explorer using quick setup
- If using advanced setup instead, we recommend creating at least 1 aggregator index and a default view in that region
This table uses the aggregator index in the AWS account when searching for resources. A view ARN can also be specified in the view_arn
column. If the account doesn't have an aggregator index and no view ARN is specified, the table will return an error.
All queries can only return the first 1,000 results due to a limitation by the API. If the resource you're looking for is not included, you can use a more refined query
string.
Specifying query
is not required, and if a search query is run without it, the first 1,000 results will be returned. However, if you'd like to specify query
, please see the examples below along with Search query syntax reference for Resource Explorer.
Examples
Basic info
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_search;
List non-IAM resources
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = '-service:iam';
List non-IAM resources in us-*
regions
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = '-service:iam region:us-*';
List IAM user resources
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = 'resourcetype:iam:user';
List resources with user created tags
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = '-tag:none';
List resources with tag key environment
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = 'tag.key:environment';
List resources with global
scope
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere query = 'region:global';
Search for reosurces with a specific view
select arn, region, resource_type, service, owning_account_idfrom aws_resource_explorer_searchwhere view_arn = 'arn:aws:resource-explorer-2:ap-south-1:111122223333:view/view1/7c9e9845-4736-409f-9c0f-673fe7ce3e46';
.inspect aws_resource_explorer_search
AWS Resource Explorer Search
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
arn | text | The Amazon resource name (ARN) of the resource. |
last_reported_at | timestamp with time zone | The date and time that Resource Explorer last queried this resource and updated the index with the latest information about the resource. |
owning_account_id | text | The Amazon Web Services account that owns the resource. |
properties | jsonb | Additional type-specific details about the resource. |
query | text | A string that includes keywords and filters that specify the resources to include in the search results. |
region | text | The AWS Region in which the resource was created and exists. |
resource_type | text | The type of the resource. |
service | text | The Amazon Web Service that owns the resource and is responsible for creating and updating it. |
view_arn | text | The Amazon resource name (ARN) of the view that this table uses to perform the search. |