全部产品
云市场

ModifyInstance

更新时间:2018-12-13 10:10:08

修改指定实例配置。

描述

如果实例已经执行了全量数据导入任务,则行业名称和场景名称信息无法修改,所以需要在全量导入之前确认您的行业和场景选择是否正确。

修改数据源信息( dataSources )必须全量提交,暂时不支持增量提交。

方法

PUT

URI

/openapi/instances/{instanceId}

请求参数

参数 类型 是否必需 描述
Name String 实例名称。
Industry String 行业名称。
Scene String 场景名称。
DataSources List 数据源列表。

返回参数

参数 类型 描述
RequestId String 当前请求的RequestID
Result Instance 实例基本信息

示例

请求示例

修改名称

  1. PUT /openapi/instances/airec-cn-xxxxxx
  2. {
  3. "name": "abc"
  4. }

修改行业场景和数据源

  1. {
  2. "industry": "content",
  3. "scene": "gul",
  4. "dataSources": [
  5. {
  6. "tableName": "user",
  7. "meta": {
  8. "type": "ODPS",
  9. "tableName": "table",
  10. "accessKeyId": "ak",
  11. "accessKeySecret": "secret",
  12. "projectName": "project_name",
  13. "timestamp": 1544112000000,
  14. "partition": "dt=20181122"
  15. }
  16. },
  17. {
  18. "tableName": "item",
  19. "meta": {
  20. "accessKeyId": "ak",
  21. "accessKeySecret": "secret",
  22. "projectName": "project",
  23. "type": "ODPS",
  24. "tableName": "table",
  25. "partition": "dt=20181122",
  26. "timestamp": 1544112000000
  27. }
  28. },
  29. {
  30. "tableName": "behavior",
  31. "meta": {
  32. "type": "ODPS",
  33. "accessKeyId": "ak",
  34. "accessKeySecret": "secret",
  35. "projectName": "project",
  36. "tableName": "table",
  37. "partition": "dt=20181122",
  38. "timestamp": 1544112000000
  39. }
  40. }
  41. ]
  42. }

正常返回示例

JSON 格式

  1. {
  2. "Result": {
  3. "InstanceId": "airec-cn-xxxxxx",
  4. "Name": "airec-cn-xxxxxx",
  5. "Type": "Standard",
  6. "Status": "Ready",
  7. "Industry": "content",
  8. "Scene": "gul",
  9. "RegionId": "cn-beijing",
  10. "ChargeType": "PrePaid",
  11. "CommodityCode": "airecpre",
  12. "GmtCreate": "2018-12-04T09:00:07.000Z",
  13. "GmtModified": "2018-12-07T02:24:25.000Z",
  14. "ExpiredTime": "2019-01-04T16:00:00.000Z",
  15. "LockMode": "Unlock"
  16. },
  17. "RequestId": "90D6B8F5-FE97-4509-9AAB-367836C51818"
  18. }

异常返回示例

JSON 格式

  1. {
  2. "RequestId": "EDF43C1F-99E4-431F-A7C0-8B260A5A792E",
  3. "Code": "DataSourceUnavailable",
  4. "Message": "An error occurred while validating the data source, error infomation: com.aliyun.odps.OdpsException: ODPS-0410042:Invalid signature value - User signature dose not match."
  5. }
  6. }