Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.Database.getDbServers
Explore with Pulumi AI
This data source provides the list of Db Servers in Oracle Cloud Infrastructure Database service.
Lists the Exadata DB servers in the ExadataInfrastructureId and specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDbServers = oci.Database.getDbServers({
    compartmentId: compartmentId,
    exadataInfrastructureId: testExadataInfrastructure.id,
    displayName: dbServerDisplayName,
    state: dbServerState,
});
import pulumi
import pulumi_oci as oci
test_db_servers = oci.Database.get_db_servers(compartment_id=compartment_id,
    exadata_infrastructure_id=test_exadata_infrastructure["id"],
    display_name=db_server_display_name,
    state=db_server_state)
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.GetDbServers(ctx, &database.GetDbServersArgs{
			CompartmentId:           compartmentId,
			ExadataInfrastructureId: testExadataInfrastructure.Id,
			DisplayName:             pulumi.StringRef(dbServerDisplayName),
			State:                   pulumi.StringRef(dbServerState),
		}, 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 testDbServers = Oci.Database.GetDbServers.Invoke(new()
    {
        CompartmentId = compartmentId,
        ExadataInfrastructureId = testExadataInfrastructure.Id,
        DisplayName = dbServerDisplayName,
        State = dbServerState,
    });
});
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.GetDbServersArgs;
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 testDbServers = DatabaseFunctions.getDbServers(GetDbServersArgs.builder()
            .compartmentId(compartmentId)
            .exadataInfrastructureId(testExadataInfrastructure.id())
            .displayName(dbServerDisplayName)
            .state(dbServerState)
            .build());
    }
}
variables:
  testDbServers:
    fn::invoke:
      function: oci:Database:getDbServers
      arguments:
        compartmentId: ${compartmentId}
        exadataInfrastructureId: ${testExadataInfrastructure.id}
        displayName: ${dbServerDisplayName}
        state: ${dbServerState}
Using getDbServers
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 getDbServers(args: GetDbServersArgs, opts?: InvokeOptions): Promise<GetDbServersResult>
function getDbServersOutput(args: GetDbServersOutputArgs, opts?: InvokeOptions): Output<GetDbServersResult>def get_db_servers(compartment_id: Optional[str] = None,
                   display_name: Optional[str] = None,
                   exadata_infrastructure_id: Optional[str] = None,
                   filters: Optional[Sequence[GetDbServersFilter]] = None,
                   state: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetDbServersResult
def get_db_servers_output(compartment_id: Optional[pulumi.Input[str]] = None,
                   display_name: Optional[pulumi.Input[str]] = None,
                   exadata_infrastructure_id: Optional[pulumi.Input[str]] = None,
                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetDbServersFilterArgs]]]] = None,
                   state: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetDbServersResult]func GetDbServers(ctx *Context, args *GetDbServersArgs, opts ...InvokeOption) (*GetDbServersResult, error)
