import * as pulumi from "@pulumi/pulumi"; /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. * * ## Example Usage * * ### Find a Resource Pool by Path * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "cluster-01/Resources", * datacenterId: datacenter.id, * })); * ``` * * ### Find a Child Resource Pool Using the Parent ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const parentPool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "cluster-01/Resources", * datacenterId: datacenter.id, * })); * const childPool = parentPool.then(parentPool => vsphere.getResourcePool({ * name: "example", * parentResourcePoolId: parentPool.id, * })); * ``` * * ### Specifying the Root Resource Pool for a Standalone ESXi Host * * > **NOTE:** Returning the root resource pool for a cluster can be done * directly via the `vsphere.ComputeCluster` * data source. * * All compute resources in vSphere have a resource pool, even if one has not been * explicitly created. This resource pool is referred to as the _root resource * pool_ and can be looked up by specifying the path. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const pool = vsphere.getResourcePool({ * name: "esxi-01.example.com/Resources", * datacenterId: datacenter.id, * }); * ``` * * For more information on the root resource pool, see * [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere * documentation. * * [vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html */ export declare function getResourcePool(args?: GetResourcePoolArgs, opts?: pulumi.InvokeOptions): Promise; /** * A collection of arguments for invoking getResourcePool. */ export interface GetResourcePoolArgs { /** * The managed object reference ID * of the datacenter in which the resource pool is located. This can be omitted * if the search path used in `name` is an absolute path. For default * datacenters, use the id attribute from an empty `vsphere.Datacenter` data * source.. */ datacenterId?: string; /** * The name of the resource pool. This can be a name or * path. This is required when using vCenter. */ name?: string; /** * The managed object ID * of the parent resource pool. When specified, the `name` parameter is used to find * a child resource pool with the given name under this parent resource pool. * * > **Note:** When using ESXi without a vCenter Server instance, you do not * need to specify either attribute to use this data source. An empty declaration * will load the ESXi host's root resource pool. */ parentResourcePoolId?: string; } /** * A collection of values returned by getResourcePool. */ export interface GetResourcePoolResult { readonly datacenterId?: string; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly name?: string; readonly parentResourcePoolId?: string; } /** * The `vsphere.ResourcePool` data source can be used to discover the ID of a * resource pool in vSphere. This is useful to return the ID of a resource pool * that you want to use to create virtual machines in using the * `vsphere.VirtualMachine` resource. * * ## Example Usage * * ### Find a Resource Pool by Path * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const pool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "cluster-01/Resources", * datacenterId: datacenter.id, * })); * ``` * * ### Find a Child Resource Pool Using the Parent ID * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const datacenter = vsphere.getDatacenter({ * name: "dc-01", * }); * const parentPool = datacenter.then(datacenter => vsphere.getResourcePool({ * name: "cluster-01/Resources", * datacenterId: datacenter.id, * })); * const childPool = parentPool.then(parentPool => vsphere.getResourcePool({ * name: "example", * parentResourcePoolId: parentPool.id, * })); * ``` * * ### Specifying the Root Resource Pool for a Standalone ESXi Host * * > **NOTE:** Returning the root resource pool for a cluster can be done * directly via the `vsphere.ComputeCluster` * data source. * * All compute resources in vSphere have a resource pool, even if one has not been * explicitly created. This resource pool is referred to as the _root resource * pool_ and can be looked up by specifying the path. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as vsphere from "@pulumi/vsphere"; * * const pool = vsphere.getResourcePool({ * name: "esxi-01.example.com/Resources", * datacenterId: datacenter.id, * }); * ``` * * For more information on the root resource pool, see * [Managing Resource Pools][vmware-docs-resource-pools] in the vSphere * documentation. * * [vmware-docs-resource-pools]: https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-resource-management-8-0/managing-resource-pools.html */ export declare function getResourcePoolOutput(args?: GetResourcePoolOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output; /** * A collection of arguments for invoking getResourcePool. */ export interface GetResourcePoolOutputArgs { /** * The managed object reference ID * of the datacenter in which the resource pool is located. This can be omitted * if the search path used in `name` is an absolute path. For default * datacenters, use the id attribute from an empty `vsphere.Datacenter` data * source.. */ datacenterId?: pulumi.Input; /** * The name of the resource pool. This can be a name or * path. This is required when using vCenter. */ name?: pulumi.Input; /** * The managed object ID * of the parent resource pool. When specified, the `name` parameter is used to find * a child resource pool with the given name under this parent resource pool. * * > **Note:** When using ESXi without a vCenter Server instance, you do not * need to specify either attribute to use this data source. An empty declaration * will load the ESXi host's root resource pool. */ parentResourcePoolId?: pulumi.Input; }