修改指定实例配置。
如果实例已经执行了全量数据导入任务,则行业名称和场景名称信息无法修改,所以需要在全量导入之前确认您的行业和场景选择是否正确。
修改数据源信息( dataSources )必须全量提交,暂时不支持增量提交。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求头
该接口使用公共请求头,无特殊请求头。请参见公共请求参数文档。
请求语法
PUT /v2/openapi/instances/[instanceId] HTTP/1.1
请求参数
名称 | 类型 | 位置 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|---|
instanceId | String | Path | 是 | airec-cn-xxxxxx |
实例id |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
code | String | InternalServerError |
错误码 |
message | String | An internal server error occurred |
错误详情 |
requestId | String | 8F81A922-6C81-46D6-B78C-CC35E16B1691 |
请求id |
result | Struct |
返回结果 |
|
chargeType | String | PrePaid |
付费类型,包含 包年包月( PrePaid)和 按量付费 ( PostPaid ),当前产品只支持包年包月付费类型。 |
commodityCode | String | airecpre |
商品代码。 |
dataSetVersion | String | 20181206170353 |
当前在线服务的数据集版本。 |
expiredTime | String | 2019-01-06T16:00:00.000Z |
实例过期时间,单位为UTC时间。 |
gmtCreate | String | 2018-12-06T06:14:01.000Z |
实例创建时间,单位为UTC时间。 |
gmtModified | String | 2018-12-06T11:17:49.000Z |
实例最后更新时间,单位为UTC时间。 |
industry | String | news |
行业名称,行业名称分为:内容型( content )、商品型( item )、新闻型( news)、视频型( video )、社交型( sns )。 |
instanceId | String | airec-cn-o400whm78004 |
实例ID。 |
lockMode | String | Unlock |
锁定状态,包含 未锁定( Unlock )、手动锁定( ManualLock )、欠费锁定 ( LockByExpiration)。 |
name | String | 测试实例 |
实例名称。 |
regionId | String | cn-beijing |
实例所在的区域。 |
status | String | Running |
实例状态,初始化中(Initializing)、待数据导入(Ready)、运行中(Running)。 |
type | String | Standard |
实例类型,当前只有 标准版(Standard)。 |
示例
请求示例
PUT /openapi/instances/airec-cn-xxxxxx
修改名称:
{
"name": "abc"
}
修改行业及数据源:
{
"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, // 当前数据源是否支持实时数据
"fullEnabled": true // 当前数据源是否支持历史全量数据
}
},
{
"tableName": "item",
"meta": {
"accessKeyId": "ak",
"accessKeySecret": "secret",
"projectName": "project",
"type": "ODPS",
"tableName": "table",
"partition": "dt=20181122",
"timestamp": 1544112000000,
"incEnabled": false, // 当前数据源是否支持实时数据
"fullEnabled": true // 当前数据源是否支持历史全量数据
}
},
{
"tableName": "behavior",
"meta": {
"type": "ODPS",
"accessKeyId": "ak",
"accessKeySecret": "secret",
"projectName": "project",
"tableName": "table",
"partition": "dt=20181122",
"timestamp": 1544112000000,
"incEnabled": false, // 当前数据源是否支持实时数据
"fullEnabled": true // 当前数据源是否支持历史全量数据
}
}
]
}
正常返回示例
XML
格式
<Result>
<InstanceId>airec-cn-xxxxxx</InstanceId>
<Name>airec-cn-xxxxxx</Name>
<Type>Standard</Type>
<Status>Ready</Status>
<Industry>content</Industry>
<Scene>gul</Scene>
<RegionId>cn-beijing</RegionId>
<ChargeType>PrePaid</ChargeType>
<CommodityCode>airecpre</CommodityCode>
<GmtCreate>2018-12-04T09:00:07.000Z</GmtCreate>
<GmtModified>2018-12-07T02:24:25.000Z</GmtModified>
<ExpiredTime>2019-01-04T16:00:00.000Z</ExpiredTime>
<LockMode>Unlock</LockMode>
</Result>
<RequestId>90D6B8F5-FE97-4509-9AAB-367836C51818</RequestId>
JSON
格式
{
"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"
}
错误码
访问错误中心查看更多错误码。