1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Database
  5. getDbNodes
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Database.getDbNodes

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    This data source provides the list of Db Nodes in Oracle Cloud Infrastructure Database service.

    Lists the database nodes in the specified compartment. A database node is a server running database software. In addition to the other required parameters, either ‘–db-system-id’ or ‘–vm-cluster-id’ also must be provided, depending on the service being accessed.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testDbNodes = oci.Database.getDbNodes({
        compartmentId: compartmentId,
        dbServerId: testDbServer.id,
        dbSystemId: testDbSystem.id,
        state: dbNodeState,
        vmClusterId: testVmCluster.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_db_nodes = oci.Database.get_db_nodes(compartment_id=compartment_id,
        db_server_id=test_db_server["id"],
        db_system_id=test_db_system["id"],
        state=db_node_state,
        vm_cluster_id=test_vm_cluster["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Database"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Database.GetDbNodes(ctx, &database.GetDbNodesArgs{
    			CompartmentId: compartmentId,
    			DbServerId:    pulumi.StringRef(testDbServer.Id),
    			DbSystemId:    pulumi.StringRef(testDbSystem.Id),
    			State:         pulumi.StringRef(dbNodeState),
    			VmClusterId:   pulumi.StringRef(testVmCluster.Id),
    		}, 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 testDbNodes = Oci.Database.GetDbNodes.Invoke(new()
        {
            CompartmentId = compartmentId,
            DbServerId = testDbServer.Id,
            DbSystemId = testDbSystem.Id,
            State = dbNodeState,
            VmClusterId = testVmCluster.Id,
        });
    
    });
    
    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.GetDbNodesArgs;
    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 testDbNodes = DatabaseFunctions.getDbNodes(GetDbNodesArgs.builder()
                .compartmentId(compartmentId)
                .dbServerId(testDbServer.id())
                .dbSystemId(testDbSystem.id())
                .state(dbNodeState)
                .vmClusterId(testVmCluster.id())
                .build());
    
        }
    }
    
    variables:
      testDbNodes:
        fn::invoke:
          Function: oci:Database:getDbNodes
          Arguments:
            compartmentId: ${compartmentId}
            dbServerId: ${testDbServer.id}
            dbSystemId: ${testDbSystem.id}
            state: ${dbNodeState}
            vmClusterId: ${testVmCluster.id}
    

    Using getDbNodes

    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 getDbNodes(args: GetDbNodesArgs, opts?: InvokeOptions): Promise<GetDbNodesResult>
    function getDbNodesOutput(args: GetDbNodesOutputArgs, opts?: InvokeOptions): Output<GetDbNodesResult>
    def get_db_nodes(compartment_id: Optional[str] = None,
                     db_server_id: Optional[str] = None,
                     db_system_id: Optional[str] = None,
                     filters: Optional[Sequence[_database.GetDbNodesFilter]] = None,
                     state: Optional[str] = None,
                     vm_cluster_id: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetDbNodesResult
    def get_db_nodes_output(compartment_id: Optional[pulumi.Input[str]] = None,
                     db_server_id: Optional[pulumi.Input[str]] = None,
                     db_system_id: Optional[pulumi.Input[str]] = None,
                     filters: Optional[pulumi.Input[Sequence[pulumi.Input[_database.GetDbNodesFilterArgs]]]] = None,
                     state: Optional[pulumi.Input[str]] = None,
                     vm_cluster_id: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetDbNodesResult]
    func GetDbNodes(ctx *Context, args *GetDbNodesArgs, opts ...InvokeOption) (*GetDbNodesResult, error)
    func GetDbNodesOutput(ctx *Context, args *GetDbNodesOutputArgs, opts ...InvokeOption) GetDbNodesResultOutput

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

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

    The following arguments are supported:

    CompartmentId string
    The compartment OCID.
    DbServerId string
    The OCID of the Exacc Db server.
    DbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    Filters List<GetDbNodesFilter>
    State string
    A filter to return only resources that match the given lifecycle state exactly.
    VmClusterId string
    The OCID of the VM cluster.
    CompartmentId string
    The compartment OCID.
    DbServerId string
    The OCID of the Exacc Db server.
    DbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    Filters []GetDbNodesFilter
    State string
    A filter to return only resources that match the given lifecycle state exactly.
    VmClusterId string
    The OCID of the VM cluster.
    compartmentId String
    The compartment OCID.
    dbServerId String
    The OCID of the Exacc Db server.
    dbSystemId String
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    filters List<GetDbNodesFilter>
    state String
    A filter to return only resources that match the given lifecycle state exactly.
    vmClusterId String
    The OCID of the VM cluster.
    compartmentId string
    The compartment OCID.
    dbServerId string
    The OCID of the Exacc Db server.
    dbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    filters GetDbNodesFilter[]
    state string
    A filter to return only resources that match the given lifecycle state exactly.
    vmClusterId string
    The OCID of the VM cluster.
    compartment_id str
    The compartment OCID.
    db_server_id str
    The OCID of the Exacc Db server.
    db_system_id str
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    filters Sequence[database.GetDbNodesFilter]
    state str
    A filter to return only resources that match the given lifecycle state exactly.
    vm_cluster_id str
    The OCID of the VM cluster.
    compartmentId String
    The compartment OCID.
    dbServerId String
    The OCID of the Exacc Db server.
    dbSystemId String
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    filters List<Property Map>
    state String
    A filter to return only resources that match the given lifecycle state exactly.
    vmClusterId String
    The OCID of the VM cluster.

    getDbNodes Result

    The following output properties are available:

    CompartmentId string
    DbNodes List<GetDbNodesDbNode>
    The list of db_nodes.
    Id string
    The provider-assigned unique ID for this managed resource.
    DbServerId string
    The OCID of the Exacc Db server associated with the database node.
    DbSystemId string
    The OCID of the DB system.
    Filters List<GetDbNodesFilter>
    State string
    The current state of the database node.
    VmClusterId string
    CompartmentId string
    DbNodes []GetDbNodesDbNode
    The list of db_nodes.
    Id string
    The provider-assigned unique ID for this managed resource.
    DbServerId string
    The OCID of the Exacc Db server associated with the database node.
    DbSystemId string
    The OCID of the DB system.
    Filters []GetDbNodesFilter
    State string
    The current state of the database node.
    VmClusterId string
    compartmentId String
    dbNodes List<GetDbNodesDbNode>
    The list of db_nodes.
    id String
    The provider-assigned unique ID for this managed resource.
    dbServerId String
    The OCID of the Exacc Db server associated with the database node.
    dbSystemId String
    The OCID of the DB system.
    filters List<GetDbNodesFilter>
    state String
    The current state of the database node.
    vmClusterId String
    compartmentId string
    dbNodes GetDbNodesDbNode[]
    The list of db_nodes.
    id string
    The provider-assigned unique ID for this managed resource.
    dbServerId string
    The OCID of the Exacc Db server associated with the database node.
    dbSystemId string
    The OCID of the DB system.
    filters GetDbNodesFilter[]
    state string
    The current state of the database node.
    vmClusterId string
    compartment_id str
    db_nodes Sequence[database.GetDbNodesDbNode]
    The list of db_nodes.
    id str
    The provider-assigned unique ID for this managed resource.
    db_server_id str
    The OCID of the Exacc Db server associated with the database node.
    db_system_id str
    The OCID of the DB system.
    filters Sequence[database.GetDbNodesFilter]
    state str
    The current state of the database node.
    vm_cluster_id str
    compartmentId String
    dbNodes List<Property Map>
    The list of db_nodes.
    id String
    The provider-assigned unique ID for this managed resource.
    dbServerId String
    The OCID of the Exacc Db server associated with the database node.
    dbSystemId String
    The OCID of the DB system.
    filters List<Property Map>
    state String
    The current state of the database node.
    vmClusterId String

    Supporting Types

    GetDbNodesDbNode

    AdditionalDetails string
    Additional information about the planned maintenance.
    BackupIpId string
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    BackupVnic2id string
    The OCID of the second backup VNIC.
    BackupVnicId string
    The OCID of the backup VNIC.
    CpuCoreCount int
    The number of CPU cores enabled on the Db node.
    DbNodeId string
    DbNodeStorageSizeInGbs int
    The allocated local node storage in GBs on the Db node.
    DbServerId string
    The OCID of the Exacc Db server.
    DbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    FaultDomain string
    The name of the Fault Domain the instance is contained in.
    FreeformTags Dictionary<string, string>
    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"}
    HostIpId string
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    Hostname string
    The host name for the database node.
    Id string
    The OCID of the database node.
    LifecycleDetails string
    Information about the current lifecycle state.
    MaintenanceType string
    The type of database node maintenance.
    MemorySizeInGbs int
    The allocated memory in GBs on the Db node.
    SoftwareStorageSizeInGb int
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    State string
    A filter to return only resources that match the given lifecycle state exactly.
    TimeCreated string
    The date and time that the database node was created.
    TimeMaintenanceWindowEnd string
    End date and time of maintenance window.
    TimeMaintenanceWindowStart string
    Start date and time of maintenance window.
    TotalCpuCoreCount int
    The total number of CPU cores reserved on the Db node.
    Vnic2id string
    The OCID of the second VNIC.
    VnicId string
    The OCID of the VNIC.
    AdditionalDetails string
    Additional information about the planned maintenance.
    BackupIpId string
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    BackupVnic2id string
    The OCID of the second backup VNIC.
    BackupVnicId string
    The OCID of the backup VNIC.
    CpuCoreCount int
    The number of CPU cores enabled on the Db node.
    DbNodeId string
    DbNodeStorageSizeInGbs int
    The allocated local node storage in GBs on the Db node.
    DbServerId string
    The OCID of the Exacc Db server.
    DbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    FaultDomain string
    The name of the Fault Domain the instance is contained in.
    FreeformTags map[string]string
    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"}
    HostIpId string
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    Hostname string
    The host name for the database node.
    Id string
    The OCID of the database node.
    LifecycleDetails string
    Information about the current lifecycle state.
    MaintenanceType string
    The type of database node maintenance.
    MemorySizeInGbs int
    The allocated memory in GBs on the Db node.
    SoftwareStorageSizeInGb int
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    State string
    A filter to return only resources that match the given lifecycle state exactly.
    TimeCreated string
    The date and time that the database node was created.
    TimeMaintenanceWindowEnd string
    End date and time of maintenance window.
    TimeMaintenanceWindowStart string
    Start date and time of maintenance window.
    TotalCpuCoreCount int
    The total number of CPU cores reserved on the Db node.
    Vnic2id string
    The OCID of the second VNIC.
    VnicId string
    The OCID of the VNIC.
    additionalDetails String
    Additional information about the planned maintenance.
    backupIpId String
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    backupVnic2id String
    The OCID of the second backup VNIC.
    backupVnicId String
    The OCID of the backup VNIC.
    cpuCoreCount Integer
    The number of CPU cores enabled on the Db node.
    dbNodeId String
    dbNodeStorageSizeInGbs Integer
    The allocated local node storage in GBs on the Db node.
    dbServerId String
    The OCID of the Exacc Db server.
    dbSystemId String
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    faultDomain String
    The name of the Fault Domain the instance is contained in.
    freeformTags Map<String,String>
    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"}
    hostIpId String
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    hostname String
    The host name for the database node.
    id String
    The OCID of the database node.
    lifecycleDetails String
    Information about the current lifecycle state.
    maintenanceType String
    The type of database node maintenance.
    memorySizeInGbs Integer
    The allocated memory in GBs on the Db node.
    softwareStorageSizeInGb Integer
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    state String
    A filter to return only resources that match the given lifecycle state exactly.
    timeCreated String
    The date and time that the database node was created.
    timeMaintenanceWindowEnd String
    End date and time of maintenance window.
    timeMaintenanceWindowStart String
    Start date and time of maintenance window.
    totalCpuCoreCount Integer
    The total number of CPU cores reserved on the Db node.
    vnic2id String
    The OCID of the second VNIC.
    vnicId String
    The OCID of the VNIC.
    additionalDetails string
    Additional information about the planned maintenance.
    backupIpId string
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    backupVnic2id string
    The OCID of the second backup VNIC.
    backupVnicId string
    The OCID of the backup VNIC.
    cpuCoreCount number
    The number of CPU cores enabled on the Db node.
    dbNodeId string
    dbNodeStorageSizeInGbs number
    The allocated local node storage in GBs on the Db node.
    dbServerId string
    The OCID of the Exacc Db server.
    dbSystemId string
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    faultDomain string
    The name of the Fault Domain the instance is contained in.
    freeformTags {[key: string]: string}
    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"}
    hostIpId string
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    hostname string
    The host name for the database node.
    id string
    The OCID of the database node.
    lifecycleDetails string
    Information about the current lifecycle state.
    maintenanceType string
    The type of database node maintenance.
    memorySizeInGbs number
    The allocated memory in GBs on the Db node.
    softwareStorageSizeInGb number
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    state string
    A filter to return only resources that match the given lifecycle state exactly.
    timeCreated string
    The date and time that the database node was created.
    timeMaintenanceWindowEnd string
    End date and time of maintenance window.
    timeMaintenanceWindowStart string
    Start date and time of maintenance window.
    totalCpuCoreCount number
    The total number of CPU cores reserved on the Db node.
    vnic2id string
    The OCID of the second VNIC.
    vnicId string
    The OCID of the VNIC.
    additional_details str
    Additional information about the planned maintenance.
    backup_ip_id str
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    backup_vnic2id str
    The OCID of the second backup VNIC.
    backup_vnic_id str
    The OCID of the backup VNIC.
    cpu_core_count int
    The number of CPU cores enabled on the Db node.
    db_node_id str
    db_node_storage_size_in_gbs int
    The allocated local node storage in GBs on the Db node.
    db_server_id str
    The OCID of the Exacc Db server.
    db_system_id str
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    fault_domain str
    The name of the Fault Domain the instance is contained in.
    freeform_tags Mapping[str, str]
    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"}
    host_ip_id str
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    hostname str
    The host name for the database node.
    id str
    The OCID of the database node.
    lifecycle_details str
    Information about the current lifecycle state.
    maintenance_type str
    The type of database node maintenance.
    memory_size_in_gbs int
    The allocated memory in GBs on the Db node.
    software_storage_size_in_gb int
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    state str
    A filter to return only resources that match the given lifecycle state exactly.
    time_created str
    The date and time that the database node was created.
    time_maintenance_window_end str
    End date and time of maintenance window.
    time_maintenance_window_start str
    Start date and time of maintenance window.
    total_cpu_core_count int
    The total number of CPU cores reserved on the Db node.
    vnic2id str
    The OCID of the second VNIC.
    vnic_id str
    The OCID of the VNIC.
    additionalDetails String
    Additional information about the planned maintenance.
    backupIpId String
    The OCID of the backup IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection.
    backupVnic2id String
    The OCID of the second backup VNIC.
    backupVnicId String
    The OCID of the backup VNIC.
    cpuCoreCount Number
    The number of CPU cores enabled on the Db node.
    dbNodeId String
    dbNodeStorageSizeInGbs Number
    The allocated local node storage in GBs on the Db node.
    dbServerId String
    The OCID of the Exacc Db server.
    dbSystemId String
    The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
    faultDomain String
    The name of the Fault Domain the instance is contained in.
    freeformTags Map<String>
    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"}
    hostIpId String
    The OCID of the host IP address associated with the database node. Use this OCID with either the GetPrivateIp or the GetPublicIpByPrivateIpId API to get the IP address needed to make a database connection. Note: Applies only to Exadata Cloud Service.
    hostname String
    The host name for the database node.
    id String
    The OCID of the database node.
    lifecycleDetails String
    Information about the current lifecycle state.
    maintenanceType String
    The type of database node maintenance.
    memorySizeInGbs Number
    The allocated memory in GBs on the Db node.
    softwareStorageSizeInGb Number
    The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.
    state String
    A filter to return only resources that match the given lifecycle state exactly.
    timeCreated String
    The date and time that the database node was created.
    timeMaintenanceWindowEnd String
    End date and time of maintenance window.
    timeMaintenanceWindowStart String
    Start date and time of maintenance window.
    totalCpuCoreCount Number
    The total number of CPU cores reserved on the Db node.
    vnic2id String
    The OCID of the second VNIC.
    vnicId String
    The OCID of the VNIC.

    GetDbNodesFilter

    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 v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi