vSphere v4.13.1 published on Wednesday, Feb 5, 2025 by Pulumi
vsphere.getHostVgpuProfile
Explore with Pulumi AI
The vsphere.getHostVgpuProfile data source can be used to discover the
available vGPU profiles of a vSphere host.
Example Usage
To Return All VGPU Profiles
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const datacenter = vsphere.getDatacenter({
    name: "dc-01",
});
const host = datacenter.then(datacenter => vsphere.getHost({
    name: "esxi-01.example.com",
    datacenterId: datacenter.id,
}));
const vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
    hostId: host.id,
}));
import pulumi
import pulumi_vsphere as vsphere
datacenter = vsphere.get_datacenter(name="dc-01")
host = vsphere.get_host(name="esxi-01.example.com",
    datacenter_id=datacenter.id)
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.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
		}
		host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
			Name:         pulumi.StringRef("esxi-01.example.com"),
			DatacenterId: datacenter.Id,
		}, nil)
		if err != nil {
			return err
		}
		_, err = vsphere.GetHostVgpuProfile(ctx, &vsphere.GetHostVgpuProfileArgs{
			HostId: host.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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 host = VSphere.GetHost.Invoke(new()
    {
        Name = "esxi-01.example.com",
        DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
    });
    var vgpuProfile = VSphere.GetHostVgpuProfile.Invoke(new()
    {
        HostId = host.Apply(getHostResult => getHostResult.Id),
    });
});
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.GetHostArgs;
import com.pulumi.vsphere.inputs.GetHostVgpuProfileArgs;
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 host = VsphereFunctions.getHost(GetHostArgs.builder()
            .name("esxi-01.example.com")
            .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
            .build());
        final var vgpuProfile = VsphereFunctions.getHostVgpuProfile(GetHostVgpuProfileArgs.builder()
            .hostId(host.applyValue(getHostResult -> getHostResult.id()))
            .build());
    }
}
variables:
  datacenter:
    fn::invoke:
      function: vsphere:getDatacenter
      arguments:
        name: dc-01
  host:
    fn::invoke:
      function: vsphere:getHost
      arguments:
        name: esxi-01.example.com
        datacenterId: ${datacenter.id}
  vgpuProfile:
    fn::invoke:
      function: vsphere:getHostVgpuProfile
      arguments:
        hostId: ${host.id}
With VGPU Profile Name_regex
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const datacenter = vsphere.getDatacenter({
    name: "dc-01",
});
const host = datacenter.then(datacenter => vsphere.getHost({
    name: "esxi-01.example.com",
    datacenterId: datacenter.id,
}));
const vgpuProfile = host.then(host => vsphere.getHostVgpuProfile({
    hostId: host.id,
    nameRegex: "a100",
}));
import pulumi
import pulumi_vsphere as vsphere
datacenter = vsphere.get_datacenter(name="dc-01")
host = vsphere.get_host(name="esxi-01.example.com",
    datacenter_id=datacenter.id)
vgpu_profile = vsphere.get_host_vgpu_profile(host_id=host.id,
    name_regex="a100")
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
		}
		host, err := vsphere.LookupHost(ctx, &vsphere.LookupHostArgs{
			Name:         pulumi.StringRef("esxi-01.example.com"),
			DatacenterId: datacenter.Id,
		}, nil)
		if err != nil {
			return err
		}
		_, err = vsphere.GetHostVgpuProfile(ctx, &vsphere.GetHostVgpuProfileArgs{
			HostId:    host.Id,
			NameRegex: pulumi.StringRef("a100"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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 host = VSphere.GetHost.Invoke(new()
    {
        Name = "esxi-01.example.com",
        DatacenterId = datacenter.Apply(getDatacenterResult => getDatacenterResult.Id),
    });
    var vgpuProfile = VSphere.GetHostVgpuProfile.Invoke(new()
    {
        HostId = host.Apply(getHostResult => getHostResult.Id),
        NameRegex = "a100",
    });
});
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.GetHostArgs;
import com.pulumi.vsphere.inputs.GetHostVgpuProfileArgs;
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 host = VsphereFunctions.getHost(GetHostArgs.builder()
            .name("esxi-01.example.com")
            .datacenterId(datacenter.applyValue(getDatacenterResult -> getDatacenterResult.id()))
            .build());
        final var vgpuProfile = VsphereFunctions.getHostVgpuProfile(GetHostVgpuProfileArgs.builder()
            .hostId(host.applyValue(getHostResult -> getHostResult.id()))
            .nameRegex("a100")
            .build());
    }
}
variables:
  datacenter:
    fn::invoke:
      function: vsphere:getDatacenter
      arguments:
        name: dc-01
  host:
    fn::invoke:
      function: vsphere:getHost
      arguments:
        name: esxi-01.example.com
        datacenterId: ${datacenter.id}
  vgpuProfile:
    fn::invoke:
      function: vsphere:getHostVgpuProfile
      arguments:
        hostId: ${host.id}
        nameRegex: a100
