Class Datacenter
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
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var prodDatacenter = new VSphere.Datacenter("prodDatacenter", new VSphere.DatacenterArgs
{
});
}
}
Create datacenter on a subfolder
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var researchDatacenter = new VSphere.Datacenter("researchDatacenter", new VSphere.DatacenterArgs
{
Folder = "/research/",
});
}
}
Inherited Members
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public class Datacenter : CustomResource
Constructors
View SourceDatacenter(String, DatacenterArgs, CustomResourceOptions)
Create a Datacenter resource with the given unique name, arguments, and options.
Declaration
public Datacenter(string name, DatacenterArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| DatacenterArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCustomAttributes
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.
Declaration
public Output<ImmutableDictionary<string, string>> CustomAttributes { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
Folder
The folder where the datacenter should be created. Forces a new resource if changed.
Declaration
public Output<string> Folder { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Moid
Managed object ID of this datacenter.
Declaration
public Output<string> Moid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
The IDs of any tags to attach to this resource.
Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Methods
View SourceGet(String, Input<String>, DatacenterState, CustomResourceOptions)
Get an existing Datacenter resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Datacenter Get(string name, Input<string> id, DatacenterState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| DatacenterState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Datacenter |