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)
public static Output<SearchResult> search(SearchArgs args, InvokeOptions options)
fn::invoke:
function: aws:resourceexplorer:Search
arguments:
# arguments dictionary
The following arguments are supported:
- Query
String 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:
- 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 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:
- 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 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:
- 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 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:
- 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 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.
- query
String 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:
- 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
This property is required. string - Amazon resource name of resource.
- Last
Reported At This property is required. string - The date and time that the information about this resource property was last updated.
- Owning
Account Id This property is required. string - Amazon Web Services account that owns the resource.
- Properties
This property is required. List<SearchResource Property> - 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.
- Resource
Type 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.
- Last
Reported At This property is required. string - The date and time that the information about this resource property was last updated.
- Owning
Account Id This property is required. string - Amazon Web Services account that owns the resource.
- Properties
This property is required. []SearchResource Property - 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.
- Resource
Type 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.
- last
Reported At This property is required. String - The date and time that the information about this resource property was last updated.
- owning
Account Id This property is required. String - Amazon Web Services account that owns the resource.
- properties
This property is required. List<SearchResource Property> - 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.
- resource
Type 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.
- last
Reported At This property is required. string - The date and time that the information about this resource property was last updated.
- owning
Account Id This property is required. string - Amazon Web Services account that owns the resource.
- properties
This property is required. SearchResource Property[] - 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.
- resource
Type 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[SearchResource Property] - 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.
- last
Reported At This property is required. String - The date and time that the information about this resource property was last updated.
- owning
Account Id 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.
- resource
Type 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.
- 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. 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.
- total
Resources 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.
- total
Resources 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.
- total
Resources 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.
- Last
Reported At 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.
- Last
Reported At 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.
- last
Reported At 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.
- last
Reported At 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.
- last
Reported At 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.