Class GetTag
Inheritance
System.Object
GetTag
Inherited Members
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 static class GetTag
Methods
View SourceInvokeAsync(GetTagArgs, InvokeOptions)
The vsphere..Tag data source can be used to reference tags that are not
managed by this provider. Its attributes are exactly the same as the vsphere..Tag
resource, and, like importing, the data source takes a name and
category to search on. The id and other attributes are then populated with
the data found by the search.
NOTE: Tagging support is unsupported on direct ESXi connections and requires vCenter 6.0 or higher.
{{% examples %}}
Example Usage
{{% example %}}
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var category = Output.Create(VSphere.GetTagCategory.InvokeAsync(new VSphere.GetTagCategoryArgs
{
Name = "test-category",
}));
var tag = category.Apply(category => Output.Create(VSphere.GetTag.InvokeAsync(new VSphere.GetTagArgs
{
CategoryId = category.Id,
Name = "test-tag",
})));
}
}
{{% /example %}} {{% /examples %}}
Declaration
public static Task<GetTagResult> InvokeAsync(GetTagArgs args, InvokeOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetTagArgs | args | |
| InvokeOptions | options |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<GetTagResult> |