vSphere

Pulumi Official
Package maintained by Pulumi
v4.1.0 published on Wednesday, Nov 24, 2021 by Pulumi

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/v4/go/vsphere"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := vsphere.LookupTagCategory(ctx, &GetTagCategoryArgs{
			Name: "test-category",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

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",
}));

Coming soon!

Using getTagCategory

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTagCategory(args: GetTagCategoryArgs, opts?: InvokeOptions): Promise<GetTagCategoryResult>
function getTagCategoryOutput(args: GetTagCategoryOutputArgs, opts?: InvokeOptions): Output<GetTagCategoryResult>
def get_tag_category(name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetTagCategoryResult
def get_tag_category_output(name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetTagCategoryResult]
func LookupTagCategory(ctx *Context, args *LookupTagCategoryArgs, opts ...InvokeOption) (*LookupTagCategoryResult, error)
func LookupTagCategoryOutput(ctx *Context, args *LookupTagCategoryOutputArgs, opts ...InvokeOption) LookupTagCategoryResultOutput

> Note: This function is named LookupTagCategory in the Go SDK.

public static class GetTagCategory 
{
    public static Task<GetTagCategoryResult> InvokeAsync(GetTagCategoryArgs args, InvokeOptions? opts = null)
    public static Output<GetTagCategoryResult> Invoke(GetTagCategoryInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTagCategoryResult> getTagCategory(GetTagCategoryArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: vsphere:index/getTagCategory:getTagCategory
  Arguments:
    # Arguments dictionary

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 string

The name of the tag category.

name str

The name of the tag category.

name String

The name of the tag category.

getTagCategory Result

The following output properties are available:

AssociableTypes List<string>
Cardinality string
Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
AssociableTypes []string
Cardinality string
Description string
Id string

The provider-assigned unique ID for this managed resource.

Name string
associableTypes List
cardinality String
description String
id String

The provider-assigned unique ID for this managed resource.

name String
associableTypes 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
associableTypes List
cardinality String
description String
id String

The provider-assigned unique ID for this managed resource.

name String

Package Details

Repository
https://github.com/pulumi/pulumi-vsphere
License
Apache-2.0
Notes

This Pulumi package is based on the vsphere Terraform Provider.