getManagedDatabaseGroups

This data source provides the list of Managed Database Groups in Oracle Cloud Infrastructure Database Management service.

Gets the Managed Database Group for a specific ID or the list of Managed Database Groups in a specific compartment. Managed Database Groups can also be filtered based on the name parameter. Only one of the parameters, ID or name should be provided. If none of these parameters is provided, all the Managed Database Groups in the compartment are listed.

Example Usage

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

return await Deployment.RunAsync(() => 
{
    var testManagedDatabaseGroups = Oci.DatabaseManagement.GetManagedDatabaseGroups.Invoke(new()
    {
        CompartmentId = @var.Compartment_id,
        Id = @var.Managed_database_group_id,
        Name = @var.Managed_database_group_name,
        State = @var.Managed_database_group_state,
    });

});
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.GetManagedDatabaseGroups(ctx, &databasemanagement.GetManagedDatabaseGroupsArgs{
			CompartmentId: _var.Compartment_id,
			Id:            pulumi.StringRef(_var.Managed_database_group_id),
			Name:          pulumi.StringRef(_var.Managed_database_group_name),
			State:         pulumi.StringRef(_var.Managed_database_group_state),
		}, 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.GetManagedDatabaseGroupsArgs;
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 testManagedDatabaseGroups = DatabaseManagementFunctions.getManagedDatabaseGroups(GetManagedDatabaseGroupsArgs.builder()
            .compartmentId(var_.compartment_id())
            .id(var_.managed_database_group_id())
            .name(var_.managed_database_group_name())
            .state(var_.managed_database_group_state())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_managed_database_groups = oci.DatabaseManagement.get_managed_database_groups(compartment_id=var["compartment_id"],
    id=var["managed_database_group_id"],
    name=var["managed_database_group_name"],
    state=var["managed_database_group_state"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagedDatabaseGroups = oci.DatabaseManagement.getManagedDatabaseGroups({
    compartmentId: _var.compartment_id,
    id: _var.managed_database_group_id,
    name: _var.managed_database_group_name,
    state: _var.managed_database_group_state,
});
variables:
  testManagedDatabaseGroups:
    Fn::Invoke:
      Function: oci:DatabaseManagement:getManagedDatabaseGroups
      Arguments:
        compartmentId: ${var.compartment_id}
        id: ${var.managed_database_group_id}
        name: ${var.managed_database_group_name}
        state: ${var.managed_database_group_state}

Using getManagedDatabaseGroups

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 getManagedDatabaseGroups(args: GetManagedDatabaseGroupsArgs, opts?: InvokeOptions): Promise<GetManagedDatabaseGroupsResult>
function getManagedDatabaseGroupsOutput(args: GetManagedDatabaseGroupsOutputArgs, opts?: InvokeOptions): Output<GetManagedDatabaseGroupsResult>
def get_managed_database_groups(compartment_id: Optional[str] = None,
                                filters: Optional[Sequence[_databasemanagement.GetManagedDatabaseGroupsFilter]] = None,
                                id: Optional[str] = None,
                                name: Optional[str] = None,
                                state: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetManagedDatabaseGroupsResult
def get_managed_database_groups_output(compartment_id: Optional[pulumi.Input[str]] = None,
                                filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemanagement.GetManagedDatabaseGroupsFilterArgs]]]] = None,
                                id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                state: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetManagedDatabaseGroupsResult]
func GetManagedDatabaseGroups(ctx *Context, args *GetManagedDatabaseGroupsArgs, opts ...InvokeOption) (*GetManagedDatabaseGroupsResult, error)
func GetManagedDatabaseGroupsOutput(ctx *Context, args *GetManagedDatabaseGroupsOutputArgs, opts ...InvokeOption) GetManagedDatabaseGroupsResultOutput

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

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

The following arguments are supported:

CompartmentId string

The OCID of the compartment.

Filters List<GetManagedDatabaseGroupsFilter>
Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

State string

The lifecycle state of a resource.

CompartmentId string

The OCID of the compartment.

Filters []GetManagedDatabaseGroupsFilter
Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

State string

The lifecycle state of a resource.

compartmentId String

The OCID of the compartment.

filters List<GetManagedDatabaseGroupsFilter>
id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state String

The lifecycle state of a resource.

compartmentId string

The OCID of the compartment.

filters GetManagedDatabaseGroupsFilter[]
id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state string

The lifecycle state of a resource.

compartment_id str

The OCID of the compartment.

filters GetManagedDatabaseGroupsFilter]
id str

The identifier of the resource. Only one of the parameters, id or name should be provided.

name str

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state str

The lifecycle state of a resource.

compartmentId String

The OCID of the compartment.

filters List<Property Map>
id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state String

The lifecycle state of a resource.

getManagedDatabaseGroups Result

The following output properties are available:

CompartmentId string

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

ManagedDatabaseGroupCollections List<GetManagedDatabaseGroupsManagedDatabaseGroupCollection>

The list of managed_database_group_collection.

Filters List<GetManagedDatabaseGroupsFilter>
Id string

The OCID of the Managed Database.

Name string

The name of the Managed Database Group.

State string

The current lifecycle state of the Managed Database Group.

CompartmentId string

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

ManagedDatabaseGroupCollections []GetManagedDatabaseGroupsManagedDatabaseGroupCollection

The list of managed_database_group_collection.

Filters []GetManagedDatabaseGroupsFilter
Id string

The OCID of the Managed Database.

