All Products
Search
Document Center

DataWorks:GetDISyncTask

Last Updated:Jun 11, 2026

Mengambil detail tugas sinkronisasi atau solusi sinkronisasi data.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

dataworks:*

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

ProjectId

integer

Yes

ID ruang kerja DataWorks. Anda dapat masuk ke Konsol DataWorks dan membuka halaman Workspace untuk mendapatkan ID ruang kerja.

Anda harus mengonfigurasi parameter ini untuk menentukan ruang kerja DataWorks tempat operasi API diterapkan.

10000

TaskType

string

Yes

Tipe objek yang ingin Anda kueri. Nilai valid:

  • DI_REALTIME: tugas sinkronisasi pengatur waktu

  • DI_SOLUTION: solusi sinkronisasi data

DI_REALTIME

FileId

integer

Yes

  • Jika Anda mengatur TaskType ke DI_REALTIME, atur parameter ini ke ID tugas sinkronisasi pengatur waktu yang ingin Anda deploy.

  • Jika Anda mengatur TaskType ke DI_SOLUTION, atur parameter ini ke ID solusi sinkronisasi data yang ingin Anda deploy.

Anda dapat memanggil operasi ListFiles untuk mengkueri ID tugas sinkronisasi pengatur waktu atau solusi sinkronisasi data.

100

Elemen respons

Element

Type

Description

Example

object

The response parameters.

Success

boolean

Indicates whether the request was successful. Valid values:

  • True

  • False

true

RequestId

string

The request ID. You can locate logs and troubleshoot issues based on the ID.

0bc1411515937635973****

Data

object

The returned results.

Code

string

  • If the TaskType parameter is set to DI_REALTIME, the details of the real-time synchronization task are returned.

  • If the TaskType parameter is set to DI_SOLUTION, the value null is returned.

{"extend":{"mode":"wizard","resourceGroup":"S_res_group_287114642182658_1560324290517"},"nodeDef":{},"order":{"hops":[{"from":"datahub_8htXSsfiS2vtZCVG","to":"datahub_CRHBAyGfhSaLmv2f"}]},"setting":{"errorLimit":{},"jvmOption":""},"steps":[{"stepType":"datahub","category":"writer","displayName":"DataHub1","parameter":{"batchSize":1000,"datasource":"datahub_cloud_dev_test","topic":"dwd_tfc_opt_speed_rid_amap_rt"},"name":"datahub_CRHBAyGfhSaLmv2f","gui":{"x":262,"y":325}},{"stepType":"datahub","displayName":"DataHub2","parameter":{"datasource":"datahub_uric_test","topic":"dwd_tfc_opt_speed_rid_amap_rt_330000","batchSize":1000},"name":"datahub_8htXSsfiS2vtZCVG","gui":{"x":268,"y":160.5},"category":"writer"}]}

Status

string

Indicates whether the details of the real-time synchronization task or data synchronization solution are obtained. Valid values:

success: The details are obtained. fail: The details fail to be obtained.

success

Message

string

The cause of the failure to obtain the details of the real-time synchronization task or data synchronization solution.

If the details of the real-time synchronization task or data synchronization solution are obtained, the value null is returned.

fileId:[100] is invalid.

AlarmList

array<object>

The alert rules that are associated with the real-time synchronization task. The value of this parameter is an array.

array<object>

The alert rule that is associated with the real-time synchronization task.

Id

integer

The ID of the alert rule.

45242

Enabled

boolean

Indicates whether the alert rule is enabled.

true

RuleName

string

The name of the alert rule.

Delay alert rule name 1

Metric

string

The alert type. Valid values:

  • taskStatus

  • bizDelay

  • taskFailoverCount

  • ddlUnsupport

  • ddlReport

  • totalDirtyRecordWriteInLines

taskStatus

Description

string

The description of the alert rule.

Description

AlarmRuleList

array<object>

The alert notification settings. The value of this parameter is an array.

object

The alert notification setting.

Level

string

  • WARNING

  • CRITICAL

WARNING

Comparator

string

The comparison operator, which indicates the method used to compare a metric with the alert rule.

  • '='

  • '<'

  • '>'

=

Threshold

integer

The threshold for the comparison between a metric and the alert rule.

1

Duration

integer

The duration that a condition is met before an alert is triggered. Unit: minutes.

3

Aggregator

string

The calculation method of a metric. Valid values:

  • avg

  • max

avg

NotifyRule

object

The settings for alert notification rules. The value of this parameter is an array.

Interval

integer

The alert interval. Unit: minutes.

5

Warning

array

The settings for Warning-level alert notifications.

string

The alert notification method. Valid values:

  • Mail

  • Phone

  • Sms

  • Ding

Ding

Critical

array

The settings for Critical-level alert notifications.

string

The alert notification method. Valid values:

  • Mail

  • Phone

  • Sms

  • Ding

Ding

SolutionDetail

object

  • If the TaskType parameter is set to DI_REALTIME, the value null is returned.

  • If the TaskType parameter is set to DI_SOLUTION, the details of the data synchronization solution are returned.

Status

string

The status of the data synchronization solution. Valid values:

  • 0: successful

  • 1: not running

  • 2: running

  • 3: failed

  • 4: committed

  • 5: pending manual confirmation

  • 6: manually confirmed

  • 7: others

  • 8: waiting

  • 9: deleted

0

Type

string

The type of the data synchronization solution.

holo

StartTime

string

The start time of the data synchronization solution.

2021-12-07 14:40:51

CreatorName

string

The creator of the data synchronization solution.

dataworks_di

ProjectId

integer

The ID of the project to which the data synchronization solution belongs.

10000

SourceType

string

The type of the source of the data synchronization solution.

mysql

ProcessContent

