aws.resourceexplorer.Search
Explore with Pulumi AI
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,
});
import pulumi
import pulumi_aws as aws
example = aws.resourceexplorer.search(query_string="region:us-west-2",
    view_arn=test["arn"])
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
	})
}
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,
    });
});
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());
    }
}
variables:
  example:
    fn::invoke:
      function: aws:resourceexplorer:Search
      arguments:
        queryString: region:us-west-2
        viewArn: ${test.arn}
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>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]func Search(ctx *Context, args *SearchArgs, opts ...InvokeOption) (*SearchResult, error)
func SearchOutput(ctx *Context, args *SearchOutputArgs, opts ...InvokeOption) SearchResultOutputpublic static class Search 
{
    public static Task<SearchResult> InvokeAsync(SearchArgs args, InvokeOptions? opts = null)
    public static Output<SearchResult> Invoke(SearchInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<SearchResult> search(SearchArgs args, InvokeOptions options)
public static Output<SearchResult> search(SearchArgs args, InvokeOptions options)
fn::invoke:
  function: aws:resourceexplorer:Search
  arguments:
    # arguments dictionaryThe following arguments are supported:
- QueryString 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 Unauthorizedexception.
- QueryString 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 Unauthorizedexception.
- queryString 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 Unauthorizedexception.
- queryString 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 Unauthorizedexception.
- query_string 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 Unauthorizedexception.
- queryString 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 Unauthorizedexception.
Search Result
The following output properties are available:
- Id string
- Query String.
- QueryString string
- ResourceCounts List<SearchResource Count> 
- Number of resources that match the query. See resource_countbelow.
- Resources
List<SearchResource> 
- List of structures that describe the resources that match the query. See resourcesbelow.
- ViewArn string
- Id string
- Query String.
- QueryString string
- ResourceCounts []SearchResource Count 
- Number of resources that match the query. See resource_countbelow.
- Resources
[]SearchResource 
- List of structures that describe the resources that match the query. See resourcesbelow.
- ViewArn string
- id String
- Query String.
- queryString String
- resourceCounts List<SearchResource Count> 
- Number of resources that match the query. See resource_countbelow.
- resources
List<SearchResource> 
- List of structures that describe the resources that match the query. See resourcesbelow.
- viewArn String
- id string
- Query String.
- queryString string
- resourceCounts SearchResource Count[] 
- Number of resources that match the query. See resource_countbelow.
- resources
SearchResource[] 
- List of structures that describe the resources that match the query. See resourcesbelow.
- viewArn string
- id str
- Query String.
- query_string str
- resource_counts Sequence[SearchResource Count] 
- Number of resources that match the query. See resource_countbelow.
- resources
Sequence[SearchResource] 
- List of structures that describe the resources that match the query. See resourcesbelow.
- view_arn str
- id String
- Query String.
- queryString String
- resourceCounts List<Property Map>
- Number of resources that match the query. See resource_countbelow.
- resources List<Property Map>
- List of structures that describe the resources that match the query. See resourcesbelow.
- viewArn String
Supporting Types
SearchResource 
- Arn string
- Amazon resource name of resource.
- LastReported stringAt 
- The date and time that the information about this resource property was last updated.
- OwningAccount stringId 
- Amazon Web Services account that owns the resource.
- Properties
List<SearchResource Property> 
- Structure with additional type-specific details about the resource. See propertiesbelow.
- Region string
- Amazon Web Services Region in which the resource was created and exists.
- ResourceType string
- Type of the resource.
- Service string
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
- Arn string
- Amazon resource name of resource.
- LastReported stringAt 
- The date and time that the information about this resource property was last updated.
- OwningAccount stringId 
- Amazon Web Services account that owns the resource.
- Properties
[]SearchResource Property 
- Structure with additional type-specific details about the resource. See propertiesbelow.
- Region string
- Amazon Web Services Region in which the resource was created and exists.
- ResourceType string
- Type of the resource.
- Service string
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
- arn String
- Amazon resource name of resource.
- lastReported StringAt 
- The date and time that the information about this resource property was last updated.
- owningAccount StringId 
- Amazon Web Services account that owns the resource.
- properties
List<SearchResource Property> 
- Structure with additional type-specific details about the resource. See propertiesbelow.
- region String
- Amazon Web Services Region in which the resource was created and exists.
- resourceType String
- Type of the resource.
- service String
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
- arn string
- Amazon resource name of resource.
- lastReported stringAt 
- The date and time that the information about this resource property was last updated.
- owningAccount stringId 
- Amazon Web Services account that owns the resource.
- properties
SearchResource Property[] 
- Structure with additional type-specific details about the resource. See propertiesbelow.
- region string
- Amazon Web Services Region in which the resource was created and exists.
- resourceType string
- Type of the resource.
- service string
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
- arn str
- Amazon resource name of resource.
- last_reported_ strat 
- The date and time that the information about this resource property was last updated.
- owning_account_ strid 
- Amazon Web Services account that owns the resource.
- properties
Sequence[SearchResource Property] 
- Structure with additional type-specific details about the resource. See propertiesbelow.
- region str
- Amazon Web Services Region in which the resource was created and exists.
- resource_type str
- Type of the resource.
- service str
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
- arn String
- Amazon resource name of resource.
- lastReported StringAt 
- The date and time that the information about this resource property was last updated.
- owningAccount StringId 
- Amazon Web Services account that owns the resource.
- properties List<Property Map>
- Structure with additional type-specific details about the resource. See propertiesbelow.
- region String
- Amazon Web Services Region in which the resource was created and exists.
- resourceType String
- Type of the resource.
- service String
- Amazon Web Service that owns the resource and is responsible for creating and updating it.
SearchResourceCount  
- Complete 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 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 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 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 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 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 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 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 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 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 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 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 string
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- LastReported stringAt 
- The date and time that the information about this resource property was last updated.
- Name string
- Name of this property of the resource.
- Data string
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- LastReported stringAt 
- The date and time that the information about this resource property was last updated.
- Name string
- Name of this property of the resource.
- data String
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- lastReported StringAt 
- The date and time that the information about this resource property was last updated.
- name String
- Name of this property of the resource.
- data string
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- lastReported stringAt 
- The date and time that the information about this resource property was last updated.
- name string
- Name of this property of the resource.
- data str
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- last_reported_ strat 
- The date and time that the information about this resource property was last updated.
- name str
- Name of this property of the resource.
- data String
- Details about this property. The content of this field is a JSON object that varies based on the resource type.
- lastReported StringAt 
- The date and time that the information about this resource property was last updated.
- name 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 awsTerraform Provider.