获取不同Elasticsearch集群之间的数据迁移任务的列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
elasticsearch:ListDataTasks |
get |
*Instance
|
无 | 无 |
请求语法
GET /openapi/instances/{InstanceId}/data-task HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
实例 ID。 |
es-cn-oew1oxiro000f**** |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D*** |
| Result |
array<object> |
返回结果。 |
|
|
array<object> |
|||
| createTime |
string |
任务创建的时间。 |
2020-07-30 06:32:18 |
| taskId |
string |
任务 ID。 |
et_cn_mfv1233r47272**** |
| status |
string |
任务状态。 |
SUCCESS |
| sinkCluster |
object |
目标集群信息。 |
|
| index |
string |
目标索引。 |
product_info |
| type |
string |
索引类型。 |
_doc |
| endpoint |
string |
目标集群的公网访问地址。 |
http://192.168.xx.xx:4101 |
| vpcId |
string |
集群所在的专有网络 ID。 |
vpc-2ze55voww95g82gak**** |
| vpcInstancePort |
string |
集群的访问端口号。 |
9200 |
| vpcInstanceId |
string |
当前集群的实例 ID 或负载均衡 SLB(Server Load Balancer)实例 ID。 |
es-cn-09k1rnu3g0002****-worker |
| dataSourceType |
string |
目标集群类型。默认为 elasticsearch。 |
1 |
| sourceCluster |
object |
源集群信息。 |
|
| index |
string |
待迁移的索引。 |
product_info |
| settings |
string |
集群的 Settings 配置。 |
{\n \"index\": {\n \"replication\": {\n}.....}} |
| mapping |
string |
集群的 Mapping 配置。 |
{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\"text\",...}}}}}} |
| type |
string |
索引类型。 |
_doc |
| routing |
string |
索引路由字段,默认使用主键字段。 |
_id |
| dataSourceType |
string |
源集群类型。默认为 elasticsearch。 |
1 |
示例
正常返回示例
JSON格式
{
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D***",
"Result": [
{
"createTime": "2020-07-30 06:32:18",
"taskId": "et_cn_mfv1233r47272****",
"status": "SUCCESS",
"sinkCluster": {
"index": "product_info",
"type": "_doc",
"endpoint": "http://192.168.xx.xx:4101",
"vpcId": "vpc-2ze55voww95g82gak****",
"vpcInstancePort": "9200",
"vpcInstanceId": "es-cn-09k1rnu3g0002****-worker",
"dataSourceType": "1"
},
"sourceCluster": {
"index": "product_info",
"settings": "{\\n \\\"index\\\": {\\n \\\"replication\\\": {\\n}.....}}",
"mapping": "{\\\"_doc\\\":{\\\"properties\\\":{\\\"user\\\":{\\\"properties\\\":{\\\"last\\\":{\\\"type\\\":\\\"text\\\",...}}}}}}",
"type": "_doc",
"routing": "_id",
"dataSourceType": "1"
}
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ComponentCodeValueError | component value is disable | |
| 401 | UserNotOpen | Aliyun account is not open elasticsearch | |
| 401 | StsRoleAccountNoPermission | Role account has no permission or expired | |
| 401 | SubAccountNoPermission | Aliyun sub account has no permission, please authorize your sub account in Aliyun RAM | |
| 401 | UserUnauthorized | Authentication required |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。