vsphere.ResourcePool
Explore with Pulumi AI
The vsphere.ResourcePool
resource can be used to create and manage
resource pools on DRS-enabled vSphere clusters or standalone ESXi hosts.
For more information on vSphere resource pools, please refer to the product documentation.
Importing
Settings that Require vSphere 7.0 or higher
These settings require vSphere 7.0 or higher:
scale_descendants_shares
Example Usage
The following example sets up a resource pool in an existing compute cluster
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var datacenter = VSphere.GetDatacenter.Invoke(new()
{
Name = "dc-01",
});
var computeCluster = VSphere.GetComputeCluster.Invoke(new()
{
Name = "cluster-01",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var resourcePool = new VSphere.ResourcePool("resourcePool", new()
{
ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
});
});
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
Name: pulumi.StringRef("dc-01"),
}, nil)
if err != nil {
return err
}
computeCluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
Name: "cluster-01",
DatacenterId: pulumi.StringRef(datacenter.Id),
}, nil)
if err != nil {
return err
}
_, err = vsphere.NewResourcePool(ctx, "resourcePool", &vsphere.ResourcePoolArgs{
ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetDatacenterArgs;
import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
import com.pulumi.vsphere.ResourcePool;
import com.pulumi.vsphere.ResourcePoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
.name("dc-01")
.build());
final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
.name("cluster-01")
.datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
var resourcePool = new ResourcePool("resourcePool", ResourcePoolArgs.builder()
.parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -> getComputeClusterResult.resourcePoolId()))
.build());
}
}
import pulumi
import pulumi_vsphere as vsphere
datacenter = vsphere.get_datacenter(name="dc-01")
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
datacenter_id=datacenter.id)
resource_pool = vsphere.ResourcePool("resourcePool", parent_resource_pool_id=compute_cluster.resource_pool_id)
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const datacenter = vsphere.getDatacenter({
name: "dc-01",
});
const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
name: "cluster-01",
datacenterId: datacenter.id,
}));
const resourcePool = new vsphere.ResourcePool("resourcePool", {parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId)});
resources:
resourcePool:
type: vsphere:ResourcePool
properties:
parentResourcePoolId: ${computeCluster.resourcePoolId}
variables:
datacenter:
fn::invoke:
Function: vsphere:getDatacenter
Arguments:
name: dc-01
computeCluster:
fn::invoke:
Function: vsphere:getComputeCluster
Arguments:
name: cluster-01
datacenterId: ${datacenter.id}
of the cluster using the following
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var vm = new VSphere.VirtualMachine("vm", new()
{
ResourcePoolId = data.Vsphere_compute_cluster.Cluster.Resource_pool_id,
});
// ... other configuration ...
});
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.NewVirtualMachine(ctx, "vm", &vsphere.VirtualMachineArgs{
ResourcePoolId: pulumi.Any(data.Vsphere_compute_cluster.Cluster.Resource_pool_id),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VirtualMachine;
import com.pulumi.vsphere.VirtualMachineArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var vm = new VirtualMachine("vm", VirtualMachineArgs.builder()
.resourcePoolId(data.vsphere_compute_cluster().cluster().resource_pool_id())
.build());
}
}
import pulumi
import pulumi_vsphere as vsphere
vm = vsphere.VirtualMachine("vm", resource_pool_id=data["vsphere_compute_cluster"]["cluster"]["resource_pool_id"])
# ... other configuration ...
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const vm = new vsphere.VirtualMachine("vm", {resourcePoolId: data.vsphere_compute_cluster.cluster.resource_pool_id});
// ... other configuration ...
resources:
vm:
type: vsphere:VirtualMachine
properties:
# ... other configuration ...
resourcePoolId: ${data.vsphere_compute_cluster.cluster.resource_pool_id}
the default settings for CPU and memory reservations, shares, and limits.
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using VSphere = Pulumi.VSphere;
return await Deployment.RunAsync(() =>
{
var datacenter = VSphere.GetDatacenter.Invoke(new()
{
Name = "dc-01",
});
var computeCluster = VSphere.GetComputeCluster.Invoke(new()
{
Name = "cluster-01",
DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
});
var resourcePoolParent = new VSphere.ResourcePool("resourcePoolParent", new()
{
ParentResourcePoolId = computeCluster.Apply(getComputeClusterResult => getComputeClusterResult.ResourcePoolId),
});
var resourcePoolChild = new VSphere.ResourcePool("resourcePoolChild", new()
{
ParentResourcePoolId = resourcePoolParent.Id,
});
});
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
datacenter, err := vsphere.LookupDatacenter(ctx, &vsphere.LookupDatacenterArgs{
Name: pulumi.StringRef("dc-01"),
}, nil)
if err != nil {
return err
}
computeCluster, err := vsphere.LookupComputeCluster(ctx, &vsphere.LookupComputeClusterArgs{
Name: "cluster-01",
DatacenterId: pulumi.StringRef(datacenter.Id),
}, nil)
if err != nil {
return err
}
resourcePoolParent, err := vsphere.NewResourcePool(ctx, "resourcePoolParent", &vsphere.ResourcePoolArgs{
ParentResourcePoolId: *pulumi.String(computeCluster.ResourcePoolId),
})
if err != nil {
return err
}
_, err = vsphere.NewResourcePool(ctx, "resourcePoolChild", &vsphere.ResourcePoolArgs{
ParentResourcePoolId: resourcePoolParent.ID(),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vsphere.VsphereFunctions;
import com.pulumi.vsphere.inputs.GetDatacenterArgs;
import com.pulumi.vsphere.inputs.GetComputeClusterArgs;
import com.pulumi.vsphere.ResourcePool;
import com.pulumi.vsphere.ResourcePoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var datacenter = VsphereFunctions.getDatacenter(GetDatacenterArgs.builder()
.name("dc-01")
.build());
final var computeCluster = VsphereFunctions.getComputeCluster(GetComputeClusterArgs.builder()
.name("cluster-01")
.datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
.build());
var resourcePoolParent = new ResourcePool("resourcePoolParent", ResourcePoolArgs.builder()
.parentResourcePoolId(computeCluster.applyValue(getComputeClusterResult -> getComputeClusterResult.resourcePoolId()))
.build());
var resourcePoolChild = new ResourcePool("resourcePoolChild", ResourcePoolArgs.builder()
.parentResourcePoolId(resourcePoolParent.id())
.build());
}
}
import pulumi
import pulumi_vsphere as vsphere
datacenter = vsphere.get_datacenter(name="dc-01")
compute_cluster = vsphere.get_compute_cluster(name="cluster-01",
datacenter_id=datacenter.id)
resource_pool_parent = vsphere.ResourcePool("resourcePoolParent", parent_resource_pool_id=compute_cluster.resource_pool_id)
resource_pool_child = vsphere.ResourcePool("resourcePoolChild", parent_resource_pool_id=resource_pool_parent.id)
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const datacenter = vsphere.getDatacenter({
name: "dc-01",
});
const computeCluster = datacenter.then(datacenter => vsphere.getComputeCluster({
name: "cluster-01",
datacenterId: datacenter.id,
}));
const resourcePoolParent = new vsphere.ResourcePool("resourcePoolParent", {parentResourcePoolId: computeCluster.then(computeCluster => computeCluster.resourcePoolId)});
const resourcePoolChild = new vsphere.ResourcePool("resourcePoolChild", {parentResourcePoolId: resourcePoolParent.id});
resources:
resourcePoolParent:
type: vsphere:ResourcePool
properties:
parentResourcePoolId: ${computeCluster.resourcePoolId}
resourcePoolChild:
type: vsphere:ResourcePool
properties:
parentResourcePoolId: ${resourcePoolParent.id}
variables:
datacenter:
fn::invoke:
Function: vsphere:getDatacenter
Arguments:
name: dc-01
computeCluster:
fn::invoke:
Function: vsphere:getComputeCluster
Arguments:
name: cluster-01
datacenterId: ${datacenter.id}
Create ResourcePool Resource
new ResourcePool(name: string, args: ResourcePoolArgs, opts?: CustomResourceOptions);
@overload
def ResourcePool(resource_name: str,
opts: Optional[ResourceOptions] = None,
cpu_expandable: Optional[bool] = None,
cpu_limit: Optional[int] = None,
cpu_reservation: Optional[int] = None,
cpu_share_level: Optional[str] = None,
cpu_shares: Optional[int] = None,
custom_attributes: Optional[Mapping[str, str]] = None,
memory_expandable: Optional[bool] = None,
memory_limit: Optional[int] = None,
memory_reservation: Optional[int] = None,
memory_share_level: Optional[str] = None,
memory_shares: Optional[int] = None,
name: Optional[str] = None,
parent_resource_pool_id: Optional[str] = None,
scale_descendants_shares: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
@overload
def ResourcePool(resource_name: str,
args: ResourcePoolArgs,
opts: Optional[ResourceOptions] = None)
func NewResourcePool(ctx *Context, name string, args ResourcePoolArgs, opts ...ResourceOption) (*ResourcePool, error)
public ResourcePool(string name, ResourcePoolArgs args, CustomResourceOptions? opts = null)
public ResourcePool(String name, ResourcePoolArgs args)
public ResourcePool(String name, ResourcePoolArgs args, CustomResourceOptions options)
type: vsphere:ResourcePool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourcePoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourcePoolArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourcePoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourcePoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourcePoolArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
ResourcePool Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ResourcePool resource accepts the following input properties:
- Parent
Resource stringPool Id 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.
- Cpu
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Cpu
Limit int 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
- Cpu
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- Custom
Attributes Dictionary<string, string> A list of custom attributes to set on this resource.
- Memory
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Memory
Limit int 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
- Memory
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- Name string
The name of the resource pool.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<string>
The IDs of any tags to attach to this resource.
- Parent
Resource stringPool Id 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.
- Cpu
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Cpu
Limit int 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
- Cpu
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- Custom
Attributes map[string]string A list of custom attributes to set on this resource.
- Memory
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Memory
Limit int 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
- Memory
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- Name string
The name of the resource pool.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- []string
The IDs of any tags to attach to this resource.
- parent
Resource StringPool Id 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.
- cpu
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit Integer 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
- cpu
Reservation Integer Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- Integer
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 becustom
.- custom
Attributes Map<String,String> A list of custom attributes to set on this resource.
- memory
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit Integer 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
- memory
Reservation Integer Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- Integer
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 becustom
.- name String
The name of the resource pool.
- String
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<String>
The IDs of any tags to attach to this resource.
- parent
Resource stringPool Id 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.
- cpu
Expandable boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit number 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
- cpu
Reservation number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- number
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 becustom
.- custom
Attributes {[key: string]: string} A list of custom attributes to set on this resource.
- memory
Expandable boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit number 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
- memory
Reservation number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- number
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 becustom
.- name string
The name of the resource pool.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- string[]
The IDs of any tags to attach to this resource.
- parent_
resource_ strpool_ id 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.
- cpu_
expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu_
limit int 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
- cpu_
reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- str
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- custom_
attributes Mapping[str, str] A list of custom attributes to set on this resource.
- memory_
expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory_
limit int 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
- memory_
reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- str
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- name str
The name of the resource pool.
- str
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- Sequence[str]
The IDs of any tags to attach to this resource.
- parent
Resource StringPool Id 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.
- cpu
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit Number 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
- cpu
Reservation Number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- Number
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 becustom
.- custom
Attributes Map<String> A list of custom attributes to set on this resource.
- memory
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit Number 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
- memory
Reservation Number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- Number
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 becustom
.- name String
The name of the resource pool.
- String
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<String>
The IDs of any tags to attach to this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ResourcePool resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Id string
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
- id string
The provider-assigned unique ID for this managed resource.
- id str
The provider-assigned unique ID for this managed resource.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing ResourcePool Resource
Get an existing ResourcePool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ResourcePoolState, opts?: CustomResourceOptions): ResourcePool
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cpu_expandable: Optional[bool] = None,
cpu_limit: Optional[int] = None,
cpu_reservation: Optional[int] = None,
cpu_share_level: Optional[str] = None,
cpu_shares: Optional[int] = None,
custom_attributes: Optional[Mapping[str, str]] = None,
memory_expandable: Optional[bool] = None,
memory_limit: Optional[int] = None,
memory_reservation: Optional[int] = None,
memory_share_level: Optional[str] = None,
memory_shares: Optional[int] = None,
name: Optional[str] = None,
parent_resource_pool_id: Optional[str] = None,
scale_descendants_shares: Optional[str] = None,
tags: Optional[Sequence[str]] = None) -> ResourcePool
func GetResourcePool(ctx *Context, name string, id IDInput, state *ResourcePoolState, opts ...ResourceOption) (*ResourcePool, error)
public static ResourcePool Get(string name, Input<string> id, ResourcePoolState? state, CustomResourceOptions? opts = null)
public static ResourcePool get(String name, Output<String> id, ResourcePoolState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cpu
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Cpu
Limit int 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
- Cpu
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- Custom
Attributes Dictionary<string, string> A list of custom attributes to set on this resource.
- Memory
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Memory
Limit int 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
- Memory
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- Name string
The name of the resource pool.
- Parent
Resource stringPool Id 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.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<string>
The IDs of any tags to attach to this resource.
- Cpu
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Cpu
Limit int 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
- Cpu
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- Custom
Attributes map[string]string A list of custom attributes to set on this resource.
- Memory
Expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- Memory
Limit int 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
- Memory
Reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- Name string
The name of the resource pool.
- Parent
Resource stringPool Id 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.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- []string
The IDs of any tags to attach to this resource.
- cpu
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit Integer 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
- cpu
Reservation Integer Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- Integer
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 becustom
.- custom
Attributes Map<String,String> A list of custom attributes to set on this resource.
- memory
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit Integer 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
- memory
Reservation Integer Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- Integer
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 becustom
.- name String
The name of the resource pool.
- parent
Resource StringPool Id 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.
- String
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<String>
The IDs of any tags to attach to this resource.
- cpu
Expandable boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit number 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
- cpu
Reservation number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- number
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 becustom
.- custom
Attributes {[key: string]: string} A list of custom attributes to set on this resource.
- memory
Expandable boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit number 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
- memory
Reservation number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- string
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- number
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 becustom
.- name string
The name of the resource pool.
- parent
Resource stringPool Id 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.
- string
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- string[]
The IDs of any tags to attach to this resource.
- cpu_
expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu_
limit int 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
- cpu_
reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- str
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- int
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 becustom
.- custom_
attributes Mapping[str, str] A list of custom attributes to set on this resource.
- memory_
expandable bool Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory_
limit int 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
- memory_
reservation int Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- str
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- int
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 becustom
.- name str
The name of the resource pool.
- parent_
resource_ strpool_ id 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.
- str
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- Sequence[str]
The IDs of any tags to attach to this resource.
- cpu
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- cpu
Limit Number 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
- cpu
Reservation Number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values incpu_shares
will be ignored. Default:normal
- Number
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 becustom
.- custom
Attributes Map<String> A list of custom attributes to set on this resource.
- memory
Expandable Boolean Determines if the reservation on a resource pool can grow beyond the specified value if the parent resource pool has unreserved resources. Default:
true
- memory
Limit Number 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
- memory
Reservation Number Amount of CPU (MHz) that is guaranteed available to the resource pool. Default:
0
- String
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
, orcustom
. Whenlow
,normal
, orhigh
are specified values inmemory_shares
will be ignored. Default:normal
- Number
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 becustom
.- name String
The name of the resource pool.
- parent
Resource StringPool Id 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.
- String
Determines if the shares of all descendants of the resource pool are scaled up or down when the shares of the resource pool are scaled up or down. Can be one of
disabled
orscaleCpuAndMemoryShares
. Default:disabled
.- List<String>
The IDs of any tags to attach to this resource.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vsphere
Terraform Provider.