Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Core.getDedicatedVmHostInstances
Explore with Pulumi AI
This data source provides the list of Dedicated Vm Hosts Instances in Oracle Cloud Infrastructure Core service.
Returns the list of instances on the dedicated virtual machine hosts that match the specified criteria.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDedicatedVmHostsInstances = oci.Core.getDedicatedVmHostInstances({
    compartmentId: compartmentId,
    dedicatedVmHostId: testDedicatedVmHost.id,
    availabilityDomain: dedicatedVmHostsInstanceAvailabilityDomain,
});
import pulumi
import pulumi_oci as oci
test_dedicated_vm_hosts_instances = oci.Core.get_dedicated_vm_host_instances(compartment_id=compartment_id,
    dedicated_vm_host_id=test_dedicated_vm_host["id"],
    availability_domain=dedicated_vm_hosts_instance_availability_domain)
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/core"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := core.GetDedicatedVmHostInstances(ctx, &core.GetDedicatedVmHostInstancesArgs{
			CompartmentId:      compartmentId,
			DedicatedVmHostId:  testDedicatedVmHost.Id,
			AvailabilityDomain: pulumi.StringRef(dedicatedVmHostsInstanceAvailabilityDomain),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() => 
{
    var testDedicatedVmHostsInstances = Oci.Core.GetDedicatedVmHostInstances.Invoke(new()
    {
        CompartmentId = compartmentId,
        DedicatedVmHostId = testDedicatedVmHost.Id,
        AvailabilityDomain = dedicatedVmHostsInstanceAvailabilityDomain,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Core.CoreFunctions;
import com.pulumi.oci.Core.inputs.GetDedicatedVmHostInstancesArgs;
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 testDedicatedVmHostsInstances = CoreFunctions.getDedicatedVmHostInstances(GetDedicatedVmHostInstancesArgs.builder()
            .compartmentId(compartmentId)
            .dedicatedVmHostId(testDedicatedVmHost.id())
            .availabilityDomain(dedicatedVmHostsInstanceAvailabilityDomain)
            .build());
    }
}
variables:
  testDedicatedVmHostsInstances:
    fn::invoke:
      function: oci:Core:getDedicatedVmHostInstances
      arguments:
        compartmentId: ${compartmentId}
        dedicatedVmHostId: ${testDedicatedVmHost.id}
        availabilityDomain: ${dedicatedVmHostsInstanceAvailabilityDomain}
Using getDedicatedVmHostInstances
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 getDedicatedVmHostInstances(args: GetDedicatedVmHostInstancesArgs, opts?: InvokeOptions): Promise<GetDedicatedVmHostInstancesResult>
function getDedicatedVmHostInstancesOutput(args: GetDedicatedVmHostInstancesOutputArgs, opts?: InvokeOptions): Output<GetDedicatedVmHostInstancesResult>def get_dedicated_vm_host_instances(availability_domain: Optional[str] = None,
                                    compartment_id: Optional[str] = None,
                                    dedicated_vm_host_id: Optional[str] = None,
                                    filters: Optional[Sequence[GetDedicatedVmHostInstancesFilter]] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetDedicatedVmHostInstancesResult
def get_dedicated_vm_host_instances_output(availability_domain: Optional[pulumi.Input[str]] = None,
                                    compartment_id: Optional[pulumi.Input[str]] = None,
                                    dedicated_vm_host_id: Optional[pulumi.Input[str]] = None,
                                    filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDedicatedVmHostInstancesFilterArgs]]]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetDedicatedVmHostInstancesResult]func GetDedicatedVmHostInstances(ctx *Context, args *GetDedicatedVmHostInstancesArgs, opts ...InvokeOption) (*GetDedicatedVmHostInstancesResult, error)
