1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dms
  5. getEnterpriseDatabases
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.dms.getEnterpriseDatabases

Explore with Pulumi AI

This data source provides DMS Enterprise Database available to the user. What is Database.

NOTE: Available since v1.195.0.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.dms.getEnterpriseDatabases({
    nameRegex: "test2",
    instanceId: "2195118",
});
export const alicloudDmsEnterpriseDatabaseExampleId = _default.then(_default => _default.databases?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.dms.get_enterprise_databases(name_regex="test2",
    instance_id="2195118")
pulumi.export("alicloudDmsEnterpriseDatabaseExampleId", default.databases[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := dms.GetEnterpriseDatabases(ctx, &dms.GetEnterpriseDatabasesArgs{
			NameRegex:  pulumi.StringRef("test2"),
			InstanceId: "2195118",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alicloudDmsEnterpriseDatabaseExampleId", _default.Databases[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.Dms.GetEnterpriseDatabases.Invoke(new()
    {
        NameRegex = "test2",
        InstanceId = "2195118",
    });

    return new Dictionary<string, object?>
    {
        ["alicloudDmsEnterpriseDatabaseExampleId"] = @default.Apply(@default => @default.Apply(getEnterpriseDatabasesResult => getEnterpriseDatabasesResult.Databases[0]?.Id)),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dms.DmsFunctions;
import com.pulumi.alicloud.dms.inputs.GetEnterpriseDatabasesArgs;
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 default = DmsFunctions.getEnterpriseDatabases(GetEnterpriseDatabasesArgs.builder()
            .nameRegex("test2")
            .instanceId("2195118")
            .build());

        ctx.export("alicloudDmsEnterpriseDatabaseExampleId", default_.databases()[0].id());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:dms:getEnterpriseDatabases
      arguments:
        nameRegex: test2
        instanceId: '2195118'
outputs:
  alicloudDmsEnterpriseDatabaseExampleId: ${default.databases[0].id}
Copy

Using getEnterpriseDatabases

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 getEnterpriseDatabases(args: GetEnterpriseDatabasesArgs, opts?: InvokeOptions): Promise<GetEnterpriseDatabasesResult>
function getEnterpriseDatabasesOutput(args: GetEnterpriseDatabasesOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseDatabasesResult>
Copy
def get_enterprise_databases(ids: Optional[Sequence[str]] = None,
                             instance_id: Optional[str] = None,
                             name_regex: Optional[str] = None,
                             output_file: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetEnterpriseDatabasesResult
def get_enterprise_databases_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             instance_id: Optional[pulumi.Input[str]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseDatabasesResult]
Copy
func GetEnterpriseDatabases(ctx *Context, args *GetEnterpriseDatabasesArgs, opts ...InvokeOption) (*GetEnterpriseDatabasesResult, error)
func GetEnterpriseDatabasesOutput(ctx *Context, args *GetEnterpriseDatabasesOutputArgs, opts ...InvokeOption) GetEnterpriseDatabasesResultOutput
Copy

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

public static class GetEnterpriseDatabases 
{
    public static Task<GetEnterpriseDatabasesResult> InvokeAsync(GetEnterpriseDatabasesArgs args, InvokeOptions? opts = null)
    public static Output<GetEnterpriseDatabasesResult> Invoke(GetEnterpriseDatabasesInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetEnterpriseDatabasesResult> getEnterpriseDatabases(GetEnterpriseDatabasesArgs args, InvokeOptions options)
public static Output<GetEnterpriseDatabasesResult> getEnterpriseDatabases(GetEnterpriseDatabasesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:dms/getEnterpriseDatabases:getEnterpriseDatabases
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The instance ID of the target database.
Ids List<string>
A list of Database IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the database Schema Name.
OutputFile string
File name where to save data source results (after running pulumi preview).
InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The instance ID of the target database.
Ids []string
A list of Database IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the database Schema Name.
OutputFile string
File name where to save data source results (after running pulumi preview).
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The instance ID of the target database.
ids List<String>
A list of Database IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter the results by the database Schema Name.
outputFile String
File name where to save data source results (after running pulumi preview).
instanceId
This property is required.
Changes to this property will trigger replacement.
string
The instance ID of the target database.
ids string[]
A list of Database IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the database Schema Name.
outputFile string
File name where to save data source results (after running pulumi preview).
instance_id
This property is required.
Changes to this property will trigger replacement.
str
The instance ID of the target database.
ids Sequence[str]
A list of Database IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter the results by the database Schema Name.
output_file str
File name where to save data source results (after running pulumi preview).
instanceId
This property is required.
Changes to this property will trigger replacement.
String
The instance ID of the target database.
ids List<String>
A list of Database IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter the results by the database Schema Name.
outputFile String
File name where to save data source results (after running pulumi preview).

getEnterpriseDatabases Result

The following output properties are available:

Databases List<Pulumi.AliCloud.Dms.Outputs.GetEnterpriseDatabasesDatabase>
A list of Database Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of Database IDs.
InstanceId string
The instance ID of the target database.
NameRegex string
OutputFile string
Databases []GetEnterpriseDatabasesDatabase
A list of Database Entries. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Database IDs.
InstanceId string
The instance ID of the target database.
NameRegex string
OutputFile string
databases List<GetEnterpriseDatabasesDatabase>
A list of Database Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Database IDs.
instanceId String
The instance ID of the target database.
nameRegex String
outputFile String
databases GetEnterpriseDatabasesDatabase[]
A list of Database Entries. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Database IDs.
instanceId string
The instance ID of the target database.
nameRegex string
outputFile string
databases Sequence[GetEnterpriseDatabasesDatabase]
A list of Database Entries. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Database IDs.
instance_id str
The instance ID of the target database.
name_regex str
output_file str
databases List<Property Map>
A list of Database Entries. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Database IDs.
instanceId String
The instance ID of the target database.
nameRegex String
outputFile String

Supporting Types

GetEnterpriseDatabasesDatabase

CatalogName This property is required. string
The name of the Database Directory.> PG Series databases will display the database name.
DatabaseId This property is required. string
The ID of the physical library.
DbType This property is required. string
Database type.
DbaId This property is required. string
The DBA user ID of the target database.
DbaName This property is required. string
The DBA nickname of the target Library.
Encoding This property is required. string
Database encoding.
EnvType This property is required. string
The environment type of the database.
Host This property is required. string
The database connection address.
Id This property is required. string
The Database ID, same value as database_id.
InstanceId This property is required. string
The instance ID of the target database.
OwnerIdLists This property is required. List<string>
Library Owner User ID list.
OwnerNameLists This property is required. List<string>
Library Owner nickname list.
Port This property is required. int
The connection port of the database.
SchemaName This property is required. string
The name of the database.> PG Series databases will display schema names.
SearchName This property is required. string
Library search name.
Sid This property is required. string
Database SID.> only Oracle Database Display.
State This property is required. string
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
CatalogName This property is required. string
The name of the Database Directory.> PG Series databases will display the database name.
DatabaseId This property is required. string
The ID of the physical library.
DbType This property is required. string
Database type.
DbaId This property is required. string
The DBA user ID of the target database.
DbaName This property is required. string
The DBA nickname of the target Library.
Encoding This property is required. string
Database encoding.
EnvType This property is required. string
The environment type of the database.
Host This property is required. string
The database connection address.
Id This property is required. string
The Database ID, same value as database_id.
InstanceId This property is required. string
The instance ID of the target database.
OwnerIdLists This property is required. []string
Library Owner User ID list.
OwnerNameLists This property is required. []string
Library Owner nickname list.
Port This property is required. int
The connection port of the database.
SchemaName This property is required. string
The name of the database.> PG Series databases will display schema names.
SearchName This property is required. string
Library search name.
Sid This property is required. string
Database SID.> only Oracle Database Display.
State This property is required. string
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
catalogName This property is required. String
The name of the Database Directory.> PG Series databases will display the database name.
databaseId This property is required. String
The ID of the physical library.
dbType This property is required. String
Database type.
dbaId This property is required. String
The DBA user ID of the target database.
dbaName This property is required. String
The DBA nickname of the target Library.
encoding This property is required. String
Database encoding.
envType This property is required. String
The environment type of the database.
host This property is required. String
The database connection address.
id This property is required. String
The Database ID, same value as database_id.
instanceId This property is required. String
The instance ID of the target database.
ownerIdLists This property is required. List<String>
Library Owner User ID list.
ownerNameLists This property is required. List<String>
Library Owner nickname list.
port This property is required. Integer
The connection port of the database.
schemaName This property is required. String
The name of the database.> PG Series databases will display schema names.
searchName This property is required. String
Library search name.
sid This property is required. String
Database SID.> only Oracle Database Display.
state This property is required. String
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
catalogName This property is required. string
The name of the Database Directory.> PG Series databases will display the database name.
databaseId This property is required. string
The ID of the physical library.
dbType This property is required. string
Database type.
dbaId This property is required. string
The DBA user ID of the target database.
dbaName This property is required. string
The DBA nickname of the target Library.
encoding This property is required. string
Database encoding.
envType This property is required. string
The environment type of the database.
host This property is required. string
The database connection address.
id This property is required. string
The Database ID, same value as database_id.
instanceId This property is required. string
The instance ID of the target database.
ownerIdLists This property is required. string[]
Library Owner User ID list.
ownerNameLists This property is required. string[]
Library Owner nickname list.
port This property is required. number
The connection port of the database.
schemaName This property is required. string
The name of the database.> PG Series databases will display schema names.
searchName This property is required. string
Library search name.
sid This property is required. string
Database SID.> only Oracle Database Display.
state This property is required. string
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
catalog_name This property is required. str
The name of the Database Directory.> PG Series databases will display the database name.
database_id This property is required. str
The ID of the physical library.
db_type This property is required. str
Database type.
dba_id This property is required. str
The DBA user ID of the target database.
dba_name This property is required. str
The DBA nickname of the target Library.
encoding This property is required. str
Database encoding.
env_type This property is required. str
The environment type of the database.
host This property is required. str
The database connection address.
id This property is required. str
The Database ID, same value as database_id.
instance_id This property is required. str
The instance ID of the target database.
owner_id_lists This property is required. Sequence[str]
Library Owner User ID list.
owner_name_lists This property is required. Sequence[str]
Library Owner nickname list.
port This property is required. int
The connection port of the database.
schema_name This property is required. str
The name of the database.> PG Series databases will display schema names.
search_name This property is required. str
Library search name.
sid This property is required. str
Database SID.> only Oracle Database Display.
state This property is required. str
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
catalogName This property is required. String
The name of the Database Directory.> PG Series databases will display the database name.
databaseId This property is required. String
The ID of the physical library.
dbType This property is required. String
Database type.
dbaId This property is required. String
The DBA user ID of the target database.
dbaName This property is required. String
The DBA nickname of the target Library.
encoding This property is required. String
Database encoding.
envType This property is required. String
The environment type of the database.
host This property is required. String
The database connection address.
id This property is required. String
The Database ID, same value as database_id.
instanceId This property is required. String
The instance ID of the target database.
ownerIdLists This property is required. List<String>
Library Owner User ID list.
ownerNameLists This property is required. List<String>
Library Owner nickname list.
port This property is required. Number
The connection port of the database.
schemaName This property is required. String
The name of the database.> PG Series databases will display schema names.
searchName This property is required. String
Library search name.
sid This property is required. String
Database SID.> only Oracle Database Display.
state This property is required. String
Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.