Show / Hide Table of Contents

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

}
Inheritance
System.Object
Resource
CustomResource
Datacenter
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public class Datacenter : CustomResource

Constructors

View Source

Datacenter(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 Source

CustomAttributes

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>>
View Source

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>
View Source

Moid

Managed object ID of this datacenter.

Declaration
public Output<string> Moid { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.