func GetDedicatedVmHostInstancesOutput(ctx *Context, args *GetDedicatedVmHostInstancesOutputArgs, opts ...InvokeOption) GetDedicatedVmHostInstancesResultOutput> Note: This function is named GetDedicatedVmHostInstances in the Go SDK.
public static class GetDedicatedVmHostInstances 
{
    public static Task<GetDedicatedVmHostInstancesResult> InvokeAsync(GetDedicatedVmHostInstancesArgs args, InvokeOptions? opts = null)
    public static Output<GetDedicatedVmHostInstancesResult> Invoke(GetDedicatedVmHostInstancesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDedicatedVmHostInstancesResult> getDedicatedVmHostInstances(GetDedicatedVmHostInstancesArgs args, InvokeOptions options)
public static Output<GetDedicatedVmHostInstancesResult> getDedicatedVmHostInstances(GetDedicatedVmHostInstancesArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Core/getDedicatedVmHostInstances:getDedicatedVmHostInstances
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The OCID of the compartment.
- DedicatedVm stringHost Id 
- The OCID of the dedicated VM host.
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- Filters
List<GetDedicated Vm Host Instances Filter> 
- CompartmentId string
- The OCID of the compartment.
- DedicatedVm stringHost Id 
- The OCID of the dedicated VM host.
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- Filters
[]GetDedicated Vm Host Instances Filter 
- compartmentId String
- The OCID of the compartment.
- dedicatedVm StringHost Id 
- The OCID of the dedicated VM host.
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- filters
List<GetDedicated Vm Host Instances Filter> 
- compartmentId string
- The OCID of the compartment.
- dedicatedVm stringHost Id 
- The OCID of the dedicated VM host.
- availabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- filters
GetDedicated Vm Host Instances Filter[] 
- compartment_id str
- The OCID of the compartment.
- dedicated_vm_ strhost_ id 
- The OCID of the dedicated VM host.
- availability_domain str
- The name of the availability domain. Example: Uocm:PHX-AD-1
- filters
Sequence[GetDedicated Vm Host Instances Filter] 
- compartmentId String
- The OCID of the compartment.
- dedicatedVm StringHost Id 
- The OCID of the dedicated VM host.
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- filters List<Property Map>
getDedicatedVmHostInstances Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment that contains the virtual machine instance.
- DedicatedVm stringHost Id 
- DedicatedVm List<GetHost Instances Dedicated Vm Host Instances Dedicated Vm Host Instance> 
- The list of dedicated_vm_host_instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- AvailabilityDomain string
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- Filters
List<GetDedicated Vm Host Instances Filter> 
- CompartmentId string
- The OCID of the compartment that contains the virtual machine instance.
- DedicatedVm stringHost Id 
- DedicatedVm []GetHost Instances Dedicated Vm Host Instances Dedicated Vm Host Instance 
- The list of dedicated_vm_host_instances.
- Id string
- The provider-assigned unique ID for this managed resource.
- AvailabilityDomain string
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- Filters
[]GetDedicated Vm Host Instances Filter 
- compartmentId String
- The OCID of the compartment that contains the virtual machine instance.
- dedicatedVm StringHost Id 
- dedicatedVm List<GetHost Instances Dedicated Vm Host Instances Dedicated Vm Host Instance> 
- The list of dedicated_vm_host_instances.
- id String
- The provider-assigned unique ID for this managed resource.
- availabilityDomain String
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- filters
List<GetDedicated Vm Host Instances Filter> 
- compartmentId string
- The OCID of the compartment that contains the virtual machine instance.
- dedicatedVm stringHost Id 
- dedicatedVm GetHost Instances Dedicated Vm Host Instances Dedicated Vm Host Instance[] 
- The list of dedicated_vm_host_instances.
- id string
- The provider-assigned unique ID for this managed resource.
- availabilityDomain string
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- filters
GetDedicated Vm Host Instances Filter[] 
- compartment_id str
- The OCID of the compartment that contains the virtual machine instance.
- dedicated_vm_ strhost_ id 
- dedicated_vm_ Sequence[Gethost_ instances Dedicated Vm Host Instances Dedicated Vm Host Instance] 
- The list of dedicated_vm_host_instances.
- id str
- The provider-assigned unique ID for this managed resource.
- availability_domain str
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- filters
Sequence[GetDedicated Vm Host Instances Filter] 
- compartmentId String
- The OCID of the compartment that contains the virtual machine instance.
- dedicatedVm StringHost Id 
- dedicatedVm List<Property Map>Host Instances 
- The list of dedicated_vm_host_instances.
- id String
- The provider-assigned unique ID for this managed resource.
- availabilityDomain String
- The availability domain the virtual machine instance is running in. Example: Uocm:PHX-AD-1
- filters List<Property Map>
Supporting Types
GetDedicatedVmHostInstancesDedicatedVmHostInstance        
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- CompartmentId string
- The OCID of the compartment.
- InstanceId string
- The OCID of the virtual machine instance.
- Shape string
- The shape of the VM instance.
- TimeCreated string
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- AvailabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- CompartmentId string
- The OCID of the compartment.
- InstanceId string
- The OCID of the virtual machine instance.
- Shape string
- The shape of the VM instance.
- TimeCreated string
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- compartmentId String
- The OCID of the compartment.
- instanceId String
- The OCID of the virtual machine instance.
- shape String
- The shape of the VM instance.
- timeCreated String
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- availabilityDomain string
- The name of the availability domain. Example: Uocm:PHX-AD-1
- compartmentId string
- The OCID of the compartment.
- instanceId string
- The OCID of the virtual machine instance.
- shape string
- The shape of the VM instance.
- timeCreated string
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- availability_domain str
- The name of the availability domain. Example: Uocm:PHX-AD-1
- compartment_id str
- The OCID of the compartment.
- instance_id str
- The OCID of the virtual machine instance.
- shape str
- The shape of the VM instance.
- time_created str
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
- availabilityDomain String
- The name of the availability domain. Example: Uocm:PHX-AD-1
- compartmentId String
- The OCID of the compartment.
- instanceId String
- The OCID of the virtual machine instance.
- shape String
- The shape of the VM instance.
- timeCreated String
- The date and time the virtual machine instance was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
GetDedicatedVmHostInstancesFilter     
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.