string

The configuration details of the data synchronization solution.

{"holoDatasource":"holo","offlineSyncConfig":{"nodeNameRule":"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}","resourceGroup":"group_219193793999490"},"processRuleId":1007,"readerConcurrent":10,"realtimeSyncConfig":{"content":{"order":{"hops":[{"from":"reader","to":"writer"}]},"setting":{"speed":{"readerConcurrent":10}},"steps":[{"stepType":"mysql","name":"reader","category":"reader","parameter":{"connection":[{"datasource":"mm","datasourceType":"mysql","table":[]}]}},{"stepType":"holo","name":"writer","category":"writer","parameter":{"datasource":"holo","writeMode":"replay","datasourceSchema":"public","tableMappingRule":{"datasource":[{"tableRule":[],"srcDatasourceName":"mm"}]}}}]},"extend":{"mode":"migration_holo","resourceGroup":"group_219193793999490"}},"setting":{"autoCreateWorkflow":true,"userDefinedFileNameExpression":"oneclick"},"srcType":"mysql","tableMappingRuleFromRealtimeSyncConfig":{"datasource":[{"srcDatasourceName":"mm","tableRule":[]}]}}

Name

string

The name of the data synchronization solution.

holo_20211206161025

ProcessExtra

string

The additional parameters of the data synchronization solution.

{"processType":"new","tableNum":300}

SubmitTime

string

The time when the data synchronization solution was committed.

2021-12-07 14:40:51

Id

integer

The ID of the data synchronization solution.

100

Contoh

Respons sukses

JSONformat

{
  "Success": true,
  "RequestId": "0bc1411515937635973****\t",
  "Data": {
    "Code": "{\"extend\":{\"mode\":\"wizard\",\"resourceGroup\":\"S_res_group_287114642182658_1560324290517\"},\"nodeDef\":{},\"order\":{\"hops\":[{\"from\":\"datahub_8htXSsfiS2vtZCVG\",\"to\":\"datahub_CRHBAyGfhSaLmv2f\"}]},\"setting\":{\"errorLimit\":{},\"jvmOption\":\"\"},\"steps\":[{\"stepType\":\"datahub\",\"category\":\"writer\",\"displayName\":\"DataHub1\",\"parameter\":{\"batchSize\":1000,\"datasource\":\"datahub_cloud_dev_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt\"},\"name\":\"datahub_CRHBAyGfhSaLmv2f\",\"gui\":{\"x\":262,\"y\":325}},{\"stepType\":\"datahub\",\"displayName\":\"DataHub2\",\"parameter\":{\"datasource\":\"datahub_uric_test\",\"topic\":\"dwd_tfc_opt_speed_rid_amap_rt_330000\",\"batchSize\":1000},\"name\":\"datahub_8htXSsfiS2vtZCVG\",\"gui\":{\"x\":268,\"y\":160.5},\"category\":\"writer\"}]}",
    "Status": "success",
    "Message": "fileId:[100] is invalid.",
    "AlarmList": [
      {
        "Id": 45242,
        "Enabled": true,
        "RuleName": "Delay alert rule name 1",
        "Metric": "taskStatus",
        "Description": "Description",
        "AlarmRuleList": [
          {
            "Level": "WARNING",
            "Comparator": "=",
            "Threshold": 1,
            "Duration": 3,
            "Aggregator": "avg"
          }
        ],
        "NotifyRule": {
          "Interval": 5,
          "Warning": [
            "Ding"
          ],
          "Critical": [
            "Ding"
          ]
        }
      }
    ],
    "SolutionDetail": {
      "Status": "0",
      "Type": "holo",
      "StartTime": "2021-12-07 14:40:51",
      "CreatorName": "dataworks_di",
      "ProjectId": 10000,
      "SourceType": "mysql",
      "ProcessContent": "{\"holoDatasource\":\"holo\",\"offlineSyncConfig\":{\"nodeNameRule\":\"oneclick_holo_di_${db_table_name_src}_to_${db_table_name_dest}\",\"resourceGroup\":\"group_219193793999490\"},\"processRuleId\":1007,\"readerConcurrent\":10,\"realtimeSyncConfig\":{\"content\":{\"order\":{\"hops\":[{\"from\":\"reader\",\"to\":\"writer\"}]},\"setting\":{\"speed\":{\"readerConcurrent\":10}},\"steps\":[{\"stepType\":\"mysql\",\"name\":\"reader\",\"category\":\"reader\",\"parameter\":{\"connection\":[{\"datasource\":\"mm\",\"datasourceType\":\"mysql\",\"table\":[]}]}},{\"stepType\":\"holo\",\"name\":\"writer\",\"category\":\"writer\",\"parameter\":{\"datasource\":\"holo\",\"writeMode\":\"replay\",\"datasourceSchema\":\"public\",\"tableMappingRule\":{\"datasource\":[{\"tableRule\":[],\"srcDatasourceName\":\"mm\"}]}}}]},\"extend\":{\"mode\":\"migration_holo\",\"resourceGroup\":\"group_219193793999490\"}},\"setting\":{\"autoCreateWorkflow\":true,\"userDefinedFileNameExpression\":\"oneclick\"},\"srcType\":\"mysql\",\"tableMappingRuleFromRealtimeSyncConfig\":{\"datasource\":[{\"srcDatasourceName\":\"mm\",\"tableRule\":[]}]}}",
      "Name": "holo_20211206161025",
      "ProcessExtra": "{\"processType\":\"new\",\"tableNum\":300}",
      "SubmitTime": "2021-12-07 14:40:51",
      "Id": 100
    }
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 Param.Invalid The parameter is invalid.
500 InternalError.System An internal error occurred.
403 Forbidden.Access Access is forbidden.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.