1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getDedicatedVmHostInstances
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

oci.Core.getDedicatedVmHostInstances

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

    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: _var.compartment_id,
        dedicatedVmHostId: oci_core_dedicated_vm_host.test_dedicated_vm_host.id,
        availabilityDomain: _var.dedicated_vm_hosts_instance_availability_domain,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_dedicated_vm_hosts_instances = oci.Core.get_dedicated_vm_host_instances(compartment_id=var["compartment_id"],
        dedicated_vm_host_id=oci_core_dedicated_vm_host["test_dedicated_vm_host"]["id"],
        availability_domain=var["dedicated_vm_hosts_instance_availability_domain"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/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:      _var.Compartment_id,
    			DedicatedVmHostId:  oci_core_dedicated_vm_host.Test_dedicated_vm_host.Id,
    			AvailabilityDomain: pulumi.StringRef(_var.Dedicated_vm_hosts_instance_availability_domain),
    		}, 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 = @var.Compartment_id,
            DedicatedVmHostId = oci_core_dedicated_vm_host.Test_dedicated_vm_host.Id,
            AvailabilityDomain = @var.Dedicated_vm_hosts_instance_availability_domain,
        });
    
    });
    
    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(var_.compartment_id())
                .dedicatedVmHostId(oci_core_dedicated_vm_host.test_dedicated_vm_host().id())
                .availabilityDomain(var_.dedicated_vm_hosts_instance_availability_domain())
                .build());
    
        }
    }
    
    variables:
      testDedicatedVmHostsInstances:
        fn::invoke:
          Function: oci:Core:getDedicatedVmHostInstances
          Arguments:
            compartmentId: ${var.compartment_id}
            dedicatedVmHostId: ${oci_core_dedicated_vm_host.test_dedicated_vm_host.id}
            availabilityDomain: ${var.dedicated_vm_hosts_instance_availability_domain}
    

    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[_core.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[_core.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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getDedicatedVmHostInstances:getDedicatedVmHostInstances
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    DedicatedVmHostId string
    The OCID of the dedicated VM host.
    AvailabilityDomain string
    The name of the availability domain. Example: Uocm:PHX-AD-1
    Filters List<GetDedicatedVmHostInstancesFilter>
    CompartmentId string
    The OCID of the compartment.
    DedicatedVmHostId string
    The OCID of the dedicated VM host.
    AvailabilityDomain string
    The name of the availability domain. Example: Uocm:PHX-AD-1
    Filters []GetDedicatedVmHostInstancesFilter
    compartmentId String
    The OCID of the compartment.
    dedicatedVmHostId String
    The OCID of the dedicated VM host.
    availabilityDomain String
    The name of the availability domain. Example: Uocm:PHX-AD-1
    filters List<GetDedicatedVmHostInstancesFilter>
    compartmentId string
    The OCID of the compartment.
    dedicatedVmHostId string
    The OCID of the dedicated VM host.
    availabilityDomain string
    The name of the availability domain. Example: Uocm:PHX-AD-1
    filters GetDedicatedVmHostInstancesFilter[]
    compartment_id str
    The OCID of the compartment.
    dedicated_vm_host_id str
    The OCID of the dedicated VM host.
    availability_domain str
    The name of the availability domain. Example: Uocm:PHX-AD-1
    filters GetDedicatedVmHostInstancesFilter]
    compartmentId String
    The OCID of the compartment.
    dedicatedVmHostId String
    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.
    DedicatedVmHostId string
    DedicatedVmHostInstances List<GetDedicatedVmHostInstancesDedicatedVmHostInstance>
    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<GetDedicatedVmHostInstancesFilter>
    CompartmentId string
    The OCID of the compartment that contains the virtual machine instance.
    DedicatedVmHostId string
    DedicatedVmHostInstances []GetDedicatedVmHostInstancesDedicatedVmHostInstance
    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 []GetDedicatedVmHostInstancesFilter
    compartmentId String
    The OCID of the compartment that contains the virtual machine instance.
    dedicatedVmHostId String
    dedicatedVmHostInstances List<GetDedicatedVmHostInstancesDedicatedVmHostInstance>
    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<GetDedicatedVmHostInstancesFilter>
    compartmentId string
    The OCID of the compartment that contains the virtual machine instance.
    dedicatedVmHostId string
    dedicatedVmHostInstances GetDedicatedVmHostInstancesDedicatedVmHostInstance[]
    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 GetDedicatedVmHostInstancesFilter[]
    compartment_id str
    The OCID of the compartment that contains the virtual machine instance.
    dedicated_vm_host_id str
    dedicated_vm_host_instances GetDedicatedVmHostInstancesDedicatedVmHostInstance]
    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 GetDedicatedVmHostInstancesFilter]
    compartmentId String
    The OCID of the compartment that contains the virtual machine instance.
    dedicatedVmHostId String
    dedicatedVmHostInstances List<Property Map>
    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

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi