1. Packages
  2. AWS
  3. API Docs
  4. resourceexplorer
  5. Search
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

aws.resourceexplorer.Search

Explore with Pulumi AI

AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

Data source for managing an AWS Resource Explorer Search.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = aws.resourceexplorer.Search({
    queryString: "region:us-west-2",
    viewArn: test.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.resourceexplorer.search(query_string="region:us-west-2",
    view_arn=test["arn"])
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/resourceexplorer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := resourceexplorer.Search(ctx, &resourceexplorer.SearchArgs{
			QueryString: "region:us-west-2",
			ViewArn:     pulumi.StringRef(test.Arn),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = Aws.ResourceExplorer.Search.Invoke(new()
    {
        QueryString = "region:us-west-2",
        ViewArn = test.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.resourceexplorer.ResourceexplorerFunctions;
import com.pulumi.aws.resourceexplorer.inputs.SearchArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = ResourceexplorerFunctions.Search(SearchArgs.builder()
            .queryString("region:us-west-2")
            .viewArn(test.arn())
            .build());

    }
}
Copy
variables:
  example:
    fn::invoke:
      function: aws:resourceexplorer:Search
      arguments:
        queryString: region:us-west-2
        viewArn: ${test.arn}
Copy

Using Search

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function search(args: SearchArgs, opts?: InvokeOptions): Promise<SearchResult>
function searchOutput(args: SearchOutputArgs, opts?: InvokeOptions): Output<SearchResult>
Copy
def search(query_string: Optional[str] = None,
           view_arn: Optional[str] = None,
           opts: Optional[InvokeOptions] = None) -> SearchResult
def search_output(query_string: Optional[pulumi.Input[str]] = None,
           view_arn: Optional[pulumi.Input[str]] = None,
           opts: Optional[InvokeOptions] = None) -> Output[SearchResult]
Copy
func Search(ctx *Context, args *SearchArgs, opts ...InvokeOption) (*SearchResult, error)
func SearchOutput(ctx *Context, args *SearchOutputArgs, opts ...InvokeOption) SearchResultOutput
Copy
public static class Search 
{
    public static Task<SearchResult> InvokeAsync(SearchArgs args, InvokeOptions? opts = null)
    public static Output<SearchResult> Invoke(SearchInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<SearchResult> search(SearchArgs args, InvokeOptions options)
public static Output<SearchResult> search(SearchArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:resourceexplorer:Search
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

QueryString This property is required. string

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.

The following arguments are optional:

ViewArn string
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.
QueryString This property is required. string

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.

The following arguments are optional:

ViewArn string
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.
queryString This property is required. String

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.

The following arguments are optional:

viewArn String
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.
queryString This property is required. string

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.

The following arguments are optional:

viewArn string
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.
query_string This property is required. str

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.

The following arguments are optional:

view_arn str
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.
queryString This property is required. String

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.

The following arguments are optional:

viewArn String
Specifies the Amazon resource name (ARN) of the view to use for the query. If you don't specify a value for this parameter, then the operation automatically uses the default view for the AWS Region in which you called this operation. If the Region either doesn't have a default view or if you don't have permission to use the default view, then the operation fails with a 401 Unauthorized exception.

Search Result

The following output properties are available:

Id string
Query String.
QueryString string
ResourceCounts List<SearchResourceCount>
Number of resources that match the query. See resource_count below.
Resources List<SearchResource>
List of structures that describe the resources that match the query. See resources below.
ViewArn string
Id string
Query String.
QueryString string
ResourceCounts []SearchResourceCount
Number of resources that match the query. See resource_count below.
Resources []SearchResource
List of structures that describe the resources that match the query. See resources below.
ViewArn string
id String
Query String.
queryString String
resourceCounts List<SearchResourceCount>
Number of resources that match the query. See resource_count below.
resources List<SearchResource>
List of structures that describe the resources that match the query. See resources below.
viewArn String
id string
Query String.
queryString string
resourceCounts SearchResourceCount[]
Number of resources that match the query. See resource_count below.
resources SearchResource[]
List of structures that describe the resources that match the query. See resources below.
viewArn string
id str
Query String.
query_string str
resource_counts Sequence[SearchResourceCount]
Number of resources that match the query. See resource_count below.
resources Sequence[SearchResource]
List of structures that describe the resources that match the query. See resources below.
view_arn str
id String
Query String.
queryString String
resourceCounts List<Property Map>
Number of resources that match the query. See resource_count below.
resources List<Property Map>
List of structures that describe the resources that match the query. See resources below.
viewArn String

Supporting Types

SearchResource

Arn This property is required. string
Amazon resource name of resource.
LastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
OwningAccountId This property is required. string
Amazon Web Services account that owns the resource.
Properties This property is required. List<SearchResourceProperty>
Structure with additional type-specific details about the resource. See properties below.
Region This property is required. string
Amazon Web Services Region in which the resource was created and exists.
ResourceType This property is required. string
Type of the resource.
Service This property is required. string
Amazon Web Service that owns the resource and is responsible for creating and updating it.
Arn This property is required. string
Amazon resource name of resource.
LastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
OwningAccountId This property is required. string
Amazon Web Services account that owns the resource.
Properties This property is required. []SearchResourceProperty
Structure with additional type-specific details about the resource. See properties below.
Region This property is required. string
Amazon Web Services Region in which the resource was created and exists.
ResourceType This property is required. string
Type of the resource.
Service This property is required. string
Amazon Web Service that owns the resource and is responsible for creating and updating it.
arn This property is required. String
Amazon resource name of resource.
lastReportedAt This property is required. String
The date and time that the information about this resource property was last updated.
owningAccountId This property is required. String
Amazon Web Services account that owns the resource.
properties This property is required. List<SearchResourceProperty>
Structure with additional type-specific details about the resource. See properties below.
region This property is required. String
Amazon Web Services Region in which the resource was created and exists.
resourceType This property is required. String
Type of the resource.
service This property is required. String
Amazon Web Service that owns the resource and is responsible for creating and updating it.
arn This property is required. string
Amazon resource name of resource.
lastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
owningAccountId This property is required. string
Amazon Web Services account that owns the resource.
properties This property is required. SearchResourceProperty[]
Structure with additional type-specific details about the resource. See properties below.
region This property is required. string
Amazon Web Services Region in which the resource was created and exists.
resourceType This property is required. string
Type of the resource.
service This property is required. string
Amazon Web Service that owns the resource and is responsible for creating and updating it.
arn This property is required. str
Amazon resource name of resource.
last_reported_at This property is required. str
The date and time that the information about this resource property was last updated.
owning_account_id This property is required. str
Amazon Web Services account that owns the resource.
properties This property is required. Sequence[SearchResourceProperty]
Structure with additional type-specific details about the resource. See properties below.
region This property is required. str
Amazon Web Services Region in which the resource was created and exists.
resource_type This property is required. str
Type of the resource.
service This property is required. str
Amazon Web Service that owns the resource and is responsible for creating and updating it.
arn This property is required. String
Amazon resource name of resource.
lastReportedAt This property is required. String
The date and time that the information about this resource property was last updated.
owningAccountId This property is required. String
Amazon Web Services account that owns the resource.
properties This property is required. List<Property Map>
Structure with additional type-specific details about the resource. See properties below.
region This property is required. String
Amazon Web Services Region in which the resource was created and exists.
resourceType This property is required. String
Type of the resource.
service This property is required. String
Amazon Web Service that owns the resource and is responsible for creating and updating it.

SearchResourceCount

Complete This property is required. bool
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.
TotalResources This property is required. int
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.
Complete This property is required. bool
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.
TotalResources This property is required. int
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.
complete This property is required. Boolean
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.
totalResources This property is required. Integer
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.
complete This property is required. boolean
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.
totalResources This property is required. number
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.
complete This property is required. bool
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.
total_resources This property is required. int
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.
complete This property is required. Boolean
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.
totalResources This property is required. Number
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.

SearchResourceProperty

Data This property is required. string
Details about this property. The content of this field is a JSON object that varies based on the resource type.
LastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
Name This property is required. string
Name of this property of the resource.
Data This property is required. string
Details about this property. The content of this field is a JSON object that varies based on the resource type.
LastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
Name This property is required. string
Name of this property of the resource.
data This property is required. String
Details about this property. The content of this field is a JSON object that varies based on the resource type.
lastReportedAt This property is required. String
The date and time that the information about this resource property was last updated.
name This property is required. String
Name of this property of the resource.
data This property is required. string
Details about this property. The content of this field is a JSON object that varies based on the resource type.
lastReportedAt This property is required. string
The date and time that the information about this resource property was last updated.
name This property is required. string
Name of this property of the resource.
data This property is required. str
Details about this property. The content of this field is a JSON object that varies based on the resource type.
last_reported_at This property is required. str
The date and time that the information about this resource property was last updated.
name This property is required. str
Name of this property of the resource.
data This property is required. String
Details about this property. The content of this field is a JSON object that varies based on the resource type.
lastReportedAt This property is required. String
The date and time that the information about this resource property was last updated.
name This property is required. String
Name of this property of the resource.

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.76.0 published on Tuesday, Apr 8, 2025 by Pulumi