oci.DatabaseManagement.getManagedDatabases
Explore with Pulumi AI
This data source provides the list of Managed Databases in Oracle Cloud Infrastructure Database Management service.
Gets the Managed Database for a specific ID or the list of Managed Databases in a specific compartment.
Managed Databases can be filtered based on the name parameter. Only one of the parameters, ID or name
should be provided. If neither of these parameters is provided, all the Managed Databases in the compartment
are listed. Managed Databases can also be filtered based on the deployment type and management option.
If the deployment type is not specified or if it is ONPREMISE
, then the management option is not
considered and Managed Databases with ADVANCED
management option are listed.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagedDatabases = oci.DatabaseManagement.getManagedDatabases({
compartmentId: compartmentId,
deploymentType: managedDatabaseDeploymentType,
externalExadataInfrastructureId: testExternalExadataInfrastructure.id,
id: managedDatabaseId,
managementOption: managedDatabaseManagementOption,
name: managedDatabaseName,
});
import pulumi
import pulumi_oci as oci
test_managed_databases = oci.DatabaseManagement.get_managed_databases(compartment_id=compartment_id,
deployment_type=managed_database_deployment_type,
external_exadata_infrastructure_id=test_external_exadata_infrastructure["id"],
id=managed_database_id,
management_option=managed_database_management_option,
name=managed_database_name)
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.GetManagedDatabases(ctx, &databasemanagement.GetManagedDatabasesArgs{
CompartmentId: compartmentId,
DeploymentType: pulumi.StringRef(managedDatabaseDeploymentType),
ExternalExadataInfrastructureId: pulumi.StringRef(testExternalExadataInfrastructure.Id),
Id: pulumi.StringRef(managedDatabaseId),
ManagementOption: pulumi.StringRef(managedDatabaseManagementOption),
Name: pulumi.StringRef(managedDatabaseName),
}, 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 testManagedDatabases = Oci.DatabaseManagement.GetManagedDatabases.Invoke(new()
{
CompartmentId = compartmentId,
DeploymentType = managedDatabaseDeploymentType,
ExternalExadataInfrastructureId = testExternalExadataInfrastructure.Id,
Id = managedDatabaseId,
ManagementOption = managedDatabaseManagementOption,
Name = managedDatabaseName,
});
});
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.GetManagedDatabasesArgs;
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 testManagedDatabases = DatabaseManagementFunctions.getManagedDatabases(GetManagedDatabasesArgs.builder()
.compartmentId(compartmentId)
.deploymentType(managedDatabaseDeploymentType)
.externalExadataInfrastructureId(testExternalExadataInfrastructure.id())
.id(managedDatabaseId)
.managementOption(managedDatabaseManagementOption)
.name(managedDatabaseName)
.build());
}
}
variables:
testManagedDatabases:
fn::invoke:
Function: oci:DatabaseManagement:getManagedDatabases
Arguments:
compartmentId: ${compartmentId}
deploymentType: ${managedDatabaseDeploymentType}
externalExadataInfrastructureId: ${testExternalExadataInfrastructure.id}
id: ${managedDatabaseId}
managementOption: ${managedDatabaseManagementOption}
name: ${managedDatabaseName}
Using getManagedDatabases
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 getManagedDatabases(args: GetManagedDatabasesArgs, opts?: InvokeOptions): Promise<GetManagedDatabasesResult>
function getManagedDatabasesOutput(args: GetManagedDatabasesOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabasesResult>
def get_managed_databases(compartment_id: Optional[str] = None,
deployment_type: Optional[str] = None,
external_exadata_infrastructure_id: Optional[str] = None,
filters: Optional[Sequence[_databasemanagement.GetManagedDatabasesFilter]] = None,
id: Optional[str] = None,
management_option: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagedDatabasesResult
def get_managed_databases_output(compartment_id: Optional[pulumi.Input[str]] = None,
deployment_type: Optional[pulumi.Input[str]] = None,
external_exadata_infrastructure_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabasesFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
management_option: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabasesResult]
func GetManagedDatabases(ctx *Context, args *GetManagedDatabasesArgs, opts ...InvokeOption) (*GetManagedDatabasesResult, error)
func GetManagedDatabasesOutput(ctx *Context, args *GetManagedDatabasesOutputArgs, opts ...InvokeOption) GetManagedDatabasesResultOutput
> Note: This function is named GetManagedDatabases
in the Go SDK.
public static class GetManagedDatabases
{
public static Task<GetManagedDatabasesResult> InvokeAsync(GetManagedDatabasesArgs args, InvokeOptions? opts = null)
public static Output<GetManagedDatabasesResult> Invoke(GetManagedDatabasesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagedDatabasesResult> getManagedDatabases(GetManagedDatabasesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:DatabaseManagement/getManagedDatabases:getManagedDatabases
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- External
Exadata stringInfrastructure Id - The OCID of the Exadata infrastructure.
- Filters
List<Get
Managed Databases Filter> - Id string
- The identifier of the resource.
- Management
Option string - A filter to return Managed Databases with the specified management option.
- Name string
- A filter to return only resources that match the entire name.
- Compartment
Id string - The OCID of the compartment.
- Deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- External
Exadata stringInfrastructure Id - The OCID of the Exadata infrastructure.
- Filters
[]Get
Managed Databases Filter - Id string
- The identifier of the resource.
- Management
Option string - A filter to return Managed Databases with the specified management option.
- Name string
- A filter to return only resources that match the entire name.
- compartment
Id String - The OCID of the compartment.
- deployment
Type String - A filter to return Managed Databases of the specified deployment type.
- external
Exadata StringInfrastructure Id - The OCID of the Exadata infrastructure.
- filters
List<Get
Managed Databases Filter> - id String
- The identifier of the resource.
- management
Option String - A filter to return Managed Databases with the specified management option.
- name String
- A filter to return only resources that match the entire name.
- compartment
Id string - The OCID of the compartment.
- deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- external
Exadata stringInfrastructure Id - The OCID of the Exadata infrastructure.
- filters
Get
Managed Databases Filter[] - id string
- The identifier of the resource.
- management
Option string - A filter to return Managed Databases with the specified management option.
- name string
- A filter to return only resources that match the entire name.
- compartment_
id str - The OCID of the compartment.
- deployment_
type str - A filter to return Managed Databases of the specified deployment type.
- external_
exadata_ strinfrastructure_ id - The OCID of the Exadata infrastructure.
- filters
Sequence[databasemanagement.
Get Managed Databases Filter] - id str
- The identifier of the resource.
- management_
option str - A filter to return Managed Databases with the specified management option.
- name str
- A filter to return only resources that match the entire name.
- compartment
Id String - The OCID of the compartment.
- deployment
Type String - A filter to return Managed Databases of the specified deployment type.
- external
Exadata StringInfrastructure Id - The OCID of the Exadata infrastructure.
- filters List<Property Map>
- id String
- The identifier of the resource.
- management
Option String - A filter to return Managed Databases with the specified management option.
- name String
- A filter to return only resources that match the entire name.
getManagedDatabases Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment in which the Managed Database Group resides.
- Managed
Database List<GetCollections Managed Databases Managed Database Collection> - The list of managed_database_collection.
- Deployment
Type string - The infrastructure used to deploy the Oracle Database.
- External
Exadata stringInfrastructure Id - Filters
List<Get
Managed Databases Filter> - Id string
- The OCID of the Managed Database Group.
- Management
Option string - The management option used when enabling Database Management.
- Name string
- The name of the Managed Database.
- Compartment
Id string - The OCID of the compartment in which the Managed Database Group resides.
- Managed
Database []GetCollections Managed Databases Managed Database Collection - The list of managed_database_collection.
- Deployment
Type string - The infrastructure used to deploy the Oracle Database.
- External
Exadata stringInfrastructure Id - Filters
[]Get
Managed Databases Filter - Id string
- The OCID of the Managed Database Group.
- Management
Option string - The management option used when enabling Database Management.
- Name string
- The name of the Managed Database.
- compartment
Id String - The OCID of the compartment in which the Managed Database Group resides.
- managed
Database List<GetCollections Managed Databases Managed Database Collection> - The list of managed_database_collection.
- deployment
Type String - The infrastructure used to deploy the Oracle Database.
- external
Exadata StringInfrastructure Id - filters
List<Get
Managed Databases Filter> - id String
- The OCID of the Managed Database Group.
- management
Option String - The management option used when enabling Database Management.
- name String
- The name of the Managed Database.
- compartment
Id string - The OCID of the compartment in which the Managed Database Group resides.
- managed
Database GetCollections Managed Databases Managed Database Collection[] - The list of managed_database_collection.
- deployment
Type string - The infrastructure used to deploy the Oracle Database.
- external
Exadata stringInfrastructure Id - filters
Get
Managed Databases Filter[] - id string
- The OCID of the Managed Database Group.
- management
Option string - The management option used when enabling Database Management.
- name string
- The name of the Managed Database.
- compartment_
id str - The OCID of the compartment in which the Managed Database Group resides.
- managed_
database_ Sequence[databasemanagement.collections Get Managed Databases Managed Database Collection] - The list of managed_database_collection.
- deployment_
type str - The infrastructure used to deploy the Oracle Database.
- external_
exadata_ strinfrastructure_ id - filters
Sequence[databasemanagement.
Get Managed Databases Filter] - id str
- The OCID of the Managed Database Group.
- management_
option str - The management option used when enabling Database Management.
- name str
- The name of the Managed Database.
- compartment
Id String - The OCID of the compartment in which the Managed Database Group resides.
- managed
Database List<Property Map>Collections - The list of managed_database_collection.
- deployment
Type String - The infrastructure used to deploy the Oracle Database.
- external
Exadata StringInfrastructure Id - filters List<Property Map>
- id String
- The OCID of the Managed Database Group.
- management
Option String - The management option used when enabling Database Management.
- name String
- The name of the Managed Database.
Supporting Types
GetManagedDatabasesFilter
GetManagedDatabasesManagedDatabaseCollection
GetManagedDatabasesManagedDatabaseCollectionItem
- Additional
Details Dictionary<string, object> - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- Compartment
Id string - The OCID of the compartment.
- Database
Status string - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- Database
Sub stringType - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- Database
Type string - The type of Oracle Database installation.
- Database
Version string - The Oracle Database version.
- Db
System stringId - The OCID of the external DB system that this Managed Database is part of.
- 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"}
- Deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- 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 identifier of the resource.
- Is
Cluster bool - Indicates whether the Oracle Database is part of a cluster.
- Managed
Database List<GetGroups Managed Databases Managed Database Collection Item Managed Database Group> - A list of Managed Database Groups that the Managed Database belongs to.
- Management
Option string - A filter to return Managed Databases with the specified management option.
- Name string
- A filter to return only resources that match the entire name.
- Parent
Container stringId - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- Storage
System stringId - The OCID of the storage DB system.
- Time
Created string - The date and time the Managed Database was created.
- Workload
Type string - The workload type of the Autonomous Database.
- Additional
Details map[string]interface{} - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- Compartment
Id string - The OCID of the compartment.
- Database
Status string - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- Database
Sub stringType - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- Database
Type string - The type of Oracle Database installation.
- Database
Version string - The Oracle Database version.
- Db
System stringId - The OCID of the external DB system that this Managed Database is part of.
- 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"}
- Deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- 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 identifier of the resource.
- Is
Cluster bool - Indicates whether the Oracle Database is part of a cluster.
- Managed
Database []GetGroups Managed Databases Managed Database Collection Item Managed Database Group - A list of Managed Database Groups that the Managed Database belongs to.
- Management
Option string - A filter to return Managed Databases with the specified management option.
- Name string
- A filter to return only resources that match the entire name.
- Parent
Container stringId - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- Storage
System stringId - The OCID of the storage DB system.
- Time
Created string - The date and time the Managed Database was created.
- Workload
Type string - The workload type of the Autonomous Database.
- additional
Details Map<String,Object> - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- compartment
Id String - The OCID of the compartment.
- database
Status String - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- database
Sub StringType - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- database
Type String - The type of Oracle Database installation.
- database
Version String - The Oracle Database version.
- db
System StringId - The OCID of the external DB system that this Managed Database is part of.
- 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"}
- deployment
Type String - A filter to return Managed Databases of the specified deployment type.
- 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 identifier of the resource.
- is
Cluster Boolean - Indicates whether the Oracle Database is part of a cluster.
- managed
Database List<GetGroups Managed Databases Managed Database Collection Item Managed Database Group> - A list of Managed Database Groups that the Managed Database belongs to.
- management
Option String - A filter to return Managed Databases with the specified management option.
- name String
- A filter to return only resources that match the entire name.
- parent
Container StringId - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- storage
System StringId - The OCID of the storage DB system.
- time
Created String - The date and time the Managed Database was created.
- workload
Type String - The workload type of the Autonomous Database.
- additional
Details {[key: string]: any} - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- compartment
Id string - The OCID of the compartment.
- database
Status string - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- database
Sub stringType - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- database
Type string - The type of Oracle Database installation.
- database
Version string - The Oracle Database version.
- db
System stringId - The OCID of the external DB system that this Managed Database is part of.
- {[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"}
- deployment
Type string - A filter to return Managed Databases of the specified deployment type.
- {[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 identifier of the resource.
- is
Cluster boolean - Indicates whether the Oracle Database is part of a cluster.
- managed
Database GetGroups Managed Databases Managed Database Collection Item Managed Database Group[] - A list of Managed Database Groups that the Managed Database belongs to.
- management
Option string - A filter to return Managed Databases with the specified management option.
- name string
- A filter to return only resources that match the entire name.
- parent
Container stringId - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- storage
System stringId - The OCID of the storage DB system.
- time
Created string - The date and time the Managed Database was created.
- workload
Type string - The workload type of the Autonomous Database.
- additional_
details Mapping[str, Any] - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- compartment_
id str - The OCID of the compartment.
- database_
status str - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- database_
sub_ strtype - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- database_
type str - The type of Oracle Database installation.
- database_
version str - The Oracle Database version.
- db_
system_ strid - The OCID of the external DB system that this Managed Database is part of.
- 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"}
- deployment_
type str - A filter to return Managed Databases of the specified deployment type.
- 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 identifier of the resource.
- is_
cluster bool - Indicates whether the Oracle Database is part of a cluster.
- managed_
database_ Sequence[databasemanagement.groups Get Managed Databases Managed Database Collection Item Managed Database Group] - A list of Managed Database Groups that the Managed Database belongs to.
- management_
option str - A filter to return Managed Databases with the specified management option.
- name str
- A filter to return only resources that match the entire name.
- parent_
container_ strid - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- storage_
system_ strid - The OCID of the storage DB system.
- time_
created str - The date and time the Managed Database was created.
- workload_
type str - The workload type of the Autonomous Database.
- additional
Details Map<Any> - The additional details specific to a type of database defined in
{"key": "value"}
format. Example:{"bar-key": "value"}
- compartment
Id String - The OCID of the compartment.
- database
Status String - The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.
- database
Sub StringType - The subtype of the Oracle Database. Indicates whether the database is a Container Database, Pluggable Database, Non-container Database, Autonomous Database, or Autonomous Container Database.
- database
Type String - The type of Oracle Database installation.
- database
Version String - The Oracle Database version.
- db
System StringId - The OCID of the external DB system that this Managed Database is part of.
- 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"}
- deployment
Type String - A filter to return Managed Databases of the specified deployment type.
- 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 identifier of the resource.
- is
Cluster Boolean - Indicates whether the Oracle Database is part of a cluster.
- managed
Database List<Property Map>Groups - A list of Managed Database Groups that the Managed Database belongs to.
- management
Option String - A filter to return Managed Databases with the specified management option.
- name String
- A filter to return only resources that match the entire name.
- parent
Container StringId - The OCID of the parent Container Database if Managed Database is a Pluggable Database.
- storage
System StringId - The OCID of the storage DB system.
- time
Created String - The date and time the Managed Database was created.
- workload
Type String - The workload type of the Autonomous Database.
GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup
- Compartment
Id string - The OCID of the compartment.
- Id string
- The identifier of the resource.
- Name string
- A filter to return only resources that match the entire name.
- Compartment
Id string - The OCID of the compartment.
- Id string
- The identifier of the resource.
- Name string
- A filter to return only resources that match the entire name.
- compartment
Id String - The OCID of the compartment.
- id String
- The identifier of the resource.
- name String
- A filter to return only resources that match the entire name.
- compartment
Id string - The OCID of the compartment.
- id string
- The identifier of the resource.
- name string
- A filter to return only resources that match the entire name.
- compartment_
id str - The OCID of the compartment.
- id str
- The identifier of the resource.
- name str
- A filter to return only resources that match the entire name.
- compartment
Id String - The OCID of the compartment.
- id String
- The identifier of the resource.
- name String
- A filter to return only resources that match the entire name.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.