Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.dms.getEnterpriseInstances
Explore with Pulumi AI
This data source provides a list of DMS Enterprise Instances in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.88.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
// Declare the data source
const dmsEnterpriseInstancesDs = alicloud.dms.getEnterpriseInstances({
netType: "CLASSIC",
instanceType: "mysql",
envType: "test",
nameRegex: "tf_testAcc",
outputFile: "dms_enterprise_instances.json",
});
export const firstDatabaseInstanceId = dmsEnterpriseInstancesDs.then(dmsEnterpriseInstancesDs => dmsEnterpriseInstancesDs.instances?.[0]?.instanceId);
import pulumi
import pulumi_alicloud as alicloud
# Declare the data source
dms_enterprise_instances_ds = alicloud.dms.get_enterprise_instances(net_type="CLASSIC",
instance_type="mysql",
env_type="test",
name_regex="tf_testAcc",
output_file="dms_enterprise_instances.json")
pulumi.export("firstDatabaseInstanceId", dms_enterprise_instances_ds.instances[0].instance_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 {
// Declare the data source
dmsEnterpriseInstancesDs, err := dms.GetEnterpriseInstances(ctx, &dms.GetEnterpriseInstancesArgs{
NetType: pulumi.StringRef("CLASSIC"),
InstanceType: pulumi.StringRef("mysql"),
EnvType: pulumi.StringRef("test"),
NameRegex: pulumi.StringRef("tf_testAcc"),
OutputFile: pulumi.StringRef("dms_enterprise_instances.json"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstDatabaseInstanceId", dmsEnterpriseInstancesDs.Instances[0].InstanceId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
// Declare the data source
var dmsEnterpriseInstancesDs = AliCloud.Dms.GetEnterpriseInstances.Invoke(new()
{
NetType = "CLASSIC",
InstanceType = "mysql",
EnvType = "test",
NameRegex = "tf_testAcc",
OutputFile = "dms_enterprise_instances.json",
});
return new Dictionary<string, object?>
{
["firstDatabaseInstanceId"] = dmsEnterpriseInstancesDs.Apply(getEnterpriseInstancesResult => getEnterpriseInstancesResult.Instances[0]?.InstanceId),
};
});
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.GetEnterpriseInstancesArgs;
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) {
// Declare the data source
final var dmsEnterpriseInstancesDs = DmsFunctions.getEnterpriseInstances(GetEnterpriseInstancesArgs.builder()
.netType("CLASSIC")
.instanceType("mysql")
.envType("test")
.nameRegex("tf_testAcc")
.outputFile("dms_enterprise_instances.json")
.build());
ctx.export("firstDatabaseInstanceId", dmsEnterpriseInstancesDs.applyValue(getEnterpriseInstancesResult -> getEnterpriseInstancesResult.instances()[0].instanceId()));
}
}
variables:
# Declare the data source
dmsEnterpriseInstancesDs:
fn::invoke:
Function: alicloud:dms:getEnterpriseInstances
Arguments:
netType: CLASSIC
instanceType: mysql
envType: test
nameRegex: tf_testAcc
outputFile: dms_enterprise_instances.json
outputs:
firstDatabaseInstanceId: ${dmsEnterpriseInstancesDs.instances[0].instanceId}
Using getEnterpriseInstances
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 getEnterpriseInstances(args: GetEnterpriseInstancesArgs, opts?: InvokeOptions): Promise<GetEnterpriseInstancesResult>
function getEnterpriseInstancesOutput(args: GetEnterpriseInstancesOutputArgs, opts?: InvokeOptions): Output<GetEnterpriseInstancesResult>
def get_enterprise_instances(env_type: Optional[str] = None,
instance_alias_regex: Optional[str] = None,
instance_source: Optional[str] = None,
instance_type: Optional[str] = None,
name_regex: Optional[str] = None,
net_type: Optional[str] = None,
output_file: Optional[str] = None,
search_key: Optional[str] = None,
status: Optional[str] = None,
tid: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetEnterpriseInstancesResult
def get_enterprise_instances_output(env_type: Optional[pulumi.Input[str]] = None,
instance_alias_regex: Optional[pulumi.Input[str]] = None,
instance_source: Optional[pulumi.Input[str]] = None,
instance_type: Optional[pulumi.Input[str]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
net_type: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
search_key: Optional[pulumi.Input[str]] = None,
status: Optional[pulumi.Input[str]] = None,
tid: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnterpriseInstancesResult]
func GetEnterpriseInstances(ctx *Context, args *GetEnterpriseInstancesArgs, opts ...InvokeOption) (*GetEnterpriseInstancesResult, error)
func GetEnterpriseInstancesOutput(ctx *Context, args *GetEnterpriseInstancesOutputArgs, opts ...InvokeOption) GetEnterpriseInstancesResultOutput
> Note: This function is named GetEnterpriseInstances
in the Go SDK.
public static class GetEnterpriseInstances
{
public static Task<GetEnterpriseInstancesResult> InvokeAsync(GetEnterpriseInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetEnterpriseInstancesResult> Invoke(GetEnterpriseInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetEnterpriseInstancesResult> getEnterpriseInstances(GetEnterpriseInstancesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:dms/getEnterpriseInstances:getEnterpriseInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Env
Type string - The type of the environment to which the database instance belongs.
- Instance
Alias stringRegex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- Instance
Source string - The source of the database instance.
- Instance
Type string - The ID of the database instance.
- Name
Regex string - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- Net
Type string - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Search
Key string - The keyword used to query database instances.
- Status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - Tid int
- The ID of the tenant in Data Management (DMS) Enterprise.
- Env
Type string - The type of the environment to which the database instance belongs.
- Instance
Alias stringRegex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- Instance
Source string - The source of the database instance.
- Instance
Type string - The ID of the database instance.
- Name
Regex string - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- Net
Type string - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Search
Key string - The keyword used to query database instances.
- Status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - Tid int
- The ID of the tenant in Data Management (DMS) Enterprise.
- env
Type String - The type of the environment to which the database instance belongs.
- instance
Alias StringRegex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- instance
Source String - The source of the database instance.
- instance
Type String - The ID of the database instance.
- name
Regex String - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- net
Type String - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- output
File String - File name where to save data source results (after running
pulumi preview
). - search
Key String - The keyword used to query database instances.
- status String
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - tid Integer
- The ID of the tenant in Data Management (DMS) Enterprise.
- env
Type string - The type of the environment to which the database instance belongs.
- instance
Alias stringRegex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- instance
Source string - The source of the database instance.
- instance
Type string - The ID of the database instance.
- name
Regex string - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- net
Type string - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- output
File string - File name where to save data source results (after running
pulumi preview
). - search
Key string - The keyword used to query database instances.
- status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - tid number
- The ID of the tenant in Data Management (DMS) Enterprise.
- env_
type str - The type of the environment to which the database instance belongs.
- instance_
alias_ strregex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- instance_
source str - The source of the database instance.
- instance_
type str - The ID of the database instance.
- name_
regex str - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- net_
type str - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - search_
key str - The keyword used to query database instances.
- status str
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - tid int
- The ID of the tenant in Data Management (DMS) Enterprise.
- env
Type String - The type of the environment to which the database instance belongs.
- instance
Alias StringRegex - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- instance
Source String - The source of the database instance.
- instance
Type String - The ID of the database instance.
- name
Regex String - A regex string to filter the results by the DMS Enterprise Instance instance_alias.
- net
Type String - The network type of the database instance. Valid values: CLASSIC and VPC. For more information about the valid values, see the description of the RegisterInstance operation.
- output
File String - File name where to save data source results (after running
pulumi preview
). - search
Key String - The keyword used to query database instances.
- status String
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - tid Number
- The ID of the tenant in Data Management (DMS) Enterprise.
getEnterpriseInstances Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- Instances
List<Pulumi.
Ali Cloud. Dms. Outputs. Get Enterprise Instances Instance> - A list of KMS keys. Each element contains the following attributes:
- Names List<string>
- A list of DMS Enterprise names.
- Env
Type string - The type of the environment to which the database instance belongs..
- Instance
Alias stringRegex - Instance
Source string - The ID of the database instance.
- Instance
Type string - The ID of the database instance.
- Name
Regex string - Net
Type string - Output
File string - Search
Key string - Status string
- The status of the database instance.
- Tid int
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- Instances
[]Get
Enterprise Instances Instance - A list of KMS keys. Each element contains the following attributes:
- Names []string
- A list of DMS Enterprise names.
- Env
Type string - The type of the environment to which the database instance belongs..
- Instance
Alias stringRegex - Instance
Source string - The ID of the database instance.
- Instance
Type string - The ID of the database instance.
- Name
Regex string - Net
Type string - Output
File string - Search
Key string - Status string
- The status of the database instance.
- Tid int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- instances
List<Get
Enterprise Instances Instance> - A list of KMS keys. Each element contains the following attributes:
- names List<String>
- A list of DMS Enterprise names.
- env
Type String - The type of the environment to which the database instance belongs..
- instance
Alias StringRegex - instance
Source String - The ID of the database instance.
- instance
Type String - The ID of the database instance.
- name
Regex String - net
Type String - output
File String - search
Key String - status String
- The status of the database instance.
- tid Integer
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- instances
Get
Enterprise Instances Instance[] - A list of KMS keys. Each element contains the following attributes:
- names string[]
- A list of DMS Enterprise names.
- env
Type string - The type of the environment to which the database instance belongs..
- instance
Alias stringRegex - instance
Source string - The ID of the database instance.
- instance
Type string - The ID of the database instance.
- name
Regex string - net
Type string - output
File string - search
Key string - status string
- The status of the database instance.
- tid number
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- instances
Sequence[Get
Enterprise Instances Instance] - A list of KMS keys. Each element contains the following attributes:
- names Sequence[str]
- A list of DMS Enterprise names.
- env_
type str - The type of the environment to which the database instance belongs..
- instance_
alias_ strregex - instance_
source str - The ID of the database instance.
- instance_
type str - The ID of the database instance.
- name_
regex str - net_
type str - output_
file str - search_
key str - status str
- The status of the database instance.
- tid int
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of DMS Enterprise IDs (Each of them consists of host:port).
- instances List<Property Map>
- A list of KMS keys. Each element contains the following attributes:
- names List<String>
- A list of DMS Enterprise names.
- env
Type String - The type of the environment to which the database instance belongs..
- instance
Alias StringRegex - instance
Source String - The ID of the database instance.
- instance
Type String - The ID of the database instance.
- name
Regex String - net
Type String - output
File String - search
Key String - status String
- The status of the database instance.
- tid Number
Supporting Types
GetEnterpriseInstancesInstance
- Data
Link stringName - The name of the data link for the database instance.
- Database
Password string - The logon password of the database instance.
- Database
User string - The logon username of the database instance.
- Dba
Id string - The ID of the database administrator (DBA) of the database instance.
- Dba
Nick stringName - The nickname of the DBA.
- Ddl
Online int - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- Ecs
Instance stringId - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- Ecs
Region string - The region where the database instance resides.
- Env
Type string - The type of the environment to which the database instance belongs.
- Export
Timeout int - The timeout period for exporting the database instance.
- Host string
- The endpoint of the database instance.
- Id string
- Instance
Alias string - The alias of the database instance.
- Instance
Id string - The ID of the database instance.
- Instance
Name string - Instance
Source string - The source of the database instance.
- Instance
Type string - The ID of the database instance.
- Port int
- The connection port of the database instance.
- Query
Timeout int - The timeout period for querying the database instance.
- Safe
Rule stringId - The ID of the security rule for the database instance.
- Sid string
- The system ID (SID) of the database instance.
- Status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - Use
Dsql int - Indicates whether cross-database query was enabled for the database instance.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
- Data
Link stringName - The name of the data link for the database instance.
- Database
Password string - The logon password of the database instance.
- Database
User string - The logon username of the database instance.
- Dba
Id string - The ID of the database administrator (DBA) of the database instance.
- Dba
Nick stringName - The nickname of the DBA.
- Ddl
Online int - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- Ecs
Instance stringId - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- Ecs
Region string - The region where the database instance resides.
- Env
Type string - The type of the environment to which the database instance belongs.
- Export
Timeout int - The timeout period for exporting the database instance.
- Host string
- The endpoint of the database instance.
- Id string
- Instance
Alias string - The alias of the database instance.
- Instance
Id string - The ID of the database instance.
- Instance
Name string - Instance
Source string - The source of the database instance.
- Instance
Type string - The ID of the database instance.
- Port int
- The connection port of the database instance.
- Query
Timeout int - The timeout period for querying the database instance.
- Safe
Rule stringId - The ID of the security rule for the database instance.
- Sid string
- The system ID (SID) of the database instance.
- Status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - Use
Dsql int - Indicates whether cross-database query was enabled for the database instance.
- Vpc
Id string - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
- data
Link StringName - The name of the data link for the database instance.
- database
Password String - The logon password of the database instance.
- database
User String - The logon username of the database instance.
- dba
Id String - The ID of the database administrator (DBA) of the database instance.
- dba
Nick StringName - The nickname of the DBA.
- ddl
Online Integer - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- ecs
Instance StringId - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- ecs
Region String - The region where the database instance resides.
- env
Type String - The type of the environment to which the database instance belongs.
- export
Timeout Integer - The timeout period for exporting the database instance.
- host String
- The endpoint of the database instance.
- id String
- instance
Alias String - The alias of the database instance.
- instance
Id String - The ID of the database instance.
- instance
Name String - instance
Source String - The source of the database instance.
- instance
Type String - The ID of the database instance.
- port Integer
- The connection port of the database instance.
- query
Timeout Integer - The timeout period for querying the database instance.
- safe
Rule StringId - The ID of the security rule for the database instance.
- sid String
- The system ID (SID) of the database instance.
- status String
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - use
Dsql Integer - Indicates whether cross-database query was enabled for the database instance.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
- data
Link stringName - The name of the data link for the database instance.
- database
Password string - The logon password of the database instance.
- database
User string - The logon username of the database instance.
- dba
Id string - The ID of the database administrator (DBA) of the database instance.
- dba
Nick stringName - The nickname of the DBA.
- ddl
Online number - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- ecs
Instance stringId - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- ecs
Region string - The region where the database instance resides.
- env
Type string - The type of the environment to which the database instance belongs.
- export
Timeout number - The timeout period for exporting the database instance.
- host string
- The endpoint of the database instance.
- id string
- instance
Alias string - The alias of the database instance.
- instance
Id string - The ID of the database instance.
- instance
Name string - instance
Source string - The source of the database instance.
- instance
Type string - The ID of the database instance.
- port number
- The connection port of the database instance.
- query
Timeout number - The timeout period for querying the database instance.
- safe
Rule stringId - The ID of the security rule for the database instance.
- sid string
- The system ID (SID) of the database instance.
- status string
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - use
Dsql number - Indicates whether cross-database query was enabled for the database instance.
- vpc
Id string - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
- data_
link_ strname - The name of the data link for the database instance.
- database_
password str - The logon password of the database instance.
- database_
user str - The logon username of the database instance.
- dba_
id str - The ID of the database administrator (DBA) of the database instance.
- dba_
nick_ strname - The nickname of the DBA.
- ddl_
online int - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- ecs_
instance_ strid - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- ecs_
region str - The region where the database instance resides.
- env_
type str - The type of the environment to which the database instance belongs.
- export_
timeout int - The timeout period for exporting the database instance.
- host str
- The endpoint of the database instance.
- id str
- instance_
alias str - The alias of the database instance.
- instance_
id str - The ID of the database instance.
- instance_
name str - instance_
source str - The source of the database instance.
- instance_
type str - The ID of the database instance.
- port int
- The connection port of the database instance.
- query_
timeout int - The timeout period for querying the database instance.
- safe_
rule_ strid - The ID of the security rule for the database instance.
- sid str
- The system ID (SID) of the database instance.
- status str
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - use_
dsql int - Indicates whether cross-database query was enabled for the database instance.
- vpc_
id str - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
- data
Link StringName - The name of the data link for the database instance.
- database
Password String - The logon password of the database instance.
- database
User String - The logon username of the database instance.
- dba
Id String - The ID of the database administrator (DBA) of the database instance.
- dba
Nick StringName - The nickname of the DBA.
- ddl
Online Number - Indicates whether the online data description language (DDL) service was enabled for the database instance.
- ecs
Instance StringId - The ID of the Elastic Compute Service (ECS) instance to which the database instance belongs.
- ecs
Region String - The region where the database instance resides.
- env
Type String - The type of the environment to which the database instance belongs.
- export
Timeout Number - The timeout period for exporting the database instance.
- host String
- The endpoint of the database instance.
- id String
- instance
Alias String - The alias of the database instance.
- instance
Id String - The ID of the database instance.
- instance
Name String - instance
Source String - The source of the database instance.
- instance
Type String - The ID of the database instance.
- port Number
- The connection port of the database instance.
- query
Timeout Number - The timeout period for querying the database instance.
- safe
Rule StringId - The ID of the security rule for the database instance.
- sid String
- The system ID (SID) of the database instance.
- status String
- Filter the results by status of the DMS Enterprise Instances. Valid values:
NORMAL
,UNAVAILABLE
,UNKNOWN
,DELETED
,DISABLE
. - use
Dsql Number - Indicates whether cross-database query was enabled for the database instance.
- vpc
Id String - The ID of the Virtual Private Cloud (VPC) to which the database instance belongs.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.