View class

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", {
    filters: {
        filterString: "resourcetype:ec2:instance",
    },
    includedProperties: [{
        name: "tags",
    }],
    name: "exampleview",
}, {
    dependsOn: [example],
});
import pulumi
import pulumi_aws as aws

example = aws.resourceexplorer.Index("example", type="LOCAL")
example_view = aws.resourceexplorer.View("example",
    filters={
        "filter_string": "resourcetype:ec2:instance",
    },
    included_properties=[{
        "name": "tags",
    }],
    name="exampleview",
    opts = pulumi.ResourceOptions(depends_on=[example]))
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()
    {
        Filters = new Aws.ResourceExplorer.Inputs.ViewFiltersArgs
        {
            FilterString = "resourcetype:ec2:instance",
        },
        IncludedProperties = new[]
        {
            new Aws.ResourceExplorer.Inputs.ViewIncludedPropertyArgs
            {
                Name = "tags",
            },
        },
        Name = "exampleview",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            example,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v7/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{
			Filters: &resourceexplorer.ViewFiltersArgs{
				FilterString: pulumi.String("resourcetype:ec2:instance"),
			},
			IncludedProperties: resourceexplorer.ViewIncludedPropertyArray{
				&resourceexplorer.ViewIncludedPropertyArgs{
					Name: pulumi.String("tags"),
				},
			},
			Name: pulumi.String("exampleview"),
		}, pulumi.DependsOn([]pulumi.Resource{
			example,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_resourceexplorer_index" "example" {
  type = "LOCAL"
}
resource "aws_resourceexplorer_view" "example" {
  depends_on = [aws_resourceexplorer_index.example]
  filters = {
    filter_string = "resourcetype:ec2:instance"
  }
  included_properties {
    name = "tags"
  }
  name = "exampleview"
}
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.ArrayList;
import java.util.Arrays;
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()
            .filters(ViewFiltersArgs.builder()
                .filterString("resourcetype:ec2:instance")
                .build())
            .includedProperties(ViewIncludedPropertyArgs.builder()
                .name("tags")
                .build())
            .name("exampleview")
            .build(), CustomResourceOptions.builder()
                .dependsOn(example)
                .build());

    }
}
resources:
  example:
    type: aws:resourceexplorer:Index
    properties:
      type: LOCAL
  exampleView:
    type: aws:resourceexplorer:View
    name: example
    properties:
      filters:
        filterString: resourcetype:ec2:instance
      includedProperties:
        - name: tags
      name: exampleview
    options:
      dependsOn:
        - ${example}

Import

Identity Schema

Required

  • arn (String) ARN of the Resource Explorer view.

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

Constructors

View(String name, {ViewArgs? args, CustomResourceOptions? options})
Creates a new View. name The Pulumi resource name. args Arguments used to configure this View. The set of arguments for View. options Resource options controlling this resource's behavior.
View.reference(String urn)
Creates a typed reference to an existing View resource.

Properties

arn ↔ Output<String>
ARN of the Resource Explorer view.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
defaultView ↔ Output<bool>
Specifies whether the view is the default view for the AWS Region. Default: false.
latefinal
filters ↔ Output<ViewFilters?>
Specifies which resources are included in the results of queries made using this view. See Filters below for more details.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
includedProperties ↔ Output<List<ViewIncludedProperty>?>
Optional fields to be included in search results from this view. See Included Properties below for more details.
latefinal
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
name ↔ Output<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.
latefinal
region ↔ Output<String>
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope ↔ Output<String>
The root ARN of the account, an organizational unit (OU), or an organization ARN. If left empty, the default is account.
latefinal
tags ↔ Output<Map<String, String>?>
Key-value map of resource tags. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {ViewState? state, CustomResourceOptions? options}) → View
Gets an existing View resource's state with the given name and id.