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

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.View

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

    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)
    public View(String name, ViewArgs args)
    public View(String name, ViewArgs args, CustomResourceOptions options)
    
    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:

    DefaultView bool
    Specifies whether the view is the default view for the AWS Region. Default: false.
    Filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    IncludedProperties List<ViewIncludedProperty>
    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.
    Tags 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.
    DefaultView bool
    Specifies whether the view is the default view for the AWS Region. Default: false.
    Filters ViewFiltersArgs
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    IncludedProperties []ViewIncludedPropertyArgs
    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.
    Tags 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.
    defaultView Boolean
    Specifies whether the view is the default view for the AWS Region. Default: false.
    filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    includedProperties List<ViewIncludedProperty>
    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.
    tags 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.
    defaultView boolean
    Specifies whether the view is the default view for the AWS Region. Default: false.
    filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    includedProperties ViewIncludedProperty[]
    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.
    tags {[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 ViewFiltersArgs
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    included_properties Sequence[ViewIncludedPropertyArgs]
    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.
    tags 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.
    defaultView 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.
    includedProperties 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.
    tags 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:

    Arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the Resource Explorer view.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn str
    Amazon Resource Name (ARN) of the Resource Explorer view.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the Resource Explorer view.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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.
    The following state arguments are supported:
    Arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    DefaultView bool
    Specifies whether the view is the default view for the AWS Region. Default: false.
    Filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    IncludedProperties List<ViewIncludedProperty>
    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.
    Tags 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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    DefaultView bool
    Specifies whether the view is the default view for the AWS Region. Default: false.
    Filters ViewFiltersArgs
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    IncludedProperties []ViewIncludedPropertyArgs
    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.
    Tags 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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the Resource Explorer view.
    defaultView Boolean
    Specifies whether the view is the default view for the AWS Region. Default: false.
    filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    includedProperties List<ViewIncludedProperty>
    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.
    tags 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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    Amazon Resource Name (ARN) of the Resource Explorer view.
    defaultView boolean
    Specifies whether the view is the default view for the AWS Region. Default: false.
    filters ViewFilters
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    includedProperties ViewIncludedProperty[]
    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.
    tags {[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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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 ViewFiltersArgs
    Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
    included_properties Sequence[ViewIncludedPropertyArgs]
    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.
    tags 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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    Amazon Resource Name (ARN) of the Resource Explorer view.
    defaultView 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.
    includedProperties 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.
    tags 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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Supporting Types

    ViewFilters, ViewFiltersArgs

    FilterString 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.
    FilterString 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.
    filterString 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.
    filterString 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.
    filterString 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.
    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