Oracle Cloud Infrastructure

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

getManagedDatabases

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

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

return await Deployment.RunAsync(() => 
{
    var testManagedDatabases = Oci.DatabaseManagement.GetManagedDatabases.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        DeploymentType = @var.Managed_database_deployment_type,
        Id = @var.Managed_database_id,
        ManagementOption = @var.Managed_database_management_option,
        Name = @var.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:    _var.Compartment_id,
			DeploymentType:   pulumi.StringRef(_var.Managed_database_deployment_type),
			Id:               pulumi.StringRef(_var.Managed_database_id),
			ManagementOption: pulumi.StringRef(_var.Managed_database_management_option),
			Name:             pulumi.StringRef(_var.Managed_database_name),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.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(var_.compartment_id())
            .deploymentType(var_.managed_database_deployment_type())
            .id(var_.managed_database_id())
            .managementOption(var_.managed_database_management_option())
            .name(var_.managed_database_name())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_databases = oci.DatabaseManagement.get_managed_databases(compartment_id=var["compartment_id"],
    deployment_type=var["managed_database_deployment_type"],
    id=var["managed_database_id"],
    management_option=var["managed_database_management_option"],
    name=var["managed_database_name"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabases = oci.DatabaseManagement.getManagedDatabases({
    compartmentId: _var.compartment_id,
    deploymentType: _var.managed_database_deployment_type,
    id: _var.managed_database_id,
    managementOption: _var.managed_database_management_option,
    name: _var.managed_database_name,
});
variables:
  testManagedDatabases:
    Fn::Invoke:
      Function: oci:DatabaseManagement:getManagedDatabases
      Arguments:
        compartmentId: ${var.compartment_id}
        deploymentType: ${var.managed_database_deployment_type}
        id: ${var.managed_database_id}
        managementOption: ${var.managed_database_management_option}
        name: ${var.managed_database_name}

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,
                          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,
                          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:

CompartmentId string

The OCID of the compartment.

DeploymentType string

A filter to return Managed Databases of the specified deployment type.

Filters List<GetManagedDatabasesFilter>
Id string

The identifier of the resource.

ManagementOption 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.

CompartmentId string

The OCID of the compartment.

DeploymentType string

A filter to return Managed Databases of the specified deployment type.

Filters []GetManagedDatabasesFilter
Id string

The identifier of the resource.

ManagementOption 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.

compartmentId String

The OCID of the compartment.

deploymentType String

A filter to return Managed Databases of the specified deployment type.

filters List<GetManagedDatabasesFilter>
id String

The identifier of the resource.

managementOption 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.

compartmentId string

The OCID of the compartment.

deploymentType string

A filter to return Managed Databases of the specified deployment type.

filters GetManagedDatabasesFilter[]
id string

The identifier of the resource.

managementOption 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.

filters GetManagedDatabasesFilter]
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.

compartmentId String

The OCID of the compartment.

deploymentType String

A filter to return Managed Databases of the specified deployment type.

filters List<Property Map>
id String

The identifier of the resource.

managementOption 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:

CompartmentId string

The OCID of the compartment in which the Managed Database Group resides.

ManagedDatabaseCollections List<GetManagedDatabasesManagedDatabaseCollection>

The list of managed_database_collection.

DeploymentType string

The infrastructure used to deploy the Oracle Database.

Filters List<GetManagedDatabasesFilter>
Id string

The OCID of the Managed Database Group.

ManagementOption string

The management option used when enabling Database Management.

Name string

The name of the Managed Database.

CompartmentId string

The OCID of the compartment in which the Managed Database Group resides.

ManagedDatabaseCollections []GetManagedDatabasesManagedDatabaseCollection

The list of managed_database_collection.

DeploymentType string

The infrastructure used to deploy the Oracle Database.

Filters []GetManagedDatabasesFilter
Id string

The OCID of the Managed Database Group.

ManagementOption string

The management option used when enabling Database Management.

Name string

The name of the Managed Database.

compartmentId String

The OCID of the compartment in which the Managed Database Group resides.

managedDatabaseCollections List<GetManagedDatabasesManagedDatabaseCollection>

The list of managed_database_collection.

deploymentType String

The infrastructure used to deploy the Oracle Database.

filters List<GetManagedDatabasesFilter>
id String

The OCID of the Managed Database Group.

managementOption String

The management option used when enabling Database Management.

name String

The name of the Managed Database.

compartmentId string

The OCID of the compartment in which the Managed Database Group resides.

managedDatabaseCollections GetManagedDatabasesManagedDatabaseCollection[]

The list of managed_database_collection.

deploymentType string

The infrastructure used to deploy the Oracle Database.

filters GetManagedDatabasesFilter[]
id string

The OCID of the Managed Database Group.

managementOption 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_collections GetManagedDatabasesManagedDatabaseCollection]

The list of managed_database_collection.

deployment_type str

The infrastructure used to deploy the Oracle Database.

filters GetManagedDatabasesFilter]
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.

compartmentId String

The OCID of the compartment in which the Managed Database Group resides.

managedDatabaseCollections List<Property Map>

The list of managed_database_collection.

deploymentType String

The infrastructure used to deploy the Oracle Database.

filters List<Property Map>
id String

The OCID of the Managed Database Group.

managementOption String

The management option used when enabling Database Management.

name String

The name of the Managed Database.

Supporting Types

GetManagedDatabasesFilter

Name string

A filter to return only resources that match the entire name.

Values List<string>
Regex bool
Name string

A filter to return only resources that match the entire name.

Values []string
Regex bool
name String

A filter to return only resources that match the entire name.

values List<String>
regex Boolean
name string

A filter to return only resources that match the entire name.

values string[]
regex boolean
name str

A filter to return only resources that match the entire name.

values Sequence[str]
regex bool
name String

A filter to return only resources that match the entire name.

values List<String>
regex Boolean

GetManagedDatabasesManagedDatabaseCollection

GetManagedDatabasesManagedDatabaseCollectionItem

AdditionalDetails Dictionary<string, object>

The additional details specific to a type of database defined in {"key": "value"} format. Example: {"bar-key": "value"}

CompartmentId string

The OCID of the compartment.

DatabaseStatus string

The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.

DatabaseSubType string

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.

DatabaseType string

The type of Oracle Database installation.

DeploymentType string

A filter to return Managed Databases of the specified deployment type.

Id string

The identifier of the resource.

IsCluster bool

Indicates whether the Oracle Database is part of a cluster.

ManagedDatabaseGroups List<GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup>

A list of Managed Database Groups that the Managed Database belongs to.

ManagementOption 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.

ParentContainerId string

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

TimeCreated string

The date and time the Managed Database was created.

WorkloadType string

The workload type of the Autonomous Database.

AdditionalDetails map[string]interface{}

The additional details specific to a type of database defined in {"key": "value"} format. Example: {"bar-key": "value"}

CompartmentId string

The OCID of the compartment.

DatabaseStatus string

The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.

DatabaseSubType string

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.

DatabaseType string

The type of Oracle Database installation.

DeploymentType string

A filter to return Managed Databases of the specified deployment type.

Id string

The identifier of the resource.

IsCluster bool

Indicates whether the Oracle Database is part of a cluster.

ManagedDatabaseGroups []GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup

A list of Managed Database Groups that the Managed Database belongs to.

ManagementOption 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.

ParentContainerId string

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

TimeCreated string

The date and time the Managed Database was created.

WorkloadType string

The workload type of the Autonomous Database.

additionalDetails Map<String,Object>

The additional details specific to a type of database defined in {"key": "value"} format. Example: {"bar-key": "value"}

compartmentId String

The OCID of the compartment.

databaseStatus String

The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.

databaseSubType String

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.

databaseType String

The type of Oracle Database installation.

deploymentType String

A filter to return Managed Databases of the specified deployment type.

id String

The identifier of the resource.

isCluster Boolean

Indicates whether the Oracle Database is part of a cluster.

managedDatabaseGroups List<GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup>

A list of Managed Database Groups that the Managed Database belongs to.

managementOption 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.

parentContainerId String

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

timeCreated String

The date and time the Managed Database was created.

workloadType String

The workload type of the Autonomous Database.

additionalDetails {[key: string]: any}

The additional details specific to a type of database defined in {"key": "value"} format. Example: {"bar-key": "value"}

compartmentId string

The OCID of the compartment.

databaseStatus string

The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.

databaseSubType string

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.

databaseType string

The type of Oracle Database installation.

deploymentType string

A filter to return Managed Databases of the specified deployment type.

id string

The identifier of the resource.

isCluster boolean

Indicates whether the Oracle Database is part of a cluster.

managedDatabaseGroups GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup[]

A list of Managed Database Groups that the Managed Database belongs to.

managementOption 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.

parentContainerId string

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

timeCreated string

The date and time the Managed Database was created.

workloadType 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_type str

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.

deployment_type str

A filter to return Managed Databases of the specified deployment type.

id str

The identifier of the resource.

is_cluster bool

Indicates whether the Oracle Database is part of a cluster.

managed_database_groups GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup]

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_id str

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

time_created str

The date and time the Managed Database was created.

workload_type str

The workload type of the Autonomous Database.

additionalDetails Map<Any>

The additional details specific to a type of database defined in {"key": "value"} format. Example: {"bar-key": "value"}

compartmentId String

The OCID of the compartment.

databaseStatus String

The status of the Oracle Database. Indicates whether the status of the database is UP, DOWN, or UNKNOWN at the current time.

databaseSubType String

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.

databaseType String

The type of Oracle Database installation.

deploymentType String

A filter to return Managed Databases of the specified deployment type.

id String

The identifier of the resource.

isCluster Boolean

Indicates whether the Oracle Database is part of a cluster.

managedDatabaseGroups List<Property Map>

A list of Managed Database Groups that the Managed Database belongs to.

managementOption 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.

parentContainerId String

The OCID of the parent Container Database if Managed Database is a Pluggable Database.

timeCreated String

The date and time the Managed Database was created.

workloadType String

The workload type of the Autonomous Database.

GetManagedDatabasesManagedDatabaseCollectionItemManagedDatabaseGroup

CompartmentId 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.

CompartmentId 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.

compartmentId 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.

compartmentId 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.

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

This Pulumi package is based on the oci Terraform Provider.