調用ListDataTasks,擷取資料移轉任務資訊。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
要求標頭
該介面使用公用要求標頭,無特殊要求標頭。請參見公用請求參數文檔。
請求文法
GET /openapi/instances/{InstanceId}/data-task HTTP/1.1
請求參數
| 名稱 | 類型 | 位置 | 是否必選 | 樣本值 | 描述 |
| InstanceId | String | Path | 是 | es-cn-oew1oxiro000f**** | 執行個體ID。 |
返回資料
| 名稱 | 類型 | 樣本值 | 描述 |
| RequestId | String | 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D*** | 請求ID。 |
| Result | Array of Result | 返回結果。 |
|
| createTime | String | 2020-07-30 06:32:18 | 任務建立的時間。 |
| taskId | String | et_cn_mfv1233r47272**** | 任務ID。 |
| status | String | SUCCESS | 任務狀態。 |
| sinkCluster | Object | 目的地組群資訊。 |
|
| index | String | product_info | 目標索引。 |
| type | String | _doc | 索引類型。 |
| endpoint | String | http://192.168.xx.xx:4101 | 目的地組群的公網訪問地址。 |
| vpcId | String | vpc-2ze55voww95g82gak**** | 叢集所在的專用網路ID。 |
| vpcInstancePort | String | 9200 | 叢集的訪問連接埠號碼。 |
| vpcInstanceId | String | es-cn-09k1rnu3g0002****-worker | 當前叢集的執行個體ID或Server Load Balancer(Server Load Balancer)執行個體ID。 |
| dataSourceType | String | 1 | 目的地組群類型。預設為elasticsearch。 |
| sourceCluster | Object | 源叢集資訊。 |
|
| index | String | product_info | 待遷移的索引。 |
| settings | String | {\n \"index\": {\n \"replication\": {\n}.....}} | 叢集的Settings配置。 |
| mapping | String | {\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}} | 叢集的Mapping配置。 |
| type | String | _doc | 索引類型。 |
| routing | String | _id | 索引路由欄位,預設使用主鍵欄位。 |
| dataSourceType | String | elasticsearch | 源叢集類型。預設為elasticsearch。 |
樣本
請求樣本
GET /openapi/instances/es-cn-oew1oxiro000f****/data-task HTTP/1.1
公用要求標頭
正常返回樣本
JSON格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : [ {
"taskId" : "et_cn_mfv1233r47272****",
"sourceCluster" : {
"dataSourceType" : "elasticsearch",
"endpoint" : "http://192.168.xx.xx:4101",
"vpcInstancePort" : 9200,
"vpcId" : "vpc-2ze55voww95g82gak****",
"vpcInstanceId" : "es-cn-09k1rnu3g0002****-worker",
"index" : "product_info",
"type" : "products"
},
"sinkCluster" : {
"dataSourceType" : "elasticsearch",
"index" : "product_info01",
"type" : "_doc",
"settings" : "{\n \"index\": {\n \"replication\": {\n}.....}}",
"mapping" : "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}"
},
"status" : "SUCCESS",
"createTime" : "2020-08-03 08:36:19"
}, {
"taskId" : "et_cn_vb9g57i4h4eyp****",
"sourceCluster" : {
"dataSourceType" : "elasticsearch",
"endpoint" : "http://192.168.xx.xx:4096",
"vpcInstancePort" : 9200,
"vpcId" : "vpc-2ze55voww95g82gak****",
"vpcInstanceId" : "es-cn-oew1oxiro000f****-worker",
"index" : "my_index",
"type" : "_doc"
},
"sinkCluster" : {
"dataSourceType" : "elasticsearch",
"index" : "my_index003",
"type" : "_doc",
"settings" : "{\n \"index\": {\n \"replication\": {\n}.....}}",
"mapping" : "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}}"
},
"status" : "SUCCESS",
"createTime" : "2020-07-30 06:32:18"
} ],
"RequestId" : "8FB71A9A-1ACE-40DA-ADC0-2B3DB44F****"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。