Show / Hide Table of Contents

Class Tag

The vsphere..Tag resource can be used to create and manage tags, which allow you to attach metadata to objects in the vSphere inventory to make these objects more sortable and searchable.

For more information about tags, click here.

NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
public MyStack()
{
    var category = new VSphere.TagCategory("category", new VSphere.TagCategoryArgs
    {
        AssociableTypes = 
        {
            "VirtualMachine",
            "Datastore",
        },
        Cardinality = "SINGLE",
        Description = "Managed by Pulumi",
    });
    var tag = new VSphere.Tag("tag", new VSphere.TagArgs
    {
        CategoryId = category.Id,
        Description = "Managed by Pulumi",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Tag
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public class Tag : CustomResource

Constructors

View Source

Tag(String, TagArgs, CustomResourceOptions)

Create a Tag resource with the given unique name, arguments, and options.

Declaration
public Tag(string name, TagArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

TagArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

CategoryId

The unique identifier of the parent category in which this tag will be created. Forces a new resource if changed.

Declaration
public Output<string> CategoryId { get; }
Property Value
Type Description
Output<System.String>
View Source

Description

A description for the tag.

Declaration
public Output<string> Description { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The display name of the tag. The name must be unique within its category.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, TagState, CustomResourceOptions)

Get an existing Tag resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Tag Get(string name, Input<string> id, TagState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

TagState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Tag
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.