Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.dts.getMigrationJobs
This data source provides the Dts Migration Jobs of the current Alibaba Cloud user.
NOTE: Available in v1.157.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.dts.getMigrationJobs({
    ids: ["dts_job_id"],
});
export const dtsMigrationJobId1 = ids.then(ids => ids.jobs?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.dts.get_migration_jobs(ids=["dts_job_id"])
pulumi.export("dtsMigrationJobId1", ids.jobs[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 {
		ids, err := dts.GetMigrationJobs(ctx, &dts.GetMigrationJobsArgs{
			Ids: []string{
				"dts_job_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("dtsMigrationJobId1", ids.Jobs[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Dts.GetMigrationJobs.Invoke(new()
    {
        Ids = new[]
        {
            "dts_job_id",
        },
    });
    return new Dictionary<string, object?>
    {
        ["dtsMigrationJobId1"] = ids.Apply(getMigrationJobsResult => getMigrationJobsResult.Jobs[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.GetMigrationJobsArgs;
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 ids = DtsFunctions.getMigrationJobs(GetMigrationJobsArgs.builder()
            .ids("dts_job_id")
            .build());
        ctx.export("dtsMigrationJobId1", ids.jobs()[0].id());
    }
}
variables:
  ids:
    fn::invoke:
      function: alicloud:dts:getMigrationJobs
      arguments:
        ids:
          - dts_job_id
outputs:
  dtsMigrationJobId1: ${ids.jobs[0].id}
Using getMigrationJobs
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 getMigrationJobs(args: GetMigrationJobsArgs, opts?: InvokeOptions): Promise<GetMigrationJobsResult>
function getMigrationJobsOutput(args: GetMigrationJobsOutputArgs, opts?: InvokeOptions): Output<GetMigrationJobsResult>def get_migration_jobs(enable_details: Optional[bool] = None,
                       ids: Optional[Sequence[str]] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetMigrationJobsResult
def get_migration_jobs_output(enable_details: Optional[pulumi.Input[bool]] = None,
                       ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetMigrationJobsResult]func GetMigrationJobs(ctx *Context, args *GetMigrationJobsArgs, opts ...InvokeOption) (*GetMigrationJobsResult, error)
func GetMigrationJobsOutput(ctx *Context, args *GetMigrationJobsOutputArgs, opts ...InvokeOption) GetMigrationJobsResultOutput> Note: This function is named GetMigrationJobs in the Go SDK.
public static class GetMigrationJobs 
{
    public static Task<GetMigrationJobsResult> InvokeAsync(GetMigrationJobsArgs args, InvokeOptions? opts = null)
    public static Output<GetMigrationJobsResult> Invoke(GetMigrationJobsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMigrationJobsResult> getMigrationJobs(GetMigrationJobsArgs args, InvokeOptions options)
public static Output<GetMigrationJobsResult> getMigrationJobs(GetMigrationJobsArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:dts/getMigrationJobs:getMigrationJobs
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- Ids List<string>
- A list of Synchronization Job IDs.
- NameRegex string
- A regex string to filter results by Migration Job name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- Ids []string
- A list of Synchronization Job IDs.
- NameRegex string
- A regex string to filter results by Migration Job name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids List<String>
- A list of Synchronization Job IDs.
- nameRegex String
- A regex string to filter results by Migration Job name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- enableDetails boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids string[]
- A list of Synchronization Job IDs.
- nameRegex string
- A regex string to filter results by Migration Job name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- enable_details bool
- Default to false. Set it totruecan output more details about resource attributes.
- ids Sequence[str]
- A list of Synchronization Job IDs.
- name_regex str
- A regex string to filter results by Migration Job name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- ids List<String>
- A list of Synchronization Job IDs.
- nameRegex String
- A regex string to filter results by Migration Job name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
getMigrationJobs Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Jobs
List<Pulumi.Ali Cloud. Dts. Outputs. Get Migration Jobs Job> 
- Names List<string>
- EnableDetails bool
- NameRegex string
- OutputFile string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Jobs
[]GetMigration Jobs Job 
- Names []string
- EnableDetails bool
- NameRegex string
- OutputFile string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- jobs
List<GetMigration Jobs Job> 
- names List<String>
- enableDetails Boolean
- nameRegex String
- outputFile String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- jobs
GetMigration Jobs Job[] 
- names string[]
- enableDetails boolean
- nameRegex string
- outputFile string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- jobs
Sequence[GetMigration Jobs Job] 
- names Sequence[str]
- enable_details bool
- name_regex str
- output_file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- jobs List<Property Map>
- names List<String>
- enableDetails Boolean
- nameRegex String
- outputFile String
Supporting Types
GetMigrationJobsJob   
- DataInitialization bool
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- DataSynchronization bool
- Whether to perform incremental data migration for migration types or synchronization values include:
- DbList string
- The Migration object, in the format of JSON strings.
- DestinationEndpoint stringData Base Name 
- The name of migrate the database.
- DestinationEndpoint stringEngine Name 
- The type of destination database.
- DestinationEndpoint stringInstance Id 
- The ID of destination instance.
- DestinationEndpoint stringInstance Type 
- The type of destination instance.
- DestinationEndpoint stringIp 
- The ip of source endpoint.
- DestinationEndpoint stringOracle Sid 
- The SID of Oracle database.
- DestinationEndpoint stringPort 
- The port of source endpoint.
- DestinationEndpoint stringRegion 
- The region of destination instance.
- DestinationEndpoint stringUser Name 
- The username of database account.
- DtsInstance stringId 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- DtsJob stringId 
- The ID of the Migration Job.
- DtsJob stringName 
- The name of synchronization job.
- Id string
- The ID of the Migration Job. Its value is same as dts_job_id.
- PaymentType string
- The payment type of the Migration Instance.
- SourceEndpoint stringDatabase Name 
- The name of migrate the database.
- SourceEndpoint stringEngine Name 
- The type of source database.
- SourceEndpoint stringInstance Id 
- The ID of source instance.
- SourceEndpoint stringInstance Type 
- The type of source instance.
- SourceEndpoint stringIp 
- The ip of source endpoint.
- SourceEndpoint stringOracle Sid 
- The SID of Oracle database.
- SourceEndpoint stringOwner Id 
- The Alibaba Cloud account ID to which the source instance belongs.
- SourceEndpoint stringPort 
- The port of source endpoint.
- SourceEndpoint stringRegion 
- The region of source instance.
- SourceEndpoint stringRole 
- The name of the role configured for the cloud account to which the source instance belongs.
- SourceEndpoint stringUser Name 
- The username of database account.
- Status string
- The status of the resource.
- StructureInitialization bool
- Whether to perform a database table structure to migrate or initialization.
- DataInitialization bool
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- DataSynchronization bool
- Whether to perform incremental data migration for migration types or synchronization values include:
- DbList string
- The Migration object, in the format of JSON strings.
- DestinationEndpoint stringData Base Name 
- The name of migrate the database.
- DestinationEndpoint stringEngine Name 
- The type of destination database.
- DestinationEndpoint stringInstance Id 
- The ID of destination instance.
- DestinationEndpoint stringInstance Type 
- The type of destination instance.
- DestinationEndpoint stringIp 
- The ip of source endpoint.
- DestinationEndpoint stringOracle Sid 
- The SID of Oracle database.
- DestinationEndpoint stringPort 
- The port of source endpoint.
- DestinationEndpoint stringRegion 
- The region of destination instance.
- DestinationEndpoint stringUser Name 
- The username of database account.
- DtsInstance stringId 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- DtsJob stringId 
- The ID of the Migration Job.
- DtsJob stringName 
- The name of synchronization job.
- Id string
- The ID of the Migration Job. Its value is same as dts_job_id.
- PaymentType string
- The payment type of the Migration Instance.
- SourceEndpoint stringDatabase Name 
- The name of migrate the database.
- SourceEndpoint stringEngine Name 
- The type of source database.
- SourceEndpoint stringInstance Id 
- The ID of source instance.
- SourceEndpoint stringInstance Type 
- The type of source instance.
- SourceEndpoint stringIp 
- The ip of source endpoint.
- SourceEndpoint stringOracle Sid 
- The SID of Oracle database.
- SourceEndpoint stringOwner Id 
- The Alibaba Cloud account ID to which the source instance belongs.
- SourceEndpoint stringPort 
- The port of source endpoint.
- SourceEndpoint stringRegion 
- The region of source instance.
- SourceEndpoint stringRole 
- The name of the role configured for the cloud account to which the source instance belongs.
- SourceEndpoint stringUser Name 
- The username of database account.
- Status string
- The status of the resource.
- StructureInitialization bool
- Whether to perform a database table structure to migrate or initialization.
- dataInitialization Boolean
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- dataSynchronization Boolean
- Whether to perform incremental data migration for migration types or synchronization values include:
- dbList String
- The Migration object, in the format of JSON strings.
- destinationEndpoint StringData Base Name 
- The name of migrate the database.
- destinationEndpoint StringEngine Name 
- The type of destination database.
- destinationEndpoint StringInstance Id 
- The ID of destination instance.
- destinationEndpoint StringInstance Type 
- The type of destination instance.
- destinationEndpoint StringIp 
- The ip of source endpoint.
- destinationEndpoint StringOracle Sid 
- The SID of Oracle database.
- destinationEndpoint StringPort 
- The port of source endpoint.
- destinationEndpoint StringRegion 
- The region of destination instance.
- destinationEndpoint StringUser Name 
- The username of database account.
- dtsInstance StringId 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- dtsJob StringId 
- The ID of the Migration Job.
- dtsJob StringName 
- The name of synchronization job.
- id String
- The ID of the Migration Job. Its value is same as dts_job_id.
- paymentType String
- The payment type of the Migration Instance.
- sourceEndpoint StringDatabase Name 
- The name of migrate the database.
- sourceEndpoint StringEngine Name 
- The type of source database.
- sourceEndpoint StringInstance Id 
- The ID of source instance.
- sourceEndpoint StringInstance Type 
- The type of source instance.
- sourceEndpoint StringIp 
- The ip of source endpoint.
- sourceEndpoint StringOracle Sid 
- The SID of Oracle database.
- sourceEndpoint StringOwner Id 
- The Alibaba Cloud account ID to which the source instance belongs.
- sourceEndpoint StringPort 
- The port of source endpoint.
- sourceEndpoint StringRegion 
- The region of source instance.
- sourceEndpoint StringRole 
- The name of the role configured for the cloud account to which the source instance belongs.
- sourceEndpoint StringUser Name 
- The username of database account.
- status String
- The status of the resource.
- structureInitialization Boolean
- Whether to perform a database table structure to migrate or initialization.
- dataInitialization boolean
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- dataSynchronization boolean
- Whether to perform incremental data migration for migration types or synchronization values include:
- dbList string
- The Migration object, in the format of JSON strings.
- destinationEndpoint stringData Base Name 
- The name of migrate the database.
- destinationEndpoint stringEngine Name 
- The type of destination database.
- destinationEndpoint stringInstance Id 
- The ID of destination instance.
- destinationEndpoint stringInstance Type 
- The type of destination instance.
- destinationEndpoint stringIp 
- The ip of source endpoint.
- destinationEndpoint stringOracle Sid 
- The SID of Oracle database.
- destinationEndpoint stringPort 
- The port of source endpoint.
- destinationEndpoint stringRegion 
- The region of destination instance.
- destinationEndpoint stringUser Name 
- The username of database account.
- dtsInstance stringId 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- dtsJob stringId 
- The ID of the Migration Job.
- dtsJob stringName 
- The name of synchronization job.
- id string
- The ID of the Migration Job. Its value is same as dts_job_id.
- paymentType string
- The payment type of the Migration Instance.
- sourceEndpoint stringDatabase Name 
- The name of migrate the database.
- sourceEndpoint stringEngine Name 
- The type of source database.
- sourceEndpoint stringInstance Id 
- The ID of source instance.
- sourceEndpoint stringInstance Type 
- The type of source instance.
- sourceEndpoint stringIp 
- The ip of source endpoint.
- sourceEndpoint stringOracle Sid 
- The SID of Oracle database.
- sourceEndpoint stringOwner Id 
- The Alibaba Cloud account ID to which the source instance belongs.
- sourceEndpoint stringPort 
- The port of source endpoint.
- sourceEndpoint stringRegion 
- The region of source instance.
- sourceEndpoint stringRole 
- The name of the role configured for the cloud account to which the source instance belongs.
- sourceEndpoint stringUser Name 
- The username of database account.
- status string
- The status of the resource.
- structureInitialization boolean
- Whether to perform a database table structure to migrate or initialization.
- data_initialization bool
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- data_synchronization bool
- Whether to perform incremental data migration for migration types or synchronization values include:
- db_list str
- The Migration object, in the format of JSON strings.
- destination_endpoint_ strdata_ base_ name 
- The name of migrate the database.
- destination_endpoint_ strengine_ name 
- The type of destination database.
- destination_endpoint_ strinstance_ id 
- The ID of destination instance.
- destination_endpoint_ strinstance_ type 
- The type of destination instance.
- destination_endpoint_ strip 
- The ip of source endpoint.
- destination_endpoint_ stroracle_ sid 
- The SID of Oracle database.
- destination_endpoint_ strport 
- The port of source endpoint.
- destination_endpoint_ strregion 
- The region of destination instance.
- destination_endpoint_ struser_ name 
- The username of database account.
- dts_instance_ strid 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- dts_job_ strid 
- The ID of the Migration Job.
- dts_job_ strname 
- The name of synchronization job.
- id str
- The ID of the Migration Job. Its value is same as dts_job_id.
- payment_type str
- The payment type of the Migration Instance.
- source_endpoint_ strdatabase_ name 
- The name of migrate the database.
- source_endpoint_ strengine_ name 
- The type of source database.
- source_endpoint_ strinstance_ id 
- The ID of source instance.
- source_endpoint_ strinstance_ type 
- The type of source instance.
- source_endpoint_ strip 
- The ip of source endpoint.
- source_endpoint_ stroracle_ sid 
- The SID of Oracle database.
- source_endpoint_ strowner_ id 
- The Alibaba Cloud account ID to which the source instance belongs.
- source_endpoint_ strport 
- The port of source endpoint.
- source_endpoint_ strregion 
- The region of source instance.
- source_endpoint_ strrole 
- The name of the role configured for the cloud account to which the source instance belongs.
- source_endpoint_ struser_ name 
- The username of database account.
- status str
- The status of the resource.
- structure_initialization bool
- Whether to perform a database table structure to migrate or initialization.
- dataInitialization Boolean
- Whether or not to execute DTS supports schema migration, full data migration, or full-data initialization.
- dataSynchronization Boolean
- Whether to perform incremental data migration for migration types or synchronization values include:
- dbList String
- The Migration object, in the format of JSON strings.
- destinationEndpoint StringData Base Name 
- The name of migrate the database.
- destinationEndpoint StringEngine Name 
- The type of destination database.
- destinationEndpoint StringInstance Id 
- The ID of destination instance.
- destinationEndpoint StringInstance Type 
- The type of destination instance.
- destinationEndpoint StringIp 
- The ip of source endpoint.
- destinationEndpoint StringOracle Sid 
- The SID of Oracle database.
- destinationEndpoint StringPort 
- The port of source endpoint.
- destinationEndpoint StringRegion 
- The region of destination instance.
- destinationEndpoint StringUser Name 
- The username of database account.
- dtsInstance StringId 
- The Migration instance ID. The ID of alicloud.dts.MigrationInstance.
- dtsJob StringId 
- The ID of the Migration Job.
- dtsJob StringName 
- The name of synchronization job.
- id String
- The ID of the Migration Job. Its value is same as dts_job_id.
- paymentType String
- The payment type of the Migration Instance.
- sourceEndpoint StringDatabase Name 
- The name of migrate the database.
- sourceEndpoint StringEngine Name 
- The type of source database.
- sourceEndpoint StringInstance Id 
- The ID of source instance.
- sourceEndpoint StringInstance Type 
- The type of source instance.
- sourceEndpoint StringIp 
- The ip of source endpoint.
- sourceEndpoint StringOracle Sid 
- The SID of Oracle database.
- sourceEndpoint StringOwner Id 
- The Alibaba Cloud account ID to which the source instance belongs.
- sourceEndpoint StringPort 
- The port of source endpoint.
- sourceEndpoint StringRegion 
- The region of source instance.
- sourceEndpoint StringRole 
- The name of the role configured for the cloud account to which the source instance belongs.
- sourceEndpoint StringUser Name 
- The username of database account.
- status String
- The status of the resource.
- structureInitialization Boolean
- Whether to perform a database table structure to migrate or initialization.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.
