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);
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)
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
})
}
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)),
};
});
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());
}
}
variables:
default:
fn::invoke:
function: alicloud:dms:getEnterpriseDatabases
arguments:
nameRegex: test2
instanceId: '2195118'
outputs:
alicloudDmsEnterpriseDatabaseExampleId: ${default.databases[0].id}
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>
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]
func GetEnterpriseDatabases(ctx *Context, args *GetEnterpriseDatabasesArgs, opts ...InvokeOption) (*GetEnterpriseDatabasesResult, error)
func GetEnterpriseDatabasesOutput(ctx *Context, args *GetEnterpriseDatabasesOutputArgs, opts ...InvokeOption) GetEnterpriseDatabasesResultOutput
> 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)
}
public static CompletableFuture<GetEnterpriseDatabasesResult> getEnterpriseDatabases(GetEnterpriseDatabasesArgs args, InvokeOptions options)
public static Output<GetEnterpriseDatabasesResult> getEnterpriseDatabases(GetEnterpriseDatabasesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dms/getEnterpriseDatabases:getEnterpriseDatabases
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id This property is required. Changes to this property will trigger replacement.
- The instance ID of the target database.
- Ids List<string>
- A list of Database IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter the results by the database Schema Name.
- Output
File 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.
- The instance ID of the target database.
- Ids []string
- A list of Database IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter the results by the database Schema Name.
- Output
File 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.
- The instance ID of the target database.
- ids List<String>
- A list of Database IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter the results by the database Schema Name.
- output
File 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.
- The instance ID of the target database.
- ids string[]
- A list of Database IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter the results by the database Schema Name.
- output
File 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.
- The instance ID of the target database.
- ids Sequence[str]
- A list of Database IDs.
- name_
regex Changes to this property will trigger replacement.
- 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
).
- instance
Id This property is required. Changes to this property will trigger replacement.
- The instance ID of the target database.
- ids List<String>
- A list of Database IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter the results by the database Schema Name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getEnterpriseDatabases Result
The following output properties are available:
- Databases
List<Pulumi.
Ali Cloud. Dms. Outputs. Get Enterprise Databases Database> - 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.
- Instance
Id string - The instance ID of the target database.
- Name
Regex string - Output
File string
- Databases
[]Get
Enterprise Databases Database - 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.
- Instance
Id string - The instance ID of the target database.
- Name
Regex string - Output
File string
- databases
List<Get
Enterprise Databases Database> - 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.
- instance
Id String - The instance ID of the target database.
- name
Regex String - output
File String
- databases
Get
Enterprise Databases Database[] - 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.
- instance
Id string - The instance ID of the target database.
- name
Regex string - output
File string
- databases
Sequence[Get
Enterprise Databases Database] - 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.
- instance
Id String - The instance ID of the target database.
- name
Regex String - output
File String
Supporting Types
GetEnterpriseDatabasesDatabase
- Catalog
Name This property is required. string - The name of the Database Directory.> PG Series databases will display the database name.
- Database
Id This property is required. string - The ID of the physical library.
- Db
Type This property is required. string - Database type.
- Dba
Id This property is required. string - The DBA user ID of the target database.
- Dba
Name This property is required. string - The DBA nickname of the target Library.
- Encoding
This property is required. string - Database encoding.
- Env
Type 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
. - Instance
Id This property is required. string - The instance ID of the target database.
- Owner
Id Lists This property is required. List<string> - Library Owner User ID list.
- Owner
Name Lists This property is required. List<string> - Library Owner nickname list.
- Port
This property is required. int - The connection port of the database.
- Schema
Name This property is required. string - The name of the database.> PG Series databases will display schema names.
- Search
Name 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. string - The name of the Database Directory.> PG Series databases will display the database name.
- Database
Id This property is required. string - The ID of the physical library.
- Db
Type This property is required. string - Database type.
- Dba
Id This property is required. string - The DBA user ID of the target database.
- Dba
Name This property is required. string - The DBA nickname of the target Library.
- Encoding
This property is required. string - Database encoding.
- Env
Type 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
. - Instance
Id This property is required. string - The instance ID of the target database.
- Owner
Id Lists This property is required. []string - Library Owner User ID list.
- Owner
Name Lists This property is required. []string - Library Owner nickname list.
- Port
This property is required. int - The connection port of the database.
- Schema
Name This property is required. string - The name of the database.> PG Series databases will display schema names.
- Search
Name 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. String - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id This property is required. String - The ID of the physical library.
- db
Type This property is required. String - Database type.
- dba
Id This property is required. String - The DBA user ID of the target database.
- dba
Name This property is required. String - The DBA nickname of the target Library.
- encoding
This property is required. String - Database encoding.
- env
Type 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
. - instance
Id This property is required. String - The instance ID of the target database.
- owner
Id Lists This property is required. List<String> - Library Owner User ID list.
- owner
Name Lists This property is required. List<String> - Library Owner nickname list.
- port
This property is required. Integer - The connection port of the database.
- schema
Name This property is required. String - The name of the database.> PG Series databases will display schema names.
- search
Name 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. string - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id This property is required. string - The ID of the physical library.
- db
Type This property is required. string - Database type.
- dba
Id This property is required. string - The DBA user ID of the target database.
- dba
Name This property is required. string - The DBA nickname of the target Library.
- encoding
This property is required. string - Database encoding.
- env
Type 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
. - instance
Id This property is required. string - The instance ID of the target database.
- owner
Id Lists This property is required. string[] - Library Owner User ID list.
- owner
Name Lists This property is required. string[] - Library Owner nickname list.
- port
This property is required. number - The connection port of the database.
- schema
Name This property is required. string - The name of the database.> PG Series databases will display schema names.
- search
Name 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
- catalog
Name This property is required. String - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id This property is required. String - The ID of the physical library.
- db
Type This property is required. String - Database type.
- dba
Id This property is required. String - The DBA user ID of the target database.
- dba
Name This property is required. String - The DBA nickname of the target Library.
- encoding
This property is required. String - Database encoding.
- env
Type 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
. - instance
Id This property is required. String - The instance ID of the target database.
- owner
Id Lists This property is required. List<String> - Library Owner User ID list.
- owner
Name Lists This property is required. List<String> - Library Owner nickname list.
- port
This property is required. Number - The connection port of the database.
- schema
Name This property is required. String - The name of the database.> PG Series databases will display schema names.
- search
Name 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.