Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dms/getEnterpriseDatabases:getEnterpriseDatabases
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - The instance ID of the target database.
- Ids List<string>
- A list of Database IDs.
- Name
Regex string - 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 string - The instance ID of the target database.
- Ids []string
- A list of Database IDs.
- Name
Regex string - 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 String - The instance ID of the target database.
- ids List<String>
- A list of Database IDs.
- name
Regex String - 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 string - The instance ID of the target database.
- ids string[]
- A list of Database IDs.
- name
Regex string - 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 str - The instance ID of the target database.
- ids Sequence[str]
- A list of Database IDs.
- name_
regex 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
).
- instance
Id String - The instance ID of the target database.
- ids List<String>
- A list of Database IDs.
- name
Regex String - 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 string - The name of the Database Directory.> PG Series databases will display the database name.
- Database
Id string - The ID of the physical library.
- Db
Type string - Database type.
- Dba
Id string - The DBA user ID of the target database.
- Dba
Name string - The DBA nickname of the target Library.
- Encoding string
- Database encoding.
- Env
Type string - The environment type of the database.
- Host string
- The database connection address.
- Id string
- The Database ID, same value as
database_id
. - Instance
Id string - The instance ID of the target database.
- Owner
Id List<string>Lists - Library Owner User ID list.
- Owner
Name List<string>Lists - Library Owner nickname list.
- Port int
- The connection port of the database.
- Schema
Name string - The name of the database.> PG Series databases will display schema names.
- Search
Name string - Library search name.
- Sid string
- Database SID.> only Oracle Database Display.
- State string
- Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
- Catalog
Name string - The name of the Database Directory.> PG Series databases will display the database name.
- Database
Id string - The ID of the physical library.
- Db
Type string - Database type.
- Dba
Id string - The DBA user ID of the target database.
- Dba
Name string - The DBA nickname of the target Library.
- Encoding string
- Database encoding.
- Env
Type string - The environment type of the database.
- Host string
- The database connection address.
- Id string
- The Database ID, same value as
database_id
. - Instance
Id string - The instance ID of the target database.
- Owner
Id []stringLists - Library Owner User ID list.
- Owner
Name []stringLists - Library Owner nickname list.
- Port int
- The connection port of the database.
- Schema
Name string - The name of the database.> PG Series databases will display schema names.
- Search
Name string - Library search name.
- Sid string
- Database SID.> only Oracle Database Display.
- State string
- Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
- catalog
Name String - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id String - The ID of the physical library.
- db
Type String - Database type.
- dba
Id String - The DBA user ID of the target database.
- dba
Name String - The DBA nickname of the target Library.
- encoding String
- Database encoding.
- env
Type String - The environment type of the database.
- host String
- The database connection address.
- id String
- The Database ID, same value as
database_id
. - instance
Id String - The instance ID of the target database.
- owner
Id List<String>Lists - Library Owner User ID list.
- owner
Name List<String>Lists - Library Owner nickname list.
- port Integer
- The connection port of the database.
- schema
Name String - The name of the database.> PG Series databases will display schema names.
- search
Name String - Library search name.
- sid String
- Database SID.> only Oracle Database Display.
- state String
- Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
- catalog
Name string - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id string - The ID of the physical library.
- db
Type string - Database type.
- dba
Id string - The DBA user ID of the target database.
- dba
Name string - The DBA nickname of the target Library.
- encoding string
- Database encoding.
- env
Type string - The environment type of the database.
- host string
- The database connection address.
- id string
- The Database ID, same value as
database_id
. - instance
Id string - The instance ID of the target database.
- owner
Id string[]Lists - Library Owner User ID list.
- owner
Name string[]Lists - Library Owner nickname list.
- port number
- The connection port of the database.
- schema
Name string - The name of the database.> PG Series databases will display schema names.
- search
Name string - Library search name.
- sid string
- Database SID.> only Oracle Database Display.
- state string
- Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
- catalog_
name str - The name of the Database Directory.> PG Series databases will display the database name.
- database_
id str - The ID of the physical library.
- db_
type str - Database type.
- dba_
id str - The DBA user ID of the target database.
- dba_
name str - The DBA nickname of the target Library.
- encoding str
- Database encoding.
- env_
type str - The environment type of the database.
- host str
- The database connection address.
- id str
- The Database ID, same value as
database_id
. - instance_
id str - The instance ID of the target database.
- owner_
id_ Sequence[str]lists - Library Owner User ID list.
- owner_
name_ Sequence[str]lists - Library Owner nickname list.
- port int
- The connection port of the database.
- schema_
name str - The name of the database.> PG Series databases will display schema names.
- search_
name str - Library search name.
- sid str
- Database SID.> only Oracle Database Display.
- state str
- Library status, value description:-NORMAL: NORMAL-DISABLE: Disabled-OFFLINE: OFFLINE-NOT_EXIST: does not exist
- catalog
Name String - The name of the Database Directory.> PG Series databases will display the database name.
- database
Id String - The ID of the physical library.
- db
Type String - Database type.
- dba
Id String - The DBA user ID of the target database.
- dba
Name String - The DBA nickname of the target Library.
- encoding String
- Database encoding.
- env
Type String - The environment type of the database.
- host String
- The database connection address.
- id String
- The Database ID, same value as
database_id
. - instance
Id String - The instance ID of the target database.
- owner
Id List<String>Lists - Library Owner User ID list.
- owner
Name List<String>Lists - Library Owner nickname list.
- port Number
- The connection port of the database.
- schema
Name String - The name of the database.> PG Series databases will display schema names.
- search
Name String - Library search name.
- sid String
- Database SID.> only Oracle Database Display.
- state 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.