@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
94 lines (93 loc) • 2.75 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* 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 is not supported on direct ESXi hosts connections and
* requires vCenter Server.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const category = vsphere.getTagCategory({
* name: "example-category",
* });
* const tag = category.then(category => vsphere.getTag({
* name: "example-tag",
* categoryId: category.id,
* }));
* ```
*/
export declare function getTag(args: GetTagArgs, opts?: pulumi.InvokeOptions): Promise<GetTagResult>;
/**
* A collection of arguments for invoking getTag.
*/
export interface GetTagArgs {
/**
* The ID of the tag category in which the tag is
* located.
*/
categoryId: string;
/**
* The name of the tag.
*/
name: string;
}
/**
* A collection of values returned by getTag.
*/
export interface GetTagResult {
readonly categoryId: string;
readonly description: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly name: string;
}
/**
* 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 is not supported on direct ESXi hosts connections and
* requires vCenter Server.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const category = vsphere.getTagCategory({
* name: "example-category",
* });
* const tag = category.then(category => vsphere.getTag({
* name: "example-tag",
* categoryId: category.id,
* }));
* ```
*/
export declare function getTagOutput(args: GetTagOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetTagResult>;
/**
* A collection of arguments for invoking getTag.
*/
export interface GetTagOutputArgs {
/**
* The ID of the tag category in which the tag is
* located.
*/
categoryId: pulumi.Input<string>;
/**
* The name of the tag.
*/
name: pulumi.Input<string>;
}