1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Database
  5. getAutonomousVirtualMachines
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

oci.Database.getAutonomousVirtualMachines

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

    This data source provides the list of Autonomous Virtual Machines in Oracle Cloud Infrastructure Database service.

    Lists the Autonomous Virtual Machines in the specified Autonomous VM Cluster and Compartment.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAutonomousVirtualMachines = Oci.Database.GetAutonomousVirtualMachines.Invoke(new()
        {
            AutonomousVmClusterId = oci_database_autonomous_vm_cluster.Test_autonomous_vm_cluster.Id,
            CompartmentId = @var.Compartment_id,
            State = @var.Autonomous_virtual_machine_state,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Database"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Database.GetAutonomousVirtualMachines(ctx, &database.GetAutonomousVirtualMachinesArgs{
    			AutonomousVmClusterId: oci_database_autonomous_vm_cluster.Test_autonomous_vm_cluster.Id,
    			CompartmentId:         _var.Compartment_id,
    			State:                 pulumi.StringRef(_var.Autonomous_virtual_machine_state),
    		}, nil)
    		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.oci.Database.DatabaseFunctions;
    import com.pulumi.oci.Database.inputs.GetAutonomousVirtualMachinesArgs;
    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 testAutonomousVirtualMachines = DatabaseFunctions.getAutonomousVirtualMachines(GetAutonomousVirtualMachinesArgs.builder()
                .autonomousVmClusterId(oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster().id())
                .compartmentId(var_.compartment_id())
                .state(var_.autonomous_virtual_machine_state())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_autonomous_virtual_machines = oci.Database.get_autonomous_virtual_machines(autonomous_vm_cluster_id=oci_database_autonomous_vm_cluster["test_autonomous_vm_cluster"]["id"],
        compartment_id=var["compartment_id"],
        state=var["autonomous_virtual_machine_state"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAutonomousVirtualMachines = oci.Database.getAutonomousVirtualMachines({
        autonomousVmClusterId: oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id,
        compartmentId: _var.compartment_id,
        state: _var.autonomous_virtual_machine_state,
    });
    
    variables:
      testAutonomousVirtualMachines:
        fn::invoke:
          Function: oci:Database:getAutonomousVirtualMachines
          Arguments:
            autonomousVmClusterId: ${oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id}
            compartmentId: ${var.compartment_id}
            state: ${var.autonomous_virtual_machine_state}
    

    Using getAutonomousVirtualMachines

    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 getAutonomousVirtualMachines(args: GetAutonomousVirtualMachinesArgs, opts?: InvokeOptions): Promise<GetAutonomousVirtualMachinesResult>
    function getAutonomousVirtualMachinesOutput(args: GetAutonomousVirtualMachinesOutputArgs, opts?: InvokeOptions): Output<GetAutonomousVirtualMachinesResult>
    def get_autonomous_virtual_machines(autonomous_vm_cluster_id: Optional[str] = None,
                                        compartment_id: Optional[str] = None,
                                        filters: Optional[Sequence[_database.GetAutonomousVirtualMachinesFilter]] = None,
                                        state: Optional[str] = None,
                                        opts: Optional[InvokeOptions] = None) -> GetAutonomousVirtualMachinesResult
    def get_autonomous_virtual_machines_output(autonomous_vm_cluster_id: Optional[pulumi.Input[str]] = None,
                                        compartment_id: Optional[pulumi.Input[str]] = None,
                                        filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetAutonomousVirtualMachinesFilterArgs]]]] = None,
                                        state: Optional[pulumi.Input[str]] = None,
                                        opts: Optional[InvokeOptions] = None) -> Output[GetAutonomousVirtualMachinesResult]
    func GetAutonomousVirtualMachines(ctx *Context, args *GetAutonomousVirtualMachinesArgs, opts ...InvokeOption) (*GetAutonomousVirtualMachinesResult, error)
    func GetAutonomousVirtualMachinesOutput(ctx *Context, args *GetAutonomousVirtualMachinesOutputArgs, opts ...InvokeOption) GetAutonomousVirtualMachinesResultOutput

    > Note: This function is named GetAutonomousVirtualMachines in the Go SDK.

    public static class GetAutonomousVirtualMachines 
    {
        public static Task<GetAutonomousVirtualMachinesResult> InvokeAsync(GetAutonomousVirtualMachinesArgs args, InvokeOptions? opts = null)
        public static Output<GetAutonomousVirtualMachinesResult> Invoke(GetAutonomousVirtualMachinesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAutonomousVirtualMachinesResult> getAutonomousVirtualMachines(GetAutonomousVirtualMachinesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Database/getAutonomousVirtualMachines:getAutonomousVirtualMachines
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AutonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    CompartmentId string

    The compartment OCID.

    Filters List<GetAutonomousVirtualMachinesFilter>
    State string

    A filter to return only resources that match the given lifecycle state exactly.

    AutonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    CompartmentId string

    The compartment OCID.

    Filters []GetAutonomousVirtualMachinesFilter
    State string

    A filter to return only resources that match the given lifecycle state exactly.

    autonomousVmClusterId String

    The Autonomous Virtual machine OCID.

    compartmentId String

    The compartment OCID.

    filters List<GetAutonomousVirtualMachinesFilter>
    state String

    A filter to return only resources that match the given lifecycle state exactly.

    autonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    compartmentId string

    The compartment OCID.

    filters GetAutonomousVirtualMachinesFilter[]
    state string

    A filter to return only resources that match the given lifecycle state exactly.

    autonomous_vm_cluster_id str

    The Autonomous Virtual machine OCID.

    compartment_id str

    The compartment OCID.

    filters GetAutonomousVirtualMachinesFilter]
    state str

    A filter to return only resources that match the given lifecycle state exactly.

    autonomousVmClusterId String

    The Autonomous Virtual machine OCID.

    compartmentId String

    The compartment OCID.

    filters List<Property Map>
    state String

    A filter to return only resources that match the given lifecycle state exactly.

    getAutonomousVirtualMachines Result

    The following output properties are available:

    AutonomousVirtualMachines List<GetAutonomousVirtualMachinesAutonomousVirtualMachine>

    The list of autonomous_virtual_machines.

    AutonomousVmClusterId string

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    CompartmentId string

    The OCID of the compartment.

    Id string

    The provider-assigned unique ID for this managed resource.

    Filters List<GetAutonomousVirtualMachinesFilter>
    State string

    The current state of the Autonomous Virtual Machine.

    AutonomousVirtualMachines []GetAutonomousVirtualMachinesAutonomousVirtualMachine

    The list of autonomous_virtual_machines.

    AutonomousVmClusterId string

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    CompartmentId string

    The OCID of the compartment.

    Id string

    The provider-assigned unique ID for this managed resource.

    Filters []GetAutonomousVirtualMachinesFilter
    State string

    The current state of the Autonomous Virtual Machine.

    autonomousVirtualMachines List<GetAutonomousVirtualMachinesAutonomousVirtualMachine>

    The list of autonomous_virtual_machines.

    autonomousVmClusterId String

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    compartmentId String

    The OCID of the compartment.

    id String

    The provider-assigned unique ID for this managed resource.

    filters List<GetAutonomousVirtualMachinesFilter>
    state String

    The current state of the Autonomous Virtual Machine.

    autonomousVirtualMachines GetAutonomousVirtualMachinesAutonomousVirtualMachine[]

    The list of autonomous_virtual_machines.

    autonomousVmClusterId string

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    compartmentId string

    The OCID of the compartment.

    id string

    The provider-assigned unique ID for this managed resource.

    filters GetAutonomousVirtualMachinesFilter[]
    state string

    The current state of the Autonomous Virtual Machine.

    autonomous_virtual_machines GetAutonomousVirtualMachinesAutonomousVirtualMachine]

    The list of autonomous_virtual_machines.

    autonomous_vm_cluster_id str

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    compartment_id str

    The OCID of the compartment.

    id str

    The provider-assigned unique ID for this managed resource.

    filters GetAutonomousVirtualMachinesFilter]
    state str

    The current state of the Autonomous Virtual Machine.

    autonomousVirtualMachines List<Property Map>

    The list of autonomous_virtual_machines.

    autonomousVmClusterId String

    The OCID of the Autonomous VM Cluster associated with the Autonomous Virtual Machine.

    compartmentId String

    The OCID of the compartment.

    id String

    The provider-assigned unique ID for this managed resource.

    filters List<Property Map>
    state String

    The current state of the Autonomous Virtual Machine.

    Supporting Types

    GetAutonomousVirtualMachinesAutonomousVirtualMachine

    AutonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    ClientIpAddress string

    Client IP Address.

    CompartmentId string

    The compartment OCID.

    CpuCoreCount int

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    DbNodeStorageSizeInGbs int

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    DbServerDisplayName string

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    DbServerId string

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    DefinedTags Dictionary<string, object>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    FreeformTags Dictionary<string, object>

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    Id string

    The OCID of the Autonomous Virtual Machine.

    MemorySizeInGbs int

    The allocated memory in GBs on the Autonomous Virtual Machine.

    State string

    A filter to return only resources that match the given lifecycle state exactly.

    VmName string

    The name of the Autonomous Virtual Machine.

    AutonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    ClientIpAddress string

    Client IP Address.

    CompartmentId string

    The compartment OCID.

    CpuCoreCount int

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    DbNodeStorageSizeInGbs int

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    DbServerDisplayName string

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    DbServerId string

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    DefinedTags map[string]interface{}

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    FreeformTags map[string]interface{}

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    Id string

    The OCID of the Autonomous Virtual Machine.

    MemorySizeInGbs int

    The allocated memory in GBs on the Autonomous Virtual Machine.

    State string

    A filter to return only resources that match the given lifecycle state exactly.

    VmName string

    The name of the Autonomous Virtual Machine.

    autonomousVmClusterId String

    The Autonomous Virtual machine OCID.

    clientIpAddress String

    Client IP Address.

    compartmentId String

    The compartment OCID.

    cpuCoreCount Integer

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    dbNodeStorageSizeInGbs Integer

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    dbServerDisplayName String

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    dbServerId String

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    definedTags Map<String,Object>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    freeformTags Map<String,Object>

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    id String

    The OCID of the Autonomous Virtual Machine.

    memorySizeInGbs Integer

    The allocated memory in GBs on the Autonomous Virtual Machine.

    state String

    A filter to return only resources that match the given lifecycle state exactly.

    vmName String

    The name of the Autonomous Virtual Machine.

    autonomousVmClusterId string

    The Autonomous Virtual machine OCID.

    clientIpAddress string

    Client IP Address.

    compartmentId string

    The compartment OCID.

    cpuCoreCount number

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    dbNodeStorageSizeInGbs number

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    dbServerDisplayName string

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    dbServerId string

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    definedTags {[key: string]: any}

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    freeformTags {[key: string]: any}

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    id string

    The OCID of the Autonomous Virtual Machine.

    memorySizeInGbs number

    The allocated memory in GBs on the Autonomous Virtual Machine.

    state string

    A filter to return only resources that match the given lifecycle state exactly.

    vmName string

    The name of the Autonomous Virtual Machine.

    autonomous_vm_cluster_id str

    The Autonomous Virtual machine OCID.

    client_ip_address str

    Client IP Address.

    compartment_id str

    The compartment OCID.

    cpu_core_count int

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    db_node_storage_size_in_gbs int

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    db_server_display_name str

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    db_server_id str

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    defined_tags Mapping[str, Any]

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    freeform_tags Mapping[str, Any]

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    id str

    The OCID of the Autonomous Virtual Machine.

    memory_size_in_gbs int

    The allocated memory in GBs on the Autonomous Virtual Machine.

    state str

    A filter to return only resources that match the given lifecycle state exactly.

    vm_name str

    The name of the Autonomous Virtual Machine.

    autonomousVmClusterId String

    The Autonomous Virtual machine OCID.

    clientIpAddress String

    Client IP Address.

    compartmentId String

    The compartment OCID.

    cpuCoreCount Number

    The number of CPU cores enabled on the Autonomous Virtual Machine.

    dbNodeStorageSizeInGbs Number

    The allocated local node storage in GBs on the Autonomous Virtual Machine.

    dbServerDisplayName String

    The display name of the dbServer associated with the Autonomous Virtual Machine.

    dbServerId String

    The OCID of the Db server associated with the Autonomous Virtual Machine.

    definedTags Map<Any>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

    freeformTags Map<Any>

    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}

    id String

    The OCID of the Autonomous Virtual Machine.

    memorySizeInGbs Number

    The allocated memory in GBs on the Autonomous Virtual Machine.

    state String

    A filter to return only resources that match the given lifecycle state exactly.

    vmName String

    The name of the Autonomous Virtual Machine.

    GetAutonomousVirtualMachinesFilter

    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.11.0 published on Wednesday, Sep 27, 2023 by Pulumi