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) 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:
- Query
String 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:
- View
Arn 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 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:
- View
Arn 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 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:
- view
Arn 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 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:
- view
Arn 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.
- query
String 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:
- view
Arn 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.
- Query
String string - Resource
Counts List<SearchResource Count> - Number of resources that match the query. See
resource_count
below. - Resources
List<Search
Resource> - List of structures that describe the resources that match the query. See
resources
below. - View
Arn string
- Id string
- Query String.
- Query
String string - Resource
Counts []SearchResource Count - Number of resources that match the query. See
resource_count
below. - Resources
[]Search
Resource - List of structures that describe the resources that match the query. See
resources
below. - View
Arn string
- id String
- Query String.
- query
String String - resource
Counts List<SearchResource Count> - Number of resources that match the query. See
resource_count
below. - resources
List<Search
Resource> - List of structures that describe the resources that match the query. See
resources
below. - view
Arn String
- id string
- Query String.
- query
String string - resource
Counts SearchResource Count[] - Number of resources that match the query. See
resource_count
below. - resources
Search
Resource[] - List of structures that describe the resources that match the query. See
resources
below. - view
Arn string
- id str
- Query String.
- query_
string str - resource_
counts Sequence[SearchResource Count] - Number of resources that match the query. See
resource_count
below. - resources
Sequence[Search
Resource] - List of structures that describe the resources that match the query. See
resources
below. - view_
arn str
- id String
- Query String.
- query
String String - resource
Counts 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. - view
Arn String
Supporting Types
SearchResource
- Arn string
- Amazon resource name of resource.
- Last
Reported stringAt - The date and time that the information about this resource property was last updated.
- Owning
Account stringId - Amazon Web Services account that owns the resource.
- Properties
List<Search
Resource Property> - 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.
- Resource
Type 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.
- Last
Reported stringAt - The date and time that the information about this resource property was last updated.
- Owning
Account stringId - Amazon Web Services account that owns the resource.
- Properties
[]Search
Resource Property - 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.
- Resource
Type 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.
- last
Reported StringAt - The date and time that the information about this resource property was last updated.
- owning
Account StringId - Amazon Web Services account that owns the resource.
- properties
List<Search
Resource Property> - 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.
- resource
Type 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.
- last
Reported stringAt - The date and time that the information about this resource property was last updated.
- owning
Account stringId - Amazon Web Services account that owns the resource.
- properties
Search
Resource Property[] - 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.
- resource
Type 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[Search
Resource Property] - 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.
- last
Reported StringAt - The date and time that the information about this resource property was last updated.
- owning
Account StringId - Amazon Web Services account that owns the resource.
- properties List<Property Map>
- 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.
- resource
Type 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.
- 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 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.
- total
Resources 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.
- total
Resources 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.
- total
Resources 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.
- Last
Reported 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.
- Last
Reported 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.
- last
Reported 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.
- last
Reported 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.
- last
Reported 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
aws
Terraform Provider.