@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
107 lines (106 loc) • 4.31 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* The `vsphere.CustomAttribute` resource can be used to create and manage custom
* attributes, which allow users to associate user-specific meta-information with
* vSphere managed objects. Custom attribute values must be strings and are stored
* on the vCenter Server and not the managed object.
*
* For more information about custom attributes, click [here][ext-custom-attributes].
*
* [ext-custom-attributes]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vcenter-and-host-management-8-0/vsphere-tags-and-attributes-host-management/custom-attributes-in-the-vsphere-client-host-management.html
*
* > **NOTE:** Custom attributes are unsupported on direct ESXi host connections
* and require vCenter Server.
*
* ## Example Usage
*
* This example creates a custom attribute named `test-attribute`. The
* resulting custom attribute can be assigned to VMs only.
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const attribute = new vsphere.CustomAttribute("attribute", {
* name: "test-attribute",
* managedObjectType: "VirtualMachine",
* });
* ```
*
* ## Import
*
* An existing custom attribute can be imported into this resource
*
* via its name, using the following command:
*
* [docs-import]: https://developer.hashicorp.com/terraform/cli/import
*
* ```sh
* $ pulumi import vsphere:index/customAttribute:CustomAttribute attribute terraform-test-attribute
* ```
*/
export declare class CustomAttribute extends pulumi.CustomResource {
/**
* Get an existing CustomAttribute resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: CustomAttributeState, opts?: pulumi.CustomResourceOptions): CustomAttribute;
/**
* Returns true if the given object is an instance of CustomAttribute. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is CustomAttribute;
/**
* The object type that this attribute may be
* applied to. If not set, the custom attribute may be applied to any object
* type. For a full list, review the Managed Object Types. Forces a new resource if changed.
*/
readonly managedObjectType: pulumi.Output<string | undefined>;
/**
* The name of the custom attribute.
*/
readonly name: pulumi.Output<string>;
/**
* Create a CustomAttribute resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args?: CustomAttributeArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CustomAttribute resources.
*/
export interface CustomAttributeState {
/**
* The object type that this attribute may be
* applied to. If not set, the custom attribute may be applied to any object
* type. For a full list, review the Managed Object Types. Forces a new resource if changed.
*/
managedObjectType?: pulumi.Input<string>;
/**
* The name of the custom attribute.
*/
name?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a CustomAttribute resource.
*/
export interface CustomAttributeArgs {
/**
* The object type that this attribute may be
* applied to. If not set, the custom attribute may be applied to any object
* type. For a full list, review the Managed Object Types. Forces a new resource if changed.
*/
managedObjectType?: pulumi.Input<string>;
/**
* The name of the custom attribute.
*/
name?: pulumi.Input<string>;
}