getTagCategory
The vsphere.TagCategory
data source can be used to reference tag categories
that are not managed by this provider. Its attributes are exactly the same as the
vsphere.TagCategory
resource, and, like importing,
the data source takes a name 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.
Example Usage
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var category = Output.Create(VSphere.GetTagCategory.InvokeAsync(new VSphere.GetTagCategoryArgs
{
Name = "test-category",
}));
}
}
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v2/go/vsphere"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.LookupTagCategory(ctx, &vsphere.LookupTagCategoryArgs{
Name: "test-category",
}, nil)
if err != nil {
return err
}
return nil
})
}
import pulumi
import pulumi_vsphere as vsphere
category = vsphere.get_tag_category(name="test-category")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const category = pulumi.output(vsphere.getTagCategory({
name: "test-category",
}, { async: true }));
Using getTagCategory
function getTagCategory(args: GetTagCategoryArgs, opts?: InvokeOptions): Promise<GetTagCategoryResult>
def get_tag_category(name: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetTagCategoryResult
func LookupTagCategory(ctx *Context, args *LookupTagCategoryArgs, opts ...InvokeOption) (*LookupTagCategoryResult, error)
Note: This function is named
LookupTagCategory
in the Go SDK.
public static class GetTagCategory {
public static Task<GetTagCategoryResult> InvokeAsync(GetTagCategoryArgs args, InvokeOptions? opts = null)
}
The following arguments are supported:
- Name string
The name of the tag category.
- Name string
The name of the tag category.
- name string
The name of the tag category.
- name str
The name of the tag category.
getTagCategory Result
The following output properties are available:
- Associable
Types List<string> - Cardinality string
- Description string
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- Associable
Types []string - Cardinality string
- Description string
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
- associable
Types string[] - cardinality string
- description string
- id string
The provider-assigned unique ID for this managed resource.
- name string
- associable_
types Sequence[str] - cardinality str
- description str
- id str
The provider-assigned unique ID for this managed resource.
- name str
Package Details
- Repository
- https://github.com/pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
vsphere
Terraform Provider.