Using getHostVgpuProfile
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getHostVgpuProfile(args: GetHostVgpuProfileArgs, opts?: InvokeOptions): Promise<GetHostVgpuProfileResult>
function getHostVgpuProfileOutput(args: GetHostVgpuProfileOutputArgs, opts?: InvokeOptions): Output<GetHostVgpuProfileResult>def get_host_vgpu_profile(host_id: Optional[str] = None,
                          name_regex: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetHostVgpuProfileResult
def get_host_vgpu_profile_output(host_id: Optional[pulumi.Input[str]] = None,
                          name_regex: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetHostVgpuProfileResult]func GetHostVgpuProfile(ctx *Context, args *GetHostVgpuProfileArgs, opts ...InvokeOption) (*GetHostVgpuProfileResult, error)
func GetHostVgpuProfileOutput(ctx *Context, args *GetHostVgpuProfileOutputArgs, opts ...InvokeOption) GetHostVgpuProfileResultOutput> Note: This function is named GetHostVgpuProfile in the Go SDK.
public static class GetHostVgpuProfile 
{
    public static Task<GetHostVgpuProfileResult> InvokeAsync(GetHostVgpuProfileArgs args, InvokeOptions? opts = null)
    public static Output<GetHostVgpuProfileResult> Invoke(GetHostVgpuProfileInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetHostVgpuProfileResult> getHostVgpuProfile(GetHostVgpuProfileArgs args, InvokeOptions options)
public static Output<GetHostVgpuProfileResult> getHostVgpuProfile(GetHostVgpuProfileArgs args, InvokeOptions options)
fn::invoke:
  function: vsphere:index/getHostVgpuProfile:getHostVgpuProfile
  arguments:
    # arguments dictionaryThe following arguments are supported:
- host_id str
- The [managed object reference ID][docs-about-morefs] of a host.
- name_regex str
- A regular expression that will be used to match the host vGPU profile name.
getHostVgpuProfile Result
The following output properties are available:
- HostId string
- The [managed objectID][docs-about-morefs] of the ESXi host.
- Id string
- The provider-assigned unique ID for this managed resource.
- VgpuProfiles List<Pulumi.VSphere. Outputs. Get Host Vgpu Profile Vgpu Profile> 
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- NameRegex string
- (Optional) A regular expression that will be used to match the host vGPU profile name.
- HostId string
- The [managed objectID][docs-about-morefs] of the ESXi host.
- Id string
- The provider-assigned unique ID for this managed resource.
- VgpuProfiles []GetHost Vgpu Profile Vgpu Profile 
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- NameRegex string
- (Optional) A regular expression that will be used to match the host vGPU profile name.
- hostId String
- The [managed objectID][docs-about-morefs] of the ESXi host.
- id String
- The provider-assigned unique ID for this managed resource.
- vgpuProfiles List<GetHost Vgpu Profile Vgpu Profile> 
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- nameRegex String
- (Optional) A regular expression that will be used to match the host vGPU profile name.
- hostId string
- The [managed objectID][docs-about-morefs] of the ESXi host.
- id string
- The provider-assigned unique ID for this managed resource.
- vgpuProfiles GetHost Vgpu Profile Vgpu Profile[] 
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- nameRegex string
- (Optional) A regular expression that will be used to match the host vGPU profile name.
- host_id str
- The [managed objectID][docs-about-morefs] of the ESXi host.
- id str
- The provider-assigned unique ID for this managed resource.
- vgpu_profiles Sequence[GetHost Vgpu Profile Vgpu Profile] 
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- name_regex str
- (Optional) A regular expression that will be used to match the host vGPU profile name.
- hostId String
- The [managed objectID][docs-about-morefs] of the ESXi host.
- id String
- The provider-assigned unique ID for this managed resource.
- vgpuProfiles List<Property Map>
- The list of available vGPU profiles on the ESXi host. This may be and empty array if no vGPU profile are identified.
- nameRegex String
- (Optional) A regular expression that will be used to match the host vGPU profile name.
Supporting Types
GetHostVgpuProfileVgpuProfile     
- DiskSnapshot boolSupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- MemorySnapshot boolSupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- MigrateSupported bool
- Indicates whether the GPU plugin on this host is capable of migration.
- SuspendSupported bool
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- Vgpu string
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
- DiskSnapshot boolSupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- MemorySnapshot boolSupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- MigrateSupported bool
- Indicates whether the GPU plugin on this host is capable of migration.
- SuspendSupported bool
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- Vgpu string
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
- diskSnapshot BooleanSupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- memorySnapshot BooleanSupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- migrateSupported Boolean
- Indicates whether the GPU plugin on this host is capable of migration.
- suspendSupported Boolean
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- vgpu String
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
- diskSnapshot booleanSupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- memorySnapshot booleanSupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- migrateSupported boolean
- Indicates whether the GPU plugin on this host is capable of migration.
- suspendSupported boolean
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- vgpu string
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
- disk_snapshot_ boolsupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- memory_snapshot_ boolsupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- migrate_supported bool
- Indicates whether the GPU plugin on this host is capable of migration.
- suspend_supported bool
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- vgpu str
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
- diskSnapshot BooleanSupported 
- Indicates whether the GPU plugin on this host is capable of disk-only snapshots when VM is not powered off.
- memorySnapshot BooleanSupported 
- Indicates whether the GPU plugin on this host is capable of memory snapshots.
- migrateSupported Boolean
- Indicates whether the GPU plugin on this host is capable of migration.
- suspendSupported Boolean
- Indicates whether the GPU plugin on this host is capable of suspend-resume.
- vgpu String
- Name of a particular vGPU available as a shared GPU device (vGPU profile).
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the vsphereTerraform Provider.