oci.Database.getDbNodes
Explore with Pulumi AI
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:
- Compartment
Id string - The compartment OCID.
- Db
Server stringId - The OCID of the Exacc Db server.
- Db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- Filters
List<Get
Db Nodes Filter> - State string
- A filter to return only resources that match the given lifecycle state exactly.
- Vm
Cluster stringId - The OCID of the VM cluster.
- Compartment
Id string - The compartment OCID.
- Db
Server stringId - The OCID of the Exacc Db server.
- Db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- Filters
[]Get
Db Nodes Filter - State string
- A filter to return only resources that match the given lifecycle state exactly.
- Vm
Cluster stringId - The OCID of the VM cluster.
- compartment
Id String - The compartment OCID.
- db
Server StringId - The OCID of the Exacc Db server.
- db
System StringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- filters
List<Get
Db Nodes Filter> - state String
- A filter to return only resources that match the given lifecycle state exactly.
- vm
Cluster StringId - The OCID of the VM cluster.
- compartment
Id string - The compartment OCID.
- db
Server stringId - The OCID of the Exacc Db server.
- db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- filters
Get
Db Nodes Filter[] - state string
- A filter to return only resources that match the given lifecycle state exactly.
- vm
Cluster stringId - The OCID of the VM cluster.
- compartment_
id str - The compartment OCID.
- db_
server_ strid - The OCID of the Exacc Db server.
- db_
system_ strid - 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.
Get Db Nodes Filter] - state str
- A filter to return only resources that match the given lifecycle state exactly.
- vm_
cluster_ strid - The OCID of the VM cluster.
- compartment
Id String - The compartment OCID.
- db
Server StringId - The OCID of the Exacc Db server.
- db
System StringId - 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.
- vm
Cluster StringId - The OCID of the VM cluster.
getDbNodes Result
The following output properties are available:
- Compartment
Id string - Db
Nodes List<GetDb Nodes Db Node> - The list of db_nodes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Db
Server stringId - The OCID of the Exacc Db server associated with the database node.
- Db
System stringId - The OCID of the DB system.
- Filters
List<Get
Db Nodes Filter> - State string
- The current state of the database node.
- Vm
Cluster stringId
- Compartment
Id string - Db
Nodes []GetDb Nodes Db Node - The list of db_nodes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Db
Server stringId - The OCID of the Exacc Db server associated with the database node.
- Db
System stringId - The OCID of the DB system.
- Filters
[]Get
Db Nodes Filter - State string
- The current state of the database node.
- Vm
Cluster stringId
- compartment
Id String - db
Nodes List<GetDb Nodes Db Node> - The list of db_nodes.
- id String
- The provider-assigned unique ID for this managed resource.
- db
Server StringId - The OCID of the Exacc Db server associated with the database node.
- db
System StringId - The OCID of the DB system.
- filters
List<Get
Db Nodes Filter> - state String
- The current state of the database node.
- vm
Cluster StringId
- compartment
Id string - db
Nodes GetDb Nodes Db Node[] - The list of db_nodes.
- id string
- The provider-assigned unique ID for this managed resource.
- db
Server stringId - The OCID of the Exacc Db server associated with the database node.
- db
System stringId - The OCID of the DB system.
- filters
Get
Db Nodes Filter[] - state string
- The current state of the database node.
- vm
Cluster stringId
- compartment_
id str - db_
nodes Sequence[database.Get Db Nodes Db Node] - The list of db_nodes.
- id str
- The provider-assigned unique ID for this managed resource.
- db_
server_ strid - The OCID of the Exacc Db server associated with the database node.
- db_
system_ strid - The OCID of the DB system.
- filters
Sequence[database.
Get Db Nodes Filter] - state str
- The current state of the database node.
- vm_
cluster_ strid
- compartment
Id String - db
Nodes List<Property Map> - The list of db_nodes.
- id String
- The provider-assigned unique ID for this managed resource.
- db
Server StringId - The OCID of the Exacc Db server associated with the database node.
- db
System StringId - The OCID of the DB system.
- filters List<Property Map>
- state String
- The current state of the database node.
- vm
Cluster StringId
Supporting Types
GetDbNodesDbNode
- Additional
Details string - Additional information about the planned maintenance.
- Backup
Ip stringId - 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 string - The OCID of the second backup VNIC.
- Backup
Vnic stringId - The OCID of the backup VNIC.
- Cpu
Core intCount - The number of CPU cores enabled on the Db node.
- Db
Node stringId - Db
Node intStorage Size In Gbs - The allocated local node storage in GBs on the Db node.
- Db
Server stringId - The OCID of the Exacc Db server.
- Db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Fault
Domain string - The name of the Fault Domain the instance is contained in.
- 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"}
- Host
Ip stringId - 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.
- Lifecycle
Details string - Information about the current lifecycle state.
- Maintenance
Type string - The type of database node maintenance.
- Memory
Size intIn Gbs - The allocated memory in GBs on the Db node.
- Software
Storage intSize In Gb - 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.
- Time
Created string - The date and time that the database node was created.
- Time
Maintenance stringWindow End - End date and time of maintenance window.
- Time
Maintenance stringWindow Start - Start date and time of maintenance window.
- Total
Cpu intCore Count - The total number of CPU cores reserved on the Db node.
- Vnic2id string
- The OCID of the second VNIC.
- Vnic
Id string - The OCID of the VNIC.
- Additional
Details string - Additional information about the planned maintenance.
- Backup
Ip stringId - 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 string - The OCID of the second backup VNIC.
- Backup
Vnic stringId - The OCID of the backup VNIC.
- Cpu
Core intCount - The number of CPU cores enabled on the Db node.
- Db
Node stringId - Db
Node intStorage Size In Gbs - The allocated local node storage in GBs on the Db node.
- Db
Server stringId - The OCID of the Exacc Db server.
- Db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- Fault
Domain string - The name of the Fault Domain the instance is contained in.
- 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"}
- Host
Ip stringId - 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.
- Lifecycle
Details string - Information about the current lifecycle state.
- Maintenance
Type string - The type of database node maintenance.
- Memory
Size intIn Gbs - The allocated memory in GBs on the Db node.
- Software
Storage intSize In Gb - 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.
- Time
Created string - The date and time that the database node was created.
- Time
Maintenance stringWindow End - End date and time of maintenance window.
- Time
Maintenance stringWindow Start - Start date and time of maintenance window.
- Total
Cpu intCore Count - The total number of CPU cores reserved on the Db node.
- Vnic2id string
- The OCID of the second VNIC.
- Vnic
Id string - The OCID of the VNIC.
- additional
Details String - Additional information about the planned maintenance.
- backup
Ip StringId - 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 String - The OCID of the second backup VNIC.
- backup
Vnic StringId - The OCID of the backup VNIC.
- cpu
Core IntegerCount - The number of CPU cores enabled on the Db node.
- db
Node StringId - db
Node IntegerStorage Size In Gbs - The allocated local node storage in GBs on the Db node.
- db
Server StringId - The OCID of the Exacc Db server.
- db
System StringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fault
Domain String - The name of the Fault Domain the instance is contained in.
- 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"}
- host
Ip StringId - 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.
- lifecycle
Details String - Information about the current lifecycle state.
- maintenance
Type String - The type of database node maintenance.
- memory
Size IntegerIn Gbs - The allocated memory in GBs on the Db node.
- software
Storage IntegerSize In Gb - 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.
- time
Created String - The date and time that the database node was created.
- time
Maintenance StringWindow End - End date and time of maintenance window.
- time
Maintenance StringWindow Start - Start date and time of maintenance window.
- total
Cpu IntegerCore Count - The total number of CPU cores reserved on the Db node.
- vnic2id String
- The OCID of the second VNIC.
- vnic
Id String - The OCID of the VNIC.
- additional
Details string - Additional information about the planned maintenance.
- backup
Ip stringId - 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 string - The OCID of the second backup VNIC.
- backup
Vnic stringId - The OCID of the backup VNIC.
- cpu
Core numberCount - The number of CPU cores enabled on the Db node.
- db
Node stringId - db
Node numberStorage Size In Gbs - The allocated local node storage in GBs on the Db node.
- db
Server stringId - The OCID of the Exacc Db server.
- db
System stringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fault
Domain string - The name of the Fault Domain the instance is contained in.
- {[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"}
- host
Ip stringId - 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.
- lifecycle
Details string - Information about the current lifecycle state.
- maintenance
Type string - The type of database node maintenance.
- memory
Size numberIn Gbs - The allocated memory in GBs on the Db node.
- software
Storage numberSize In Gb - 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.
- time
Created string - The date and time that the database node was created.
- time
Maintenance stringWindow End - End date and time of maintenance window.
- time
Maintenance stringWindow Start - Start date and time of maintenance window.
- total
Cpu numberCore Count - The total number of CPU cores reserved on the Db node.
- vnic2id string
- The OCID of the second VNIC.
- vnic
Id string - The OCID of the VNIC.
- additional_
details str - Additional information about the planned maintenance.
- backup_
ip_ strid - 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_ strid - The OCID of the backup VNIC.
- cpu_
core_ intcount - The number of CPU cores enabled on the Db node.
- db_
node_ strid - db_
node_ intstorage_ size_ in_ gbs - The allocated local node storage in GBs on the Db node.
- db_
server_ strid - The OCID of the Exacc Db server.
- db_
system_ strid - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- 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.
- 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_ strid - 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_ intin_ gbs - The allocated memory in GBs on the Db node.
- software_
storage_ intsize_ in_ gb - 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_ strwindow_ end - End date and time of maintenance window.
- time_
maintenance_ strwindow_ start - Start date and time of maintenance window.
- total_
cpu_ intcore_ count - 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.
- additional
Details String - Additional information about the planned maintenance.
- backup
Ip StringId - 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 String - The OCID of the second backup VNIC.
- backup
Vnic StringId - The OCID of the backup VNIC.
- cpu
Core NumberCount - The number of CPU cores enabled on the Db node.
- db
Node StringId - db
Node NumberStorage Size In Gbs - The allocated local node storage in GBs on the Db node.
- db
Server StringId - The OCID of the Exacc Db server.
- db
System StringId - The DB system OCID. If provided, filters the results to the set of database versions which are supported for the DB system.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- fault
Domain String - The name of the Fault Domain the instance is contained in.
- 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"}
- host
Ip StringId - 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.
- lifecycle
Details String - Information about the current lifecycle state.
- maintenance
Type String - The type of database node maintenance.
- memory
Size NumberIn Gbs - The allocated memory in GBs on the Db node.
- software
Storage NumberSize In Gb - 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.
- time
Created String - The date and time that the database node was created.
- time
Maintenance StringWindow End - End date and time of maintenance window.
- time
Maintenance StringWindow Start - Start date and time of maintenance window.
- total
Cpu NumberCore Count - The total number of CPU cores reserved on the Db node.
- vnic2id String
- The OCID of the second VNIC.
- vnic
Id String - The OCID of the VNIC.
GetDbNodesFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.