Try AWS Native preview for resources not in the classic version.
aws.resourceexplorer.View
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides a resource to manage a Resource Explorer view.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.resourceexplorer.Index("example", {type: "LOCAL"});
const exampleView = new aws.resourceexplorer.View("example", {
name: "exampleview",
filters: {
filterString: "resourcetype:ec2:instance",
},
includedProperties: [{
name: "tags",
}],
}, {
dependsOn: [example],
});
import pulumi
import pulumi_aws as aws
example = aws.resourceexplorer.Index("example", type="LOCAL")
example_view = aws.resourceexplorer.View("example",
name="exampleview",
filters={
"filterString": "resourcetype:ec2:instance",
},
included_properties=[{
"name": "tags",
}],
opts = pulumi.ResourceOptions(depends_on=[example]))
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 {
example, err := resourceexplorer.NewIndex(ctx, "example", &resourceexplorer.IndexArgs{
Type: pulumi.String("LOCAL"),
})
if err != nil {
return err
}
_, err = resourceexplorer.NewView(ctx, "example", &resourceexplorer.ViewArgs{
Name: pulumi.String("exampleview"),
Filters: &resourceexplorer.ViewFiltersArgs{
FilterString: pulumi.String("resourcetype:ec2:instance"),
},
IncludedProperties: resourceexplorer.ViewIncludedPropertyArray{
&resourceexplorer.ViewIncludedPropertyArgs{
Name: pulumi.String("tags"),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
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 = new Aws.ResourceExplorer.Index("example", new()
{
Type = "LOCAL",
});
var exampleView = new Aws.ResourceExplorer.View("example", new()
{
Name = "exampleview",
Filters = new Aws.ResourceExplorer.Inputs.ViewFiltersArgs
{
FilterString = "resourcetype:ec2:instance",
},
IncludedProperties = new[]
{
new Aws.ResourceExplorer.Inputs.ViewIncludedPropertyArgs
{
Name = "tags",
},
},
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.resourceexplorer.Index;
import com.pulumi.aws.resourceexplorer.IndexArgs;
import com.pulumi.aws.resourceexplorer.View;
import com.pulumi.aws.resourceexplorer.ViewArgs;
import com.pulumi.aws.resourceexplorer.inputs.ViewFiltersArgs;
import com.pulumi.aws.resourceexplorer.inputs.ViewIncludedPropertyArgs;
import com.pulumi.resources.CustomResourceOptions;
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) {
var example = new Index("example", IndexArgs.builder()
.type("LOCAL")
.build());
var exampleView = new View("exampleView", ViewArgs.builder()
.name("exampleview")
.filters(ViewFiltersArgs.builder()
.filterString("resourcetype:ec2:instance")
.build())
.includedProperties(ViewIncludedPropertyArgs.builder()
.name("tags")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
}
}
resources:
example:
type: aws:resourceexplorer:Index
properties:
type: LOCAL
exampleView:
type: aws:resourceexplorer:View
name: example
properties:
name: exampleview
filters:
filterString: resourcetype:ec2:instance
includedProperties:
- name: tags
options:
dependson:
- ${example}
Create View Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new View(name: string, args?: ViewArgs, opts?: CustomResourceOptions);
@overload
def View(resource_name: str,
args: Optional[ViewArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def View(resource_name: str,
opts: Optional[ResourceOptions] = None,
default_view: Optional[bool] = None,
filters: Optional[ViewFiltersArgs] = None,
included_properties: Optional[Sequence[ViewIncludedPropertyArgs]] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewView(ctx *Context, name string, args *ViewArgs, opts ...ResourceOption) (*View, error)
public View(string name, ViewArgs? args = null, CustomResourceOptions? opts = null)
type: aws:resourceexplorer:View
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var viewResource = new Aws.ResourceExplorer.View("viewResource", new()
{
DefaultView = false,
Filters = new Aws.ResourceExplorer.Inputs.ViewFiltersArgs
{
FilterString = "string",
},
IncludedProperties = new[]
{
new Aws.ResourceExplorer.Inputs.ViewIncludedPropertyArgs
{
Name = "string",
},
},
Name = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := resourceexplorer.NewView(ctx, "viewResource", &resourceexplorer.ViewArgs{
DefaultView: pulumi.Bool(false),
Filters: &resourceexplorer.ViewFiltersArgs{
FilterString: pulumi.String("string"),
},
IncludedProperties: resourceexplorer.ViewIncludedPropertyArray{
&resourceexplorer.ViewIncludedPropertyArgs{
Name: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var viewResource = new View("viewResource", ViewArgs.builder()
.defaultView(false)
.filters(ViewFiltersArgs.builder()
.filterString("string")
.build())
.includedProperties(ViewIncludedPropertyArgs.builder()
.name("string")
.build())
.name("string")
.tags(Map.of("string", "string"))
.build());
view_resource = aws.resourceexplorer.View("viewResource",
default_view=False,
filters={
"filterString": "string",
},
included_properties=[{
"name": "string",
}],
name="string",
tags={
"string": "string",
})
const viewResource = new aws.resourceexplorer.View("viewResource", {
defaultView: false,
filters: {
filterString: "string",
},
includedProperties: [{
name: "string",
}],
name: "string",
tags: {
string: "string",
},
});
type: aws:resourceexplorer:View
properties:
defaultView: false
filters:
filterString: string
includedProperties:
- name: string
name: string
tags:
string: string
View Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The View resource accepts the following input properties:
- Default
View bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - Filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- Included
Properties List<ViewIncluded Property> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- Name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- Default
View bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - Filters
View
Filters Args - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- Included
Properties []ViewIncluded Property Args - Optional fields to be included in search results from this view. See Included Properties below for more details.
- Name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- map[string]string
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- default
View Boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties List<ViewIncluded Property> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name String
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- default
View boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties ViewIncluded Property[] - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- default_
view bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters Args - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included_
properties Sequence[ViewIncluded Property Args] - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name str
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
- default
View Boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters Property Map
- Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties List<Property Map> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name String
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Map<String>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Outputs
All input properties are implicitly available as output properties. Additionally, the View resource produces the following output properties:
Look up Existing View Resource
Get an existing View resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ViewState, opts?: CustomResourceOptions): View
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
default_view: Optional[bool] = None,
filters: Optional[ViewFiltersArgs] = None,
included_properties: Optional[Sequence[ViewIncludedPropertyArgs]] = None,
name: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None) -> View
func GetView(ctx *Context, name string, id IDInput, state *ViewState, opts ...ResourceOption) (*View, error)
public static View Get(string name, Input<string> id, ViewState? state, CustomResourceOptions? opts = null)
public static View get(String name, Output<String> id, ViewState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- Amazon Resource Name (ARN) of the Resource Explorer view.
- Default
View bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - Filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- Included
Properties List<ViewIncluded Property> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- Name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Dictionary<string, string>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- Amazon Resource Name (ARN) of the Resource Explorer view.
- Default
View bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - Filters
View
Filters Args - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- Included
Properties []ViewIncluded Property Args - Optional fields to be included in search results from this view. See Included Properties below for more details.
- Name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- map[string]string
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- Amazon Resource Name (ARN) of the Resource Explorer view.
- default
View Boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties List<ViewIncluded Property> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name String
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Map<String,String>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- Amazon Resource Name (ARN) of the Resource Explorer view.
- default
View boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties ViewIncluded Property[] - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name string
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- {[key: string]: string}
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- Amazon Resource Name (ARN) of the Resource Explorer view.
- default_
view bool - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters
View
Filters Args - Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included_
properties Sequence[ViewIncluded Property Args] - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name str
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Mapping[str, str]
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- Amazon Resource Name (ARN) of the Resource Explorer view.
- default
View Boolean - Specifies whether the view is the default view for the AWS Region. Default:
false
. - filters Property Map
- Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
- included
Properties List<Property Map> - Optional fields to be included in search results from this view. See Included Properties below for more details.
- name String
- The name of the view. The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its AWS Region.
- Map<String>
- Key-value map of resource tags. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Supporting Types
ViewFilters, ViewFiltersArgs
- Filter
String string - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
- Filter
String string - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
- filter
String String - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
- filter
String string - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
- filter_
string str - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
- filter
String String - The string that contains the search keywords, prefixes, and operators to control the results that can be returned by a search operation. For more details, see Search query syntax.
ViewIncludedProperty, ViewIncludedPropertyArgs
- Name string
- The name of the property that is included in this view. Valid values:
tags
.
- Name string
- The name of the property that is included in this view. Valid values:
tags
.
- name String
- The name of the property that is included in this view. Valid values:
tags
.
- name string
- The name of the property that is included in this view. Valid values:
tags
.
- name str
- The name of the property that is included in this view. Valid values:
tags
.
- name String
- The name of the property that is included in this view. Valid values:
tags
.
Import
Using pulumi import
, import Resource Explorer views using the arn
. For example:
$ pulumi import aws:resourceexplorer/view:View example arn:aws:resource-explorer-2:us-west-2:123456789012:view/exampleview/e0914f6c-6c27-4b47-b5d4-6b28381a2421
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.