Name string

The name of the Managed Database Group.

State string

The current lifecycle state of the Managed Database Group.

compartmentId String

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

managedDatabaseGroupCollections List<GetManagedDatabaseGroupsManagedDatabaseGroupCollection>

The list of managed_database_group_collection.

filters List<GetManagedDatabaseGroupsFilter>
id String

The OCID of the Managed Database.

name String

The name of the Managed Database Group.

state String

The current lifecycle state of the Managed Database Group.

compartmentId string

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

managedDatabaseGroupCollections GetManagedDatabaseGroupsManagedDatabaseGroupCollection[]

The list of managed_database_group_collection.

filters GetManagedDatabaseGroupsFilter[]
id string

The OCID of the Managed Database.

name string

The name of the Managed Database Group.

state string

The current lifecycle state of the Managed Database Group.

compartment_id str

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

managed_database_group_collections GetManagedDatabaseGroupsManagedDatabaseGroupCollection]

The list of managed_database_group_collection.

filters GetManagedDatabaseGroupsFilter]
id str

The OCID of the Managed Database.

name str

The name of the Managed Database Group.

state str

The current lifecycle state of the Managed Database Group.

compartmentId String

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

managedDatabaseGroupCollections List<Property Map>

The list of managed_database_group_collection.

filters List<Property Map>
id String

The OCID of the Managed Database.

name String

The name of the Managed Database Group.

state String

The current lifecycle state of the Managed Database Group.

Supporting Types

GetManagedDatabaseGroupsFilter

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

Values List<string>
Regex bool
Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

Values []string
Regex bool
name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

values List<String>
regex Boolean
name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

values string[]
regex boolean
name str

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

values Sequence[str]
regex bool
name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

values List<String>
regex Boolean

GetManagedDatabaseGroupsManagedDatabaseGroupCollection

GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItem

CompartmentId string

The OCID of the compartment.

Description string

The information specified by the user about the Managed Database Group.

Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

ManagedDatabases List<GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase>

A list of Managed Databases in the Managed Database Group.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

State string

The lifecycle state of a resource.

TimeCreated string

The date and time the Managed Database Group was created.

TimeUpdated string

The date and time the Managed Database Group was last updated.

CompartmentId string

The OCID of the compartment.

Description string

The information specified by the user about the Managed Database Group.

Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

ManagedDatabases []GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase

A list of Managed Databases in the Managed Database Group.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

State string

The lifecycle state of a resource.

TimeCreated string

The date and time the Managed Database Group was created.

TimeUpdated string

The date and time the Managed Database Group was last updated.

compartmentId String

The OCID of the compartment.

description String

The information specified by the user about the Managed Database Group.

id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

managedDatabases List<GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase>

A list of Managed Databases in the Managed Database Group.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state String

The lifecycle state of a resource.

timeCreated String

The date and time the Managed Database Group was created.

timeUpdated String

The date and time the Managed Database Group was last updated.

compartmentId string

The OCID of the compartment.

description string

The information specified by the user about the Managed Database Group.

id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

managedDatabases GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase[]

A list of Managed Databases in the Managed Database Group.

name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state string

The lifecycle state of a resource.

timeCreated string

The date and time the Managed Database Group was created.

timeUpdated string

The date and time the Managed Database Group was last updated.

compartment_id str

The OCID of the compartment.

description str

The information specified by the user about the Managed Database Group.

id str

The identifier of the resource. Only one of the parameters, id or name should be provided.

managed_databases GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase]

A list of Managed Databases in the Managed Database Group.

name str

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state str

The lifecycle state of a resource.

time_created str

The date and time the Managed Database Group was created.

time_updated str

The date and time the Managed Database Group was last updated.

compartmentId String

The OCID of the compartment.

description String

The information specified by the user about the Managed Database Group.

id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

managedDatabases List<Property Map>

A list of Managed Databases in the Managed Database Group.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

state String

The lifecycle state of a resource.

timeCreated String

The date and time the Managed Database Group was created.

timeUpdated String

The date and time the Managed Database Group was last updated.

GetManagedDatabaseGroupsManagedDatabaseGroupCollectionItemManagedDatabase

CompartmentId string

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

TimeAdded string

The date and time the Managed Database was added to the group.

WorkloadType string

The workload type of the Autonomous Database.

CompartmentId string

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

Id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

Name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

TimeAdded string

The date and time the Managed Database was added to the group.

WorkloadType string

The workload type of the Autonomous Database.

compartmentId String

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

timeAdded String

The date and time the Managed Database was added to the group.

workloadType String

The workload type of the Autonomous Database.

compartmentId string

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

id string

The identifier of the resource. Only one of the parameters, id or name should be provided.

name string

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

timeAdded string

The date and time the Managed Database was added to the group.

workloadType string

The workload type of the Autonomous Database.

compartment_id str

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

id str

The identifier of the resource. Only one of the parameters, id or name should be provided.

name str

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

time_added str

The date and time the Managed Database was added to the group.

workload_type str

The workload type of the Autonomous Database.

compartmentId String

The OCID of the compartment.

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

The infrastructure used to deploy the Oracle Database.

id String

The identifier of the resource. Only one of the parameters, id or name should be provided.

name String

A filter to return only resources that match the entire name. Only one of the parameters, id or name should be provided

timeAdded String

The date and time the Managed Database was added to the group.

workloadType String

The workload type of the Autonomous Database.

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.