1. Packages
  2. AWS Classic
  3. API Docs
  4. resourceexplorer
  5. Search

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.resourceexplorer.Search

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 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,
    });
    
    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) SearchResultOutput
    public 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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:resourceexplorer:Search
      arguments:
        # arguments dictionary

    The 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 Unauthorized exception.
    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 Unauthorized exception.
    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 Unauthorized exception.
    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 Unauthorized exception.
    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 Unauthorized exception.
    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 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 string
    Amazon resource name of resource.
    LastReportedAt string
    The date and time that the information about this resource property was last updated.
    OwningAccountId string
    Amazon Web Services account that owns the resource.
    Properties List<object>
    Structure with additional type-specific details about the resource. See properties below.
    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.
    LastReportedAt string
    The date and time that the information about this resource property was last updated.
    OwningAccountId string
    Amazon Web Services account that owns the resource.
    Properties []interface{}
    Structure with additional type-specific details about the resource. See properties below.
    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.
    lastReportedAt String
    The date and time that the information about this resource property was last updated.
    owningAccountId String
    Amazon Web Services account that owns the resource.
    properties List<Object>
    Structure with additional type-specific details about the resource. See properties below.
    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.
    lastReportedAt string
    The date and time that the information about this resource property was last updated.
    owningAccountId string
    Amazon Web Services account that owns the resource.
    properties any[]
    Structure with additional type-specific details about the resource. See properties below.
    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_at str
    The date and time that the information about this resource property was last updated.
    owning_account_id str
    Amazon Web Services account that owns the resource.
    properties Sequence[Any]
    Structure with additional type-specific details about the resource. See properties below.
    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.
    lastReportedAt String
    The date and time that the information about this resource property was last updated.
    owningAccountId String
    Amazon Web Services account that owns the resource.
    properties List<Any>
    Structure with additional type-specific details about the resource. See properties below.
    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.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi