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

alicloud.dts.getInstances

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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);
Copy
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)
Copy
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
})
}
Copy
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)),
    };
});
Copy
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());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:dts:getInstances
      arguments:
        ids:
          - ${defaultAlicloudDtsInstance.id}
        resourceGroupId: example_value
outputs:
  alicloudDtsInstanceExampleId: ${default.instances[0].id}
Copy

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>
Copy
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]
Copy
func GetInstances(ctx *Context, args *GetInstancesArgs, opts ...InvokeOption) (*GetInstancesResult, error)
func GetInstancesOutput(ctx *Context, args *GetInstancesOutputArgs, opts ...InvokeOption) GetInstancesResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
public static Output<GetInstancesResult> getInstances(GetInstancesArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:dts/getInstances:getInstances
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids List<string>
A list of Instance IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by trail name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
ResourceGroupId Changes to this property will trigger replacement. string
Resource Group ID
Ids []string
A list of Instance IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by trail name.
OutputFile string
File name where to save data source results (after running pulumi preview).
PageNumber int
PageSize int
ResourceGroupId Changes to this property will trigger replacement. string
Resource Group ID
ids List<String>
A list of Instance IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by trail name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Integer
pageSize Integer
resourceGroupId Changes to this property will trigger replacement. String
Resource Group ID
ids string[]
A list of Instance IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by trail name.
outputFile string
File name where to save data source results (after running pulumi preview).
pageNumber number
pageSize number
resourceGroupId Changes to this property will trigger replacement. string
Resource Group ID
ids Sequence[str]
A list of Instance IDs.
name_regex Changes to this property will trigger replacement. str
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. str
Resource Group ID
ids List<String>
A list of Instance IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by trail name.
outputFile String
File name where to save data source results (after running pulumi preview).
pageNumber Number
pageSize Number
resourceGroupId Changes to this property will trigger replacement. String
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.AliCloud.Dts.Outputs.GetInstancesInstance>
A list of Instance Entries. Each element contains the following attributes:
Names List<string>
A list of Instance names.
NameRegex string
OutputFile string
PageNumber int
PageSize int
ResourceGroupId string
Resource Group ID.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Instance IDs.
Instances []GetInstancesInstance
A list of Instance Entries. Each element contains the following attributes:
Names []string
A list of Instance names.
NameRegex string
OutputFile string
PageNumber int
PageSize int
ResourceGroupId string
Resource Group ID.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Instance IDs.
instances List<GetInstancesInstance>
A list of Instance Entries. Each element contains the following attributes:
names List<String>
A list of Instance names.
nameRegex String
outputFile String
pageNumber Integer
pageSize Integer
resourceGroupId String
Resource Group ID.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Instance IDs.
instances GetInstancesInstance[]
A list of Instance Entries. Each element contains the following attributes:
names string[]
A list of Instance names.
nameRegex string
outputFile string
pageNumber number
pageSize number
resourceGroupId string
Resource Group ID.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Instance IDs.
instances Sequence[GetInstancesInstance]
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_id str
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.
nameRegex String
outputFile String
pageNumber Number
pageSize Number
resourceGroupId String
Resource Group ID.

Supporting Types

GetInstancesInstance

CreateTime This property is required. string
Instance creation time
DestinationEndpointEngineName This property is required. string
The target database engine type.
DestinationRegion This property is required. string
The destination instance region.
DtsInstanceId This property is required. string
The ID of the subscription instance.
Id This property is required. string
The ID of the instance.
InstanceClass 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.
InstanceName This property is required. string
PaymentType This property is required. string
The payment type of the resource.
ResourceGroupId This property is required. string
Resource Group ID
SourceEndpointEngineName This property is required. string
Source instance database engine type.
SourceRegion 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.
Tags Dictionary<string, string>
The tag value corresponding to the tag key.
CreateTime This property is required. string
Instance creation time
DestinationEndpointEngineName This property is required. string
The target database engine type.
DestinationRegion This property is required. string
The destination instance region.
DtsInstanceId This property is required. string
The ID of the subscription instance.
Id This property is required. string
The ID of the instance.
InstanceClass 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.
InstanceName This property is required. string
PaymentType This property is required. string
The payment type of the resource.
ResourceGroupId This property is required. string
Resource Group ID
SourceEndpointEngineName This property is required. string
Source instance database engine type.
SourceRegion 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.
Tags map[string]string
The tag value corresponding to the tag key.
createTime This property is required. String
Instance creation time
destinationEndpointEngineName This property is required. String
The target database engine type.
destinationRegion This property is required. String
The destination instance region.
dtsInstanceId This property is required. String
The ID of the subscription instance.
id This property is required. String
The ID of the instance.
instanceClass 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.
instanceName This property is required. String
paymentType This property is required. String
The payment type of the resource.
resourceGroupId This property is required. String
Resource Group ID
sourceEndpointEngineName This property is required. String
Source instance database engine type.
sourceRegion 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.
tags Map<String,String>
The tag value corresponding to the tag key.
createTime This property is required. string
Instance creation time
destinationEndpointEngineName This property is required. string
The target database engine type.
destinationRegion This property is required. string
The destination instance region.
dtsInstanceId This property is required. string
The ID of the subscription instance.
id This property is required. string
The ID of the instance.
instanceClass 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.
instanceName This property is required. string
paymentType This property is required. string
The payment type of the resource.
resourceGroupId This property is required. string
Resource Group ID
sourceEndpointEngineName This property is required. string
Source instance database engine type.
sourceRegion 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.
tags {[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.
tags Mapping[str, str]
The tag value corresponding to the tag key.
createTime This property is required. String
Instance creation time
destinationEndpointEngineName This property is required. String
The target database engine type.
destinationRegion This property is required. String
The destination instance region.
dtsInstanceId This property is required. String
The ID of the subscription instance.
id This property is required. String
The ID of the instance.
instanceClass 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.
instanceName This property is required. String
paymentType This property is required. String
The payment type of the resource.
resourceGroupId This property is required. String
Resource Group ID
sourceEndpointEngineName This property is required. String
Source instance database engine type.
sourceRegion 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.
tags 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi