Oracle Cloud Infrastructure

v0.5.0 published on Monday, Sep 12, 2022 by Pulumi

getDbNodes

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

Lists the database nodes in the specified DB system and compartment. A database node is a server running database software.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testDbNodes = Oci.Database.GetDbNodes.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DbServerId = oci_database_db_server.Test_db_server.Id,
        DbSystemId = oci_database_db_system.Test_db_system.Id,
        State = @var.Db_node_state,
        VmClusterId = oci_database_vm_cluster.Test_vm_cluster.Id,
    });

});
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.GetDbNodes(ctx, &database.GetDbNodesArgs{
			CompartmentId: _var.Compartment_id,
			DbServerId:    pulumi.StringRef(oci_database_db_server.Test_db_server.Id),
			DbSystemId:    pulumi.StringRef(oci_database_db_system.Test_db_system.Id),
			State:         pulumi.StringRef(_var.Db_node_state),
			VmClusterId:   pulumi.StringRef(oci_database_vm_cluster.Test_vm_cluster.Id),
		}, 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.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(var_.compartment_id())
            .dbServerId(oci_database_db_server.test_db_server().id())
            .dbSystemId(oci_database_db_system.test_db_system().id())
            .state(var_.db_node_state())
            .vmClusterId(oci_database_vm_cluster.test_vm_cluster().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_db_nodes = oci.Database.get_db_nodes(compartment_id=var["compartment_id"],
    db_server_id=oci_database_db_server["test_db_server"]["id"],
    db_system_id=oci_database_db_system["test_db_system"]["id"],
    state=var["db_node_state"],
    vm_cluster_id=oci_database_vm_cluster["test_vm_cluster"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testDbNodes = oci.Database.getDbNodes({
    compartmentId: _var.compartment_id,
    dbServerId: oci_database_db_server.test_db_server.id,
    dbSystemId: oci_database_db_system.test_db_system.id,
    state: _var.db_node_state,
    vmClusterId: oci_database_vm_cluster.test_vm_cluster.id,
});
variables:
  testDbNodes:
    Fn::Invoke:
      Function: oci:Database:getDbNodes
      Arguments:
        compartmentId: ${var.compartment_id}
        dbServerId: ${oci_database_db_server.test_db_server.id}
        dbSystemId: ${oci_database_db_system.test_db_system.id}
        state: ${var.db_node_state}
        vmClusterId: ${oci_database_vm_cluster.test_vm_cluster.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 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 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 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.

FaultDomain string

The name of the Fault Domain the instance is contained in.

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.

Hostname string

The host name for the database node.

Id string

The OCID of the database node.

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.

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.

FaultDomain string

The name of the Fault Domain the instance is contained in.

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.

Hostname string

The host name for the database node.

Id string

The OCID of the database node.

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.

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.

faultDomain String

The name of the Fault Domain the instance is contained in.

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.

hostname String

The host name for the database node.

id String

The OCID of the database node.

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.

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.

faultDomain string

The name of the Fault Domain the instance is contained in.

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.

hostname string

The host name for the database node.

id string

The OCID of the database node.

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.

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.

fault_domain str

The name of the Fault Domain the instance is contained in.

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.

hostname str

The host name for the database node.

id str

The OCID of the database node.

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.

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.

faultDomain String

The name of the Fault Domain the instance is contained in.

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.

hostname String

The host name for the database node.

id String

The OCID of the database node.

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.

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
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.