1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseManagement
  5. getExternalDatabases
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

oci.DatabaseManagement.getExternalDatabases

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi

    This data source provides the list of External Databases in Oracle Cloud Infrastructure Database Management service.

    Lists the external databases in the specified compartment or in the specified DB system.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testExternalDatabases = oci.DatabaseManagement.getExternalDatabases({
        compartmentId: _var.compartment_id,
        displayName: _var.external_database_display_name,
        externalDbSystemId: oci_database_management_external_db_system.test_external_db_system.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_external_databases = oci.DatabaseManagement.get_external_databases(compartment_id=var["compartment_id"],
        display_name=var["external_database_display_name"],
        external_db_system_id=oci_database_management_external_db_system["test_external_db_system"]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseManagement"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DatabaseManagement.GetExternalDatabases(ctx, &databasemanagement.GetExternalDatabasesArgs{
    			CompartmentId:      pulumi.StringRef(_var.Compartment_id),
    			DisplayName:        pulumi.StringRef(_var.External_database_display_name),
    			ExternalDbSystemId: pulumi.StringRef(oci_database_management_external_db_system.Test_external_db_system.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 testExternalDatabases = Oci.DatabaseManagement.GetExternalDatabases.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.External_database_display_name,
            ExternalDbSystemId = oci_database_management_external_db_system.Test_external_db_system.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DatabaseManagement.DatabaseManagementFunctions;
    import com.pulumi.oci.DatabaseManagement.inputs.GetExternalDatabasesArgs;
    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 testExternalDatabases = DatabaseManagementFunctions.getExternalDatabases(GetExternalDatabasesArgs.builder()
                .compartmentId(var_.compartment_id())
                .displayName(var_.external_database_display_name())
                .externalDbSystemId(oci_database_management_external_db_system.test_external_db_system().id())
                .build());
    
        }
    }
    
    variables:
      testExternalDatabases:
        fn::invoke:
          Function: oci:DatabaseManagement:getExternalDatabases
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.external_database_display_name}
            externalDbSystemId: ${oci_database_management_external_db_system.test_external_db_system.id}
    

    Using getExternalDatabases

    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 getExternalDatabases(args: GetExternalDatabasesArgs, opts?: InvokeOptions): Promise<GetExternalDatabasesResult>
    function getExternalDatabasesOutput(args: GetExternalDatabasesOutputArgs, opts?: InvokeOptions): Output<GetExternalDatabasesResult>
    def get_external_databases(compartment_id: Optional[str] = None,
                               display_name: Optional[str] = None,
                               external_db_system_id: Optional[str] = None,
                               filters: Optional[Sequence[_databasemanagement.GetExternalDatabasesFilter]] = None,
                               opts: Optional[InvokeOptions] = None) -> GetExternalDatabasesResult
    def get_external_databases_output(compartment_id: Optional[pulumi.Input[str]] = None,
                               display_name: Optional[pulumi.Input[str]] = None,
                               external_db_system_id: Optional[pulumi.Input[str]] = None,
                               filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetExternalDatabasesFilterArgs]]]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetExternalDatabasesResult]
    func GetExternalDatabases(ctx *Context, args *GetExternalDatabasesArgs, opts ...InvokeOption) (*GetExternalDatabasesResult, error)
    func GetExternalDatabasesOutput(ctx *Context, args *GetExternalDatabasesOutputArgs, opts ...InvokeOption) GetExternalDatabasesResultOutput

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

    public static class GetExternalDatabases 
    {
        public static Task<GetExternalDatabasesResult> InvokeAsync(GetExternalDatabasesArgs args, InvokeOptions? opts = null)
        public static Output<GetExternalDatabasesResult> Invoke(GetExternalDatabasesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetExternalDatabasesResult> getExternalDatabases(GetExternalDatabasesArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseManagement/getExternalDatabases:getExternalDatabases
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExternalDbSystemId string
    The OCID of the external DB system.
    Filters List<GetExternalDatabasesFilter>
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExternalDbSystemId string
    The OCID of the external DB system.
    Filters []GetExternalDatabasesFilter
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    externalDbSystemId String
    The OCID of the external DB system.
    filters List<GetExternalDatabasesFilter>
    compartmentId string
    The OCID of the compartment.
    displayName string
    A filter to only return the resources that match the entire display name.
    externalDbSystemId string
    The OCID of the external DB system.
    filters GetExternalDatabasesFilter[]
    compartment_id str
    The OCID of the compartment.
    display_name str
    A filter to only return the resources that match the entire display name.
    external_db_system_id str
    The OCID of the external DB system.
    filters Sequence[databasemanagement.GetExternalDatabasesFilter]
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    externalDbSystemId String
    The OCID of the external DB system.
    filters List<Property Map>

    getExternalDatabases Result

    The following output properties are available:

    ExternalDatabaseCollections List<GetExternalDatabasesExternalDatabaseCollection>
    The list of external_database_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    The user-friendly name for the database. The name does not have to be unique.
    ExternalDbSystemId string
    Filters List<GetExternalDatabasesFilter>
    ExternalDatabaseCollections []GetExternalDatabasesExternalDatabaseCollection
    The list of external_database_collection.
    Id string
    The provider-assigned unique ID for this managed resource.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    The user-friendly name for the database. The name does not have to be unique.
    ExternalDbSystemId string
    Filters []GetExternalDatabasesFilter
    externalDatabaseCollections List<GetExternalDatabasesExternalDatabaseCollection>
    The list of external_database_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    compartmentId String
    The OCID of the compartment.
    displayName String
    The user-friendly name for the database. The name does not have to be unique.
    externalDbSystemId String
    filters List<GetExternalDatabasesFilter>
    externalDatabaseCollections GetExternalDatabasesExternalDatabaseCollection[]
    The list of external_database_collection.
    id string
    The provider-assigned unique ID for this managed resource.
    compartmentId string
    The OCID of the compartment.
    displayName string
    The user-friendly name for the database. The name does not have to be unique.
    externalDbSystemId string
    filters GetExternalDatabasesFilter[]
    external_database_collections Sequence[databasemanagement.GetExternalDatabasesExternalDatabaseCollection]
    The list of external_database_collection.
    id str
    The provider-assigned unique ID for this managed resource.
    compartment_id str
    The OCID of the compartment.
    display_name str
    The user-friendly name for the database. The name does not have to be unique.
    external_db_system_id str
    filters Sequence[databasemanagement.GetExternalDatabasesFilter]
    externalDatabaseCollections List<Property Map>
    The list of external_database_collection.
    id String
    The provider-assigned unique ID for this managed resource.
    compartmentId String
    The OCID of the compartment.
    displayName String
    The user-friendly name for the database. The name does not have to be unique.
    externalDbSystemId String
    filters List<Property Map>

    Supporting Types

    GetExternalDatabasesExternalDatabaseCollection

    items List<Property Map>
    An array of external databases.

    GetExternalDatabasesExternalDatabaseCollectionItem

    CompartmentId string
    The OCID of the compartment.
    DatabaseSubType string
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    DatabaseType string
    The type of Oracle Database installation.
    DbManagementConfigs List<GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig>
    The configuration of the Database Management service.
    DbSystemInfos List<GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo>
    The basic information about an external DB system.
    DbUniqueName string
    The DB_UNIQUE_NAME of the external database.
    DefinedTags Dictionary<string, object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExternalContainerDatabaseId string
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    ExternalDbHomeId string
    The OCID of the external DB home.
    FreeformTags Dictionary<string, object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the external DB system.
    InstanceDetails List<GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail>
    The list of database instances if the database is a RAC database.
    State string
    The current lifecycle state of the external database resource.
    TimeCreated string
    The date and time the external DB system was created.
    CompartmentId string
    The OCID of the compartment.
    DatabaseSubType string
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    DatabaseType string
    The type of Oracle Database installation.
    DbManagementConfigs []GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig
    The configuration of the Database Management service.
    DbSystemInfos []GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo
    The basic information about an external DB system.
    DbUniqueName string
    The DB_UNIQUE_NAME of the external database.
    DefinedTags map[string]interface{}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExternalContainerDatabaseId string
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    ExternalDbHomeId string
    The OCID of the external DB home.
    FreeformTags map[string]interface{}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The OCID of the external DB system.
    InstanceDetails []GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail
    The list of database instances if the database is a RAC database.
    State string
    The current lifecycle state of the external database resource.
    TimeCreated string
    The date and time the external DB system was created.
    compartmentId String
    The OCID of the compartment.
    databaseSubType String
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    databaseType String
    The type of Oracle Database installation.
    dbManagementConfigs List<GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig>
    The configuration of the Database Management service.
    dbSystemInfos List<GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo>
    The basic information about an external DB system.
    dbUniqueName String
    The DB_UNIQUE_NAME of the external database.
    definedTags Map<String,Object>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A filter to only return the resources that match the entire display name.
    externalContainerDatabaseId String
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    externalDbHomeId String
    The OCID of the external DB home.
    freeformTags Map<String,Object>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the external DB system.
    instanceDetails List<GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail>
    The list of database instances if the database is a RAC database.
    state String
    The current lifecycle state of the external database resource.
    timeCreated String
    The date and time the external DB system was created.
    compartmentId string
    The OCID of the compartment.
    databaseSubType string
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    databaseType string
    The type of Oracle Database installation.
    dbManagementConfigs GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig[]
    The configuration of the Database Management service.
    dbSystemInfos GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo[]
    The basic information about an external DB system.
    dbUniqueName string
    The DB_UNIQUE_NAME of the external database.
    definedTags {[key: string]: any}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A filter to only return the resources that match the entire display name.
    externalContainerDatabaseId string
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    externalDbHomeId string
    The OCID of the external DB home.
    freeformTags {[key: string]: any}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The OCID of the external DB system.
    instanceDetails GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail[]
    The list of database instances if the database is a RAC database.
    state string
    The current lifecycle state of the external database resource.
    timeCreated string
    The date and time the external DB system was created.
    compartment_id str
    The OCID of the compartment.
    database_sub_type str
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    database_type str
    The type of Oracle Database installation.
    db_management_configs Sequence[databasemanagement.GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig]
    The configuration of the Database Management service.
    db_system_infos Sequence[databasemanagement.GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo]
    The basic information about an external DB system.
    db_unique_name str
    The DB_UNIQUE_NAME of the external database.
    defined_tags Mapping[str, Any]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A filter to only return the resources that match the entire display name.
    external_container_database_id str
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    external_db_home_id str
    The OCID of the external DB home.
    freeform_tags Mapping[str, Any]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The OCID of the external DB system.
    instance_details Sequence[databasemanagement.GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail]
    The list of database instances if the database is a RAC database.
    state str
    The current lifecycle state of the external database resource.
    time_created str
    The date and time the external DB system was created.
    compartmentId String
    The OCID of the compartment.
    databaseSubType String
    The subtype of Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, or Non-container Database.
    databaseType String
    The type of Oracle Database installation.
    dbManagementConfigs List<Property Map>
    The configuration of the Database Management service.
    dbSystemInfos List<Property Map>
    The basic information about an external DB system.
    dbUniqueName String
    The DB_UNIQUE_NAME of the external database.
    definedTags Map<Any>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A filter to only return the resources that match the entire display name.
    externalContainerDatabaseId String
    The OCID of the parent Container Database (CDB) if this is a Pluggable Database (PDB).
    externalDbHomeId String
    The OCID of the external DB home.
    freeformTags Map<Any>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The OCID of the external DB system.
    instanceDetails List<Property Map>
    The list of database instances if the database is a RAC database.
    state String
    The current lifecycle state of the external database resource.
    timeCreated String
    The date and time the external DB system was created.

    GetExternalDatabasesExternalDatabaseCollectionItemDbManagementConfig

    ConnectorId string
    The OCID of the external database connector.
    DatabaseManagementStatus string
    The status of the Database Management service.
    LicenseModel string
    The Oracle license model that applies to the external database.
    ConnectorId string
    The OCID of the external database connector.
    DatabaseManagementStatus string
    The status of the Database Management service.
    LicenseModel string
    The Oracle license model that applies to the external database.
    connectorId String
    The OCID of the external database connector.
    databaseManagementStatus String
    The status of the Database Management service.
    licenseModel String
    The Oracle license model that applies to the external database.
    connectorId string
    The OCID of the external database connector.
    databaseManagementStatus string
    The status of the Database Management service.
    licenseModel string
    The Oracle license model that applies to the external database.
    connector_id str
    The OCID of the external database connector.
    database_management_status str
    The status of the Database Management service.
    license_model str
    The Oracle license model that applies to the external database.
    connectorId String
    The OCID of the external database connector.
    databaseManagementStatus String
    The status of the Database Management service.
    licenseModel String
    The Oracle license model that applies to the external database.

    GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfo

    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExadataInfraInfos List<GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo>
    The basic information about an external Exadata Infrastructure.
    Id string
    The OCID of the external DB system.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    ExadataInfraInfos []GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo
    The basic information about an external Exadata Infrastructure.
    Id string
    The OCID of the external DB system.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    exadataInfraInfos List<GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo>
    The basic information about an external Exadata Infrastructure.
    id String
    The OCID of the external DB system.
    compartmentId string
    The OCID of the compartment.
    displayName string
    A filter to only return the resources that match the entire display name.
    exadataInfraInfos GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo[]
    The basic information about an external Exadata Infrastructure.
    id string
    The OCID of the external DB system.
    compartment_id str
    The OCID of the compartment.
    display_name str
    A filter to only return the resources that match the entire display name.
    exadata_infra_infos Sequence[databasemanagement.GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo]
    The basic information about an external Exadata Infrastructure.
    id str
    The OCID of the external DB system.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    exadataInfraInfos List<Property Map>
    The basic information about an external Exadata Infrastructure.
    id String
    The OCID of the external DB system.

    GetExternalDatabasesExternalDatabaseCollectionItemDbSystemInfoExadataInfraInfo

    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    Id string
    The OCID of the external DB system.
    CompartmentId string
    The OCID of the compartment.
    DisplayName string
    A filter to only return the resources that match the entire display name.
    Id string
    The OCID of the external DB system.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    id String
    The OCID of the external DB system.
    compartmentId string
    The OCID of the compartment.
    displayName string
    A filter to only return the resources that match the entire display name.
    id string
    The OCID of the external DB system.
    compartment_id str
    The OCID of the compartment.
    display_name str
    A filter to only return the resources that match the entire display name.
    id str
    The OCID of the external DB system.
    compartmentId String
    The OCID of the compartment.
    displayName String
    A filter to only return the resources that match the entire display name.
    id String
    The OCID of the external DB system.

    GetExternalDatabasesExternalDatabaseCollectionItemInstanceDetail

    HostName string
    The name of the host machine.
    InstanceName string
    The name of the database instance.
    InstanceNumber int
    The instance number of the database instance.
    HostName string
    The name of the host machine.
    InstanceName string
    The name of the database instance.
    InstanceNumber int
    The instance number of the database instance.
    hostName String
    The name of the host machine.
    instanceName String
    The name of the database instance.
    instanceNumber Integer
    The instance number of the database instance.
    hostName string
    The name of the host machine.
    instanceName string
    The name of the database instance.
    instanceNumber number
    The instance number of the database instance.
    host_name str
    The name of the host machine.
    instance_name str
    The name of the database instance.
    instance_number int
    The instance number of the database instance.
    hostName String
    The name of the host machine.
    instanceName String
    The name of the database instance.
    instanceNumber Number
    The instance number of the database instance.

    GetExternalDatabasesFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.32.0 published on Thursday, Apr 18, 2024 by Pulumi