Class ResourcePool
The vsphere..ResourcePool resource can be used to create and manage
resource pools in standalone hosts or on compute clusters.
For more information on vSphere resource pools, 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 resourcePool = new VSphere.ResourcePool("resourcePool", new VSphere.ResourcePoolArgs
{
ParentResourcePoolId = computeCluster.Apply(computeCluster => computeCluster.ResourcePoolId),
});
}
}
Inherited Members
Namespace: Pulumi.VSphere
Assembly: Pulumi.VSphere.dll
Syntax
public class ResourcePool : CustomResource
Constructors
View SourceResourcePool(String, ResourcePoolArgs, CustomResourceOptions)
Create a ResourcePool resource with the given unique name, arguments, and options.
Declaration
public ResourcePool(string name, ResourcePoolArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| ResourcePoolArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCpuExpandable
Determines if the reservation on a resource
pool 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>> |
CpuLimit
The CPU utilization of a resource pool 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>> |
CpuReservation
Amount of CPU (MHz) that is guaranteed
available to the resource pool. Default: 0
Declaration
public Output<int?> CpuReservation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
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> |
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> |
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>> |
MemoryExpandable
Determines if the reservation on a resource
pool 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>> |
MemoryLimit
The CPU utilization of a resource pool 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>> |
MemoryReservation
Amount of CPU (MHz) that is guaranteed
available to the resource pool. Default: 0
Declaration
public Output<int?> MemoryReservation { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Int32>> |
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> |
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> |
Name
The name of the resource pool.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 resource pool 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> |
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>, ResourcePoolState, CustomResourceOptions)
Get an existing ResourcePool resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static ResourcePool Get(string name, Input<string> id, ResourcePoolState 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. |
| ResourcePoolState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| ResourcePool |