func GetDbServersOutput(ctx *Context, args *GetDbServersOutputArgs, opts ...InvokeOption) GetDbServersResultOutput> Note: This function is named GetDbServers in the Go SDK.
public static class GetDbServers 
{
    public static Task<GetDbServersResult> InvokeAsync(GetDbServersArgs args, InvokeOptions? opts = null)
    public static Output<GetDbServersResult> Invoke(GetDbServersInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDbServersResult> getDbServers(GetDbServersArgs args, InvokeOptions options)
public static Output<GetDbServersResult> getDbServers(GetDbServersArgs args, InvokeOptions options)
fn::invoke:
  function: oci:Database/getDbServers:getDbServers
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CompartmentId string
- The compartment OCID.
- ExadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
List<GetDb Servers Filter> 
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- CompartmentId string
- The compartment OCID.
- ExadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- Filters
[]GetDb Servers Filter 
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId String
- The compartment OCID.
- exadataInfrastructure StringId 
- The OCID of the ExadataInfrastructure.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
List<GetDb Servers Filter> 
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId string
- The compartment OCID.
- exadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- displayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
GetDb Servers Filter[] 
- state string
- A filter to return only resources that match the given lifecycle state exactly.
- compartment_id str
- The compartment OCID.
- exadata_infrastructure_ strid 
- The OCID of the ExadataInfrastructure.
- display_name str
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters
Sequence[GetDb Servers Filter] 
- state str
- A filter to return only resources that match the given lifecycle state exactly.
- compartmentId String
- The compartment OCID.
- exadataInfrastructure StringId 
- The OCID of the ExadataInfrastructure.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- filters List<Property Map>
- state String
- A filter to return only resources that match the given lifecycle state exactly.
getDbServers Result
The following output properties are available:
- CompartmentId string
- The OCID of the compartment.
- DbServers List<GetDb Servers Db Server> 
- The list of db_servers.
- ExadataInfrastructure stringId 
- The OCID of the Exadata infrastructure.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- The user-friendly name for the Db server. The name does not need to be unique.
- Filters
List<GetDb Servers Filter> 
- State string
- The current state of the Db server.
- CompartmentId string
- The OCID of the compartment.
- DbServers []GetDb Servers Db Server 
- The list of db_servers.
- ExadataInfrastructure stringId 
- The OCID of the Exadata infrastructure.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- The user-friendly name for the Db server. The name does not need to be unique.
- Filters
[]GetDb Servers Filter 
- State string
- The current state of the Db server.
- compartmentId String
- The OCID of the compartment.
- dbServers List<GetDb Servers Db Server> 
- The list of db_servers.
- exadataInfrastructure StringId 
- The OCID of the Exadata infrastructure.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- The user-friendly name for the Db server. The name does not need to be unique.
- filters
List<GetDb Servers Filter> 
- state String
- The current state of the Db server.
- compartmentId string
- The OCID of the compartment.
- dbServers GetDb Servers Db Server[] 
- The list of db_servers.
- exadataInfrastructure stringId 
- The OCID of the Exadata infrastructure.
- id string
- The provider-assigned unique ID for this managed resource.
- displayName string
- The user-friendly name for the Db server. The name does not need to be unique.
- filters
GetDb Servers Filter[] 
- state string
- The current state of the Db server.
- compartment_id str
- The OCID of the compartment.
- db_servers Sequence[GetDb Servers Db Server] 
- The list of db_servers.
- exadata_infrastructure_ strid 
- The OCID of the Exadata infrastructure.
- id str
- The provider-assigned unique ID for this managed resource.
- display_name str
- The user-friendly name for the Db server. The name does not need to be unique.
- filters
Sequence[GetDb Servers Filter] 
- state str
- The current state of the Db server.
- compartmentId String
- The OCID of the compartment.
- dbServers List<Property Map>
- The list of db_servers.
- exadataInfrastructure StringId 
- The OCID of the Exadata infrastructure.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- The user-friendly name for the Db server. The name does not need to be unique.
- filters List<Property Map>
- state String
- The current state of the Db server.
Supporting Types
GetDbServersDbServer    
- AutonomousVirtual List<string>Machine Ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- AutonomousVm List<string>Cluster Ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- CompartmentId string
- The compartment OCID.
- ComputeModel string
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- CpuCore intCount 
- The number of CPU cores enabled on the Db server.
- DbNode List<string>Ids 
- The OCID of the Db nodes associated with the Db server.
- DbNode intStorage Size In Gbs 
- The allocated local node storage in GBs on the Db server.
- DbServer List<GetPatching Details Db Servers Db Server Db Server Patching Detail> 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- ExadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- 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"}
- Id string
- The OCID of the Exacc Db server.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- MaxCpu intCount 
- The total number of CPU cores available.
- MaxDb intNode Storage In Gbs 
- The total local node storage available in GBs.
- MaxMemory intIn Gbs 
- The total memory available in GBs.
- MemorySize intIn Gbs 
- The allocated memory in GBs on the Db server.
- Shape string
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- TimeCreated string
- The date and time that the Db Server was created.
- VmCluster List<string>Ids 
- The OCID of the VM Clusters associated with the Db server.
- AutonomousVirtual []stringMachine Ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- AutonomousVm []stringCluster Ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- CompartmentId string
- The compartment OCID.
- ComputeModel string
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- CpuCore intCount 
- The number of CPU cores enabled on the Db server.
- DbNode []stringIds 
- The OCID of the Db nodes associated with the Db server.
- DbNode intStorage Size In Gbs 
- The allocated local node storage in GBs on the Db server.
- DbServer []GetPatching Details Db Servers Db Server Db Server Patching Detail 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- DisplayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- ExadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- 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"}
- Id string
- The OCID of the Exacc Db server.
- LifecycleDetails string
- Additional information about the current lifecycle state.
- MaxCpu intCount 
- The total number of CPU cores available.
- MaxDb intNode Storage In Gbs 
- The total local node storage available in GBs.
- MaxMemory intIn Gbs 
- The total memory available in GBs.
- MemorySize intIn Gbs 
- The allocated memory in GBs on the Db server.
- Shape string
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- State string
- A filter to return only resources that match the given lifecycle state exactly.
- TimeCreated string
- The date and time that the Db Server was created.
- VmCluster []stringIds 
- The OCID of the VM Clusters associated with the Db server.
- autonomousVirtual List<String>Machine Ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- autonomousVm List<String>Cluster Ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- compartmentId String
- The compartment OCID.
- computeModel String
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- cpuCore IntegerCount 
- The number of CPU cores enabled on the Db server.
- dbNode List<String>Ids 
- The OCID of the Db nodes associated with the Db server.
- dbNode IntegerStorage Size In Gbs 
- The allocated local node storage in GBs on the Db server.
- dbServer List<GetPatching Details Db Servers Db Server Db Server Patching Detail> 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- exadataInfrastructure StringId 
- The OCID of the ExadataInfrastructure.
- 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"}
- id String
- The OCID of the Exacc Db server.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- maxCpu IntegerCount 
- The total number of CPU cores available.
- maxDb IntegerNode Storage In Gbs 
- The total local node storage available in GBs.
- maxMemory IntegerIn Gbs 
- The total memory available in GBs.
- memorySize IntegerIn Gbs 
- The allocated memory in GBs on the Db server.
- shape String
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated String
- The date and time that the Db Server was created.
- vmCluster List<String>Ids 
- The OCID of the VM Clusters associated with the Db server.
- autonomousVirtual string[]Machine Ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- autonomousVm string[]Cluster Ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- compartmentId string
- The compartment OCID.
- computeModel string
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- cpuCore numberCount 
- The number of CPU cores enabled on the Db server.
- dbNode string[]Ids 
- The OCID of the Db nodes associated with the Db server.
- dbNode numberStorage Size In Gbs 
- The allocated local node storage in GBs on the Db server.
- dbServer GetPatching Details Db Servers Db Server Db Server Patching Detail[] 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName string
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- exadataInfrastructure stringId 
- The OCID of the ExadataInfrastructure.
- {[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"}
- id string
- The OCID of the Exacc Db server.
- lifecycleDetails string
- Additional information about the current lifecycle state.
- maxCpu numberCount 
- The total number of CPU cores available.
- maxDb numberNode Storage In Gbs 
- The total local node storage available in GBs.
- maxMemory numberIn Gbs 
- The total memory available in GBs.
- memorySize numberIn Gbs 
- The allocated memory in GBs on the Db server.
- shape string
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- state string
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated string
- The date and time that the Db Server was created.
- vmCluster string[]Ids 
- The OCID of the VM Clusters associated with the Db server.
- autonomous_virtual_ Sequence[str]machine_ ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- autonomous_vm_ Sequence[str]cluster_ ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- compartment_id str
- The compartment OCID.
- compute_model str
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- cpu_core_ intcount 
- The number of CPU cores enabled on the Db server.
- db_node_ Sequence[str]ids 
- The OCID of the Db nodes associated with the Db server.
- db_node_ intstorage_ size_ in_ gbs 
- The allocated local node storage in GBs on the Db server.
- db_server_ Sequence[Getpatching_ details Db Servers Db Server Db Server Patching Detail] 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- display_name str
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- exadata_infrastructure_ strid 
- The OCID of the ExadataInfrastructure.
- 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"}
- id str
- The OCID of the Exacc Db server.
- lifecycle_details str
- Additional information about the current lifecycle state.
- max_cpu_ intcount 
- The total number of CPU cores available.
- max_db_ intnode_ storage_ in_ gbs 
- The total local node storage available in GBs.
- max_memory_ intin_ gbs 
- The total memory available in GBs.
- memory_size_ intin_ gbs 
- The allocated memory in GBs on the Db server.
- shape str
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- state str
- A filter to return only resources that match the given lifecycle state exactly.
- time_created str
- The date and time that the Db Server was created.
- vm_cluster_ Sequence[str]ids 
- The OCID of the VM Clusters associated with the Db server.
- autonomousVirtual List<String>Machine Ids 
- The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.
- autonomousVm List<String>Cluster Ids 
- The list of OCIDs of the Autonomous VM Clusters associated with the Db server.
- compartmentId String
- The compartment OCID.
- computeModel String
- The compute model of the Autonomous Database. This is required if using the computeCountparameter. If usingcpuCoreCountthen it is an error to specifycomputeModelto a non-null value. ECPU compute model is the recommended model and OCPU compute model is legacy.
- cpuCore NumberCount 
- The number of CPU cores enabled on the Db server.
- dbNode List<String>Ids 
- The OCID of the Db nodes associated with the Db server.
- dbNode NumberStorage Size In Gbs 
- The allocated local node storage in GBs on the Db server.
- dbServer List<Property Map>Patching Details 
- The scheduling details for the quarterly maintenance window. Patching and system updates take place during the maintenance window.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
- displayName String
- A filter to return only resources that match the entire display name given. The match is not case sensitive.
- exadataInfrastructure StringId 
- The OCID of the ExadataInfrastructure.
- 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"}
- id String
- The OCID of the Exacc Db server.
- lifecycleDetails String
- Additional information about the current lifecycle state.
- maxCpu NumberCount 
- The total number of CPU cores available.
- maxDb NumberNode Storage In Gbs 
- The total local node storage available in GBs.
- maxMemory NumberIn Gbs 
- The total memory available in GBs.
- memorySize NumberIn Gbs 
- The allocated memory in GBs on the Db server.
- shape String
- The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.
- state String
- A filter to return only resources that match the given lifecycle state exactly.
- timeCreated String
- The date and time that the Db Server was created.
- vmCluster List<String>Ids 
- The OCID of the VM Clusters associated with the Db server.
GetDbServersDbServerDbServerPatchingDetail        
- EstimatedPatch intDuration 
- Estimated time, in minutes, to patch one database server.
- PatchingStatus string
- The status of the patching operation.
- TimePatching stringEnded 
- The time when the patching operation ended.
- TimePatching stringStarted 
- The time when the patching operation started.
- EstimatedPatch intDuration 
- Estimated time, in minutes, to patch one database server.
- PatchingStatus string
- The status of the patching operation.
- TimePatching stringEnded 
- The time when the patching operation ended.
- TimePatching stringStarted 
- The time when the patching operation started.
- estimatedPatch IntegerDuration 
- Estimated time, in minutes, to patch one database server.
- patchingStatus String
- The status of the patching operation.
- timePatching StringEnded 
- The time when the patching operation ended.
- timePatching StringStarted 
- The time when the patching operation started.
- estimatedPatch numberDuration 
- Estimated time, in minutes, to patch one database server.
- patchingStatus string
- The status of the patching operation.
- timePatching stringEnded 
- The time when the patching operation ended.
- timePatching stringStarted 
- The time when the patching operation started.
- estimated_patch_ intduration 
- Estimated time, in minutes, to patch one database server.
- patching_status str
- The status of the patching operation.
- time_patching_ strended 
- The time when the patching operation ended.
- time_patching_ strstarted 
- The time when the patching operation started.
- estimatedPatch NumberDuration 
- Estimated time, in minutes, to patch one database server.
- patchingStatus String
- The status of the patching operation.
- timePatching StringEnded 
- The time when the patching operation ended.
- timePatching StringStarted 
- The time when the patching operation started.
GetDbServersFilter   
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.