All Products
Search
Document Center

ModifyInstance

Last Updated: Mar 29, 2021

Modifies the configurations of a specified instance.

Description

If you have imported full data into an instance, the industry name and scene name cannot be modified. Therefore, before you import full data into the instance, make sure that you have selected a correct industry and a correct scene.

If you modify data sources, you must submit full data.

Method

PUT

URI

/openapi/instances/{instanceId}

Request parameters

Parameter

Type

Required

Description

Name

String

No

The name of the instance.

Industry

String

No

The name of the industry.

Scene

String

No

The name of the scene.

DataSources

List< DataSource >

No

The data sources.

Response parameters

Parameter

Type

Description

RequestId

String

The ID of the request.

Result

Instance

The basic information of the instance.

Examples

Sample requests

Modify the instance name

PUT /openapi/instances/airec-cn-xxxxxx
{
    "name": "abc"
}

Modify the industry, scene, and data sources

{
  "industry": "content",
  "scene": "gul",
  "dataSources": [
    {
      "tableName": "user",
      "meta": {
        "type": "ODPS",
        "tableName": "table",
        "accessKeyId": "ak",
        "accessKeySecret": "secret",
        "projectName": "project_name",
        "timestamp": 1544112000000,
        "partition": "dt=20181122",
        "incEnabled": false, // Specifies whether the data source supports real-time data.
        "fullEnabled": true // Specifies whether the data source supports full historical data.
      }
    },
    {
      "tableName": "item",
      "meta": {
        "accessKeyId": "ak",
        "accessKeySecret": "secret",
        "projectName": "project",
        "type": "ODPS",
        "tableName": "table",
        "partition": "dt=20181122",
        "timestamp": 1544112000000,
        "incEnabled": false, // Specifies whether the data source supports real-time data.
        "fullEnabled": true // Specifies whether the data source supports full historical data.
      }
    },
    {
      "tableName": "behavior",
      "meta": {
        "type": "ODPS",
        "accessKeyId": "ak",
        "accessKeySecret": "secret",
        "projectName": "project",
        "tableName": "table",
        "partition": "dt=20181122",
        "timestamp": 1544112000000,
        "incEnabled": false, // Specifies whether the data source supports real-time data.
        "fullEnabled": true // Specifies whether the data source supports full historical data.
      }
    }
  ]
}

Sample success responses

JSON format

{
  "Result": {
    "InstanceId": "airec-cn-xxxxxx",
    "Name": "airec-cn-xxxxxx",
    "Type": "Standard",
    "Status": "Ready",
    "Industry": "content",
    "Scene": "gul",
    "RegionId": "cn-beijing",
    "ChargeType": "PrePaid",
    "CommodityCode": "airecpre",
    "GmtCreate": "2018-12-04T09:00:07.000Z",
    "GmtModified": "2018-12-07T02:24:25.000Z",
    "ExpiredTime": "2019-01-04T16:00:00.000Z",
    "LockMode": "Unlock"
  },
  "RequestId": "90D6B8F5-FE97-4509-9AAB-367836C51818"
}

Sample error responses

JSON format

{
  "RequestId": "EDF43C1F-99E4-431F-A7C0-8B260A5A792E",
  "Code": "DataSourceUnavailable",
  "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."
  }
}