@pulumi/vsphere
Version:
A Pulumi package for creating vsphere resources
170 lines (169 loc) • 5.98 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a VMware vSphere datacenter resource. This can be used as the primary
* container of inventory objects such as hosts and virtual machines.
*
* ## Example Usage
*
* ### Create datacenter on the root folder
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const prodDatacenter = new vsphere.Datacenter("prod_datacenter", {name: "my_prod_datacenter"});
* ```
*
* ### Create datacenter on a subfolder
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as vsphere from "@pulumi/vsphere";
*
* const researchDatacenter = new vsphere.Datacenter("research_datacenter", {
* name: "my_research_datacenter",
* folder: "/research/",
* });
* ```
*
* ## Import
*
* An existing datacenter can be imported into this resource
*
* via supplying the full path to the datacenter. An example is below:
*
* [docs-import]: /docs/import/index.html
*
* ```sh
* $ pulumi import vsphere:index/datacenter:Datacenter dc /dc1
* ```
*
* The above would import the datacenter named `dc1`.
*/
export declare class Datacenter extends pulumi.CustomResource {
/**
* Get an existing Datacenter 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?: DatacenterState, opts?: pulumi.CustomResourceOptions): Datacenter;
/**
* Returns true if the given object is an instance of Datacenter. 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 Datacenter;
/**
* Map of custom attribute ids to value
* strings to set for datacenter resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*
* [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource
*
* > **NOTE:** Custom attributes are unsupported on direct ESXi connections
* and require vCenter.
*/
readonly customAttributes: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* The folder where the datacenter should be created.
* Forces a new resource if changed.
*/
readonly folder: pulumi.Output<string | undefined>;
/**
* Managed object ID of this datacenter.
*/
readonly moid: pulumi.Output<string>;
/**
* The name of the datacenter. This name needs to be unique
* within the folder. Forces a new resource if changed.
*/
readonly name: pulumi.Output<string>;
/**
* The IDs of any tags to attach to this resource.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* Create a Datacenter 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?: DatacenterArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Datacenter resources.
*/
export interface DatacenterState {
/**
* Map of custom attribute ids to value
* strings to set for datacenter resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*
* [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource
*
* > **NOTE:** Custom attributes are unsupported on direct ESXi connections
* and require vCenter.
*/
customAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The folder where the datacenter should be created.
* Forces a new resource if changed.
*/
folder?: pulumi.Input<string>;
/**
* Managed object ID of this datacenter.
*/
moid?: pulumi.Input<string>;
/**
* The name of the datacenter. This name needs to be unique
* within the folder. Forces a new resource if changed.
*/
name?: pulumi.Input<string>;
/**
* The IDs of any tags to attach to this resource.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}
/**
* The set of arguments for constructing a Datacenter resource.
*/
export interface DatacenterArgs {
/**
* Map of custom attribute ids to value
* strings to set for datacenter resource. See
* [here][docs-setting-custom-attributes] for a reference on how to set values
* for custom attributes.
*
* [docs-setting-custom-attributes]: /docs/providers/vsphere/r/custom_attribute.html#using-custom-attributes-in-a-supported-resource
*
* > **NOTE:** Custom attributes are unsupported on direct ESXi connections
* and require vCenter.
*/
customAttributes?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
/**
* The folder where the datacenter should be created.
* Forces a new resource if changed.
*/
folder?: pulumi.Input<string>;
/**
* The name of the datacenter. This name needs to be unique
* within the folder. Forces a new resource if changed.
*/
name?: pulumi.Input<string>;
/**
* The IDs of any tags to attach to this resource.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
}