Show / Hide Table of Contents

Class VappContainer

The vsphere..VappContainer resource can be used to create and manage vApps.

For more information on vSphere vApps, see this page.

Example Usage

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var datacenter = config.Get("datacenter") ?? "dc1";
    var cluster = config.Get("cluster") ?? "cluster1";
    var dc = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
    {
        Name = datacenter,
    }));
    var computeCluster = dc.Apply(dc => Output.Create(VSphere.GetComputeCluster.InvokeAsync(new VSphere.GetComputeClusterArgs
    {
        DatacenterId = dc.Id,
        Name = cluster,
    })));
    var vappContainer = new VSphere.VappContainer("vappContainer", new VSphere.VappContainerArgs
    {
        ParentResourcePoolId = computeCluster.Apply(computeCluster => computeCluster.Id),
    });
}

}

Example with virtual machine

using Pulumi;
using VSphere = Pulumi.VSphere;

class MyStack : Stack
{
public MyStack()
{
    var config = new Config();
    var datacenter = config.Get("datacenter") ?? "dc1";
    var cluster = config.Get("cluster") ?? "cluster1";
    var dc = Output.Create(VSphere.GetDatacenter.InvokeAsync(new VSphere.GetDatacenterArgs
    {
        Name = datacenter,
    }));
    var computeCluster = dc.Apply(dc => Output.Create(VSphere.GetComputeCluster.InvokeAsync(new VSphere.GetComputeClusterArgs
    {
        DatacenterId = dc.Id,
        Name = cluster,
    })));
    var network = dc.Apply(dc => Output.Create(VSphere.GetNetwork.InvokeAsync(new VSphere.GetNetworkArgs
    {
        DatacenterId = dc.Id,
        Name = "network1",
    })));
    var datastore = dc.Apply(dc => Output.Create(VSphere.GetDatastore.InvokeAsync(new VSphere.GetDatastoreArgs
    {
        DatacenterId = dc.Id,
        Name = "datastore1",
    })));
    var vappContainer = new VSphere.VappContainer("vappContainer", new VSphere.VappContainerArgs
    {
        ParentResourcePoolId = computeCluster.Apply(computeCluster => computeCluster.Id),
    });
    var vm = new VSphere.VirtualMachine("vm", new VSphere.VirtualMachineArgs
    {
        DatastoreId = datastore.Apply(datastore => datastore.Id),
        Disks = 
        {
            new VSphere.Inputs.VirtualMachineDiskArgs
            {
                Label = "disk0",
                Size = 1,
            },
        },
        GuestId = "ubuntu64Guest",
        Memory = 1024,
        NetworkInterfaces = 
        {
            new VSphere.Inputs.VirtualMachineNetworkInterfaceArgs
            {
                NetworkId = network.Apply(network => network.Id),
            },
        },
        NumCpus = 2,
        ResourcePoolId = vappContainer.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
VappContainer
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 VappContainer : CustomResource

Constructors

View Source

VappContainer(String, VappContainerArgs, CustomResourceOptions)

Create a VappContainer resource with the given unique name, arguments, and options.

Declaration
public VappContainer(string name, VappContainerArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

VappContainerArgs 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

CpuExpandable

Determines if the reservation on a vApp container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

Declaration
public Output<bool?> CpuExpandable { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

CpuLimit

The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

Declaration
public Output<int?> CpuLimit { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

CpuReservation

Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0

Declaration
public Output<int?> CpuReservation { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

CpuShareLevel

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in cpu_shares will be ignored. Default: normal

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

CpuShares

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, cpu_share_level must be custom.

Declaration
public Output<int> CpuShares { get; }
Property Value
Type Description
Output<System.Int32>
View Source

CustomAttributes

A list of custom attributes to set on this resource.

Declaration
public Output<ImmutableDictionary<string, string>> CustomAttributes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>>
View Source

MemoryExpandable

Determines if the reservation on a vApp container can grow beyond the specified value if the parent resource pool has unreserved resources. Default: true

Declaration
public Output<bool?> MemoryExpandable { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

MemoryLimit

The CPU utilization of a vApp container will not exceed this limit, even if there are available resources. Set to -1 for unlimited. Default: -1

Declaration
public Output<int?> MemoryLimit { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

MemoryReservation

Amount of CPU (MHz) that is guaranteed available to the vApp container. Default: 0

Declaration
public Output<int?> MemoryReservation { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

MemoryShareLevel

The CPU allocation level. The level is a simplified view of shares. Levels map to a pre-determined set of numeric values for shares. Can be one of low, normal, high, or custom. When low, normal, or high are specified values in memory_shares will be ignored. Default: normal

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

MemoryShares

The number of shares allocated for CPU. Used to determine resource allocation in case of resource contention. If this is set, memory_share_level must be custom.

Declaration
public Output<int> MemoryShares { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Name

The name of the vApp container.

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

ParentFolderId

The managed object ID of the vApp container's parent folder.

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

ParentResourcePoolId

The managed object ID of the parent resource pool. This can be the root resource pool for a cluster or standalone host, or a resource pool itself. When moving a vApp container from one parent resource pool to another, both must share a common root resource pool or the move will fail.

Declaration
public Output<string> ParentResourcePoolId { 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>, VappContainerState, CustomResourceOptions)

Get an existing VappContainer resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static VappContainer Get(string name, Input<string> id, VappContainerState 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.

VappContainerState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
VappContainer
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.