Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.dts.getInstances
Explore with Pulumi AI
This data source provides Dts Instance available to the user.What is Instance
NOTE: Available in 1.198.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.dts.getInstances({
ids: [defaultAlicloudDtsInstance.id],
resourceGroupId: "example_value",
});
export const alicloudDtsInstanceExampleId = _default.then(_default => _default.instances?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.dts.get_instances(ids=[default_alicloud_dts_instance["id"]],
resource_group_id="example_value")
pulumi.export("alicloudDtsInstanceExampleId", default.instances[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dts"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := dts.GetInstances(ctx, &dts.GetInstancesArgs{
Ids: interface{}{
defaultAlicloudDtsInstance.Id,
},
ResourceGroupId: pulumi.StringRef("example_value"),
}, nil);
if err != nil {
return err
}
ctx.Export("alicloudDtsInstanceExampleId", _default.Instances[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.Dts.GetInstances.Invoke(new()
{
Ids = new[]
{
defaultAlicloudDtsInstance.Id,
},
ResourceGroupId = "example_value",
});
return new Dictionary<string, object?>
{
["alicloudDtsInstanceExampleId"] = @default.Apply(@default => @default.Apply(getInstancesResult => getInstancesResult.Instances[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dts.DtsFunctions;
import com.pulumi.alicloud.dts.inputs.GetInstancesArgs;
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 = DtsFunctions.getInstances(GetInstancesArgs.builder()
.ids(defaultAlicloudDtsInstance.id())
.resourceGroupId("example_value")
.build());
ctx.export("alicloudDtsInstanceExampleId", default_.instances()[0].id());
}
}
variables:
default:
fn::invoke:
function: alicloud:dts:getInstances
arguments:
ids:
- ${defaultAlicloudDtsInstance.id}
resourceGroupId: example_value
outputs:
alicloudDtsInstanceExampleId: ${default.instances[0].id}
Using getInstances
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 getInstances(args: GetInstancesArgs, opts?: InvokeOptions): Promise<GetInstancesResult>
function getInstancesOutput(args: GetInstancesOutputArgs, opts?: InvokeOptions): Output<GetInstancesResult>
def get_instances(ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
page_number: Optional[int] = None,
page_size: Optional[int] = None,
resource_group_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetInstancesResult
def get_instances_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
page_number: Optional[pulumi.Input[int]] = None,
page_size: Optional[pulumi.Input[int]] = None,
resource_group_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetInstancesResult]
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput
> Note: This function is named GetInstances
in the Go SDK.
public static class GetInstances
{
public static Task<GetInstancesResult> InvokeAsync(GetInstancesArgs args, InvokeOptions? opts = null)
public static Output<GetInstancesResult> Invoke(GetInstancesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
public static Output<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dts/getInstances:getInstances
arguments:
# arguments dictionary
The following arguments are supported:
- Ids List<string>
- A list of Instance IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Resource
Group Id Changes to this property will trigger replacement.
- Resource Group ID
- Ids []string
- A list of Instance IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size int - Resource
Group Id Changes to this property will trigger replacement.
- Resource Group ID
- ids List<String>
- A list of Instance IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer - resource
Group Id Changes to this property will trigger replacement.
- Resource Group ID
- ids string[]
- A list of Instance IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number - resource
Group Id Changes to this property will trigger replacement.
- Resource Group ID
- ids Sequence[str]
- A list of Instance IDs.
- name_
regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- output_
file str - File name where to save data source results (after running
pulumi preview
). - page_
number int - page_
size int - resource_
group_ id Changes to this property will trigger replacement.
- Resource Group ID
- ids List<String>
- A list of Instance IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by trail name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number - resource
Group Id Changes to this property will trigger replacement.
- Resource Group ID
getInstances Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Instance IDs.
- Instances
List<Pulumi.
Ali Cloud. Dts. Outputs. Get Instances Instance> - A list of Instance Entries. Each element contains the following attributes:
- Names List<string>
- A list of Instance names.
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Resource
Group stringId - Resource Group ID.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Instance IDs.
- Instances
[]Get
Instances Instance - A list of Instance Entries. Each element contains the following attributes:
- Names []string
- A list of Instance names.
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Resource
Group stringId - Resource Group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Instance IDs.
- instances
List<Get
Instances Instance> - A list of Instance Entries. Each element contains the following attributes:
- names List<String>
- A list of Instance names.
- name
Regex String - output
File String - page
Number Integer - page
Size Integer - resource
Group StringId - Resource Group ID.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Instance IDs.
- instances
Get
Instances Instance[] - A list of Instance Entries. Each element contains the following attributes:
- names string[]
- A list of Instance names.
- name
Regex string - output
File string - page
Number number - page
Size number - resource
Group stringId - Resource Group ID.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Instance IDs.
- instances
Sequence[Get
Instances Instance] - A list of Instance Entries. Each element contains the following attributes:
- names Sequence[str]
- A list of Instance names.
- name_
regex str - output_
file str - page_
number int - page_
size int - resource_
group_ strid - Resource Group ID.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Instance IDs.
- instances List<Property Map>
- A list of Instance Entries. Each element contains the following attributes:
- names List<String>
- A list of Instance names.
- name
Regex String - output
File String - page
Number Number - page
Size Number - resource
Group StringId - Resource Group ID.
Supporting Types
GetInstancesInstance
- Create
Time This property is required. string - Instance creation time
- Destination
Endpoint Engine Name This property is required. string - The target database engine type.
- Destination
Region This property is required. string - The destination instance region.
- Dts
Instance Id This property is required. string - The ID of the subscription instance.
- Id
This property is required. string - The ID of the instance.
- Instance
Class This property is required. string - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- Instance
Name This property is required. string - Payment
Type This property is required. string - The payment type of the resource.
- Resource
Group Id This property is required. string - Resource Group ID
- Source
Endpoint Engine Name This property is required. string - Source instance database engine type.
- Source
Region This property is required. string - The source instance region.
- Status
This property is required. string - Instance status.
- Type
This property is required. string - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- Dictionary<string, string>
- The tag value corresponding to the tag key.
- Create
Time This property is required. string - Instance creation time
- Destination
Endpoint Engine Name This property is required. string - The target database engine type.
- Destination
Region This property is required. string - The destination instance region.
- Dts
Instance Id This property is required. string - The ID of the subscription instance.
- Id
This property is required. string - The ID of the instance.
- Instance
Class This property is required. string - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- Instance
Name This property is required. string - Payment
Type This property is required. string - The payment type of the resource.
- Resource
Group Id This property is required. string - Resource Group ID
- Source
Endpoint Engine Name This property is required. string - Source instance database engine type.
- Source
Region This property is required. string - The source instance region.
- Status
This property is required. string - Instance status.
- Type
This property is required. string - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- map[string]string
- The tag value corresponding to the tag key.
- create
Time This property is required. String - Instance creation time
- destination
Endpoint Engine Name This property is required. String - The target database engine type.
- destination
Region This property is required. String - The destination instance region.
- dts
Instance Id This property is required. String - The ID of the subscription instance.
- id
This property is required. String - The ID of the instance.
- instance
Class This property is required. String - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- instance
Name This property is required. String - payment
Type This property is required. String - The payment type of the resource.
- resource
Group Id This property is required. String - Resource Group ID
- source
Endpoint Engine Name This property is required. String - Source instance database engine type.
- source
Region This property is required. String - The source instance region.
- status
This property is required. String - Instance status.
- type
This property is required. String - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- Map<String,String>
- The tag value corresponding to the tag key.
- create
Time This property is required. string - Instance creation time
- destination
Endpoint Engine Name This property is required. string - The target database engine type.
- destination
Region This property is required. string - The destination instance region.
- dts
Instance Id This property is required. string - The ID of the subscription instance.
- id
This property is required. string - The ID of the instance.
- instance
Class This property is required. string - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- instance
Name This property is required. string - payment
Type This property is required. string - The payment type of the resource.
- resource
Group Id This property is required. string - Resource Group ID
- source
Endpoint Engine Name This property is required. string - Source instance database engine type.
- source
Region This property is required. string - The source instance region.
- status
This property is required. string - Instance status.
- type
This property is required. string - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- {[key: string]: string}
- The tag value corresponding to the tag key.
- create_
time This property is required. str - Instance creation time
- destination_
endpoint_ engine_ name This property is required. str - The target database engine type.
- destination_
region This property is required. str - The destination instance region.
- dts_
instance_ id This property is required. str - The ID of the subscription instance.
- id
This property is required. str - The ID of the instance.
- instance_
class This property is required. str - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- instance_
name This property is required. str - payment_
type This property is required. str - The payment type of the resource.
- resource_
group_ id This property is required. str - Resource Group ID
- source_
endpoint_ engine_ name This property is required. str - Source instance database engine type.
- source_
region This property is required. str - The source instance region.
- status
This property is required. str - Instance status.
- type
This property is required. str - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- Mapping[str, str]
- The tag value corresponding to the tag key.
- create
Time This property is required. String - Instance creation time
- destination
Endpoint Engine Name This property is required. String - The target database engine type.
- destination
Region This property is required. String - The destination instance region.
- dts
Instance Id This property is required. String - The ID of the subscription instance.
- id
This property is required. String - The ID of the instance.
- instance
Class This property is required. String - The type of the migration or synchronization instance.- The specifications of the migration instance: xxlarge, xlarge, large, medium, small.- The types of synchronization instances: large, medium, small, micro.
- instance
Name This property is required. String - payment
Type This property is required. String - The payment type of the resource.
- resource
Group Id This property is required. String - Resource Group ID
- source
Endpoint Engine Name This property is required. String - Source instance database engine type.
- source
Region This property is required. String - The source instance region.
- status
This property is required. String - Instance status.
- type
This property is required. String - The instance type. Valid values: -MIGRATION: MIGRATION.-SYNC: synchronization.-SUBSCRIBE: SUBSCRIBE.
- Map<String>
- The tag value corresponding to the tag key.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.