Modifies the configuration of a specified instance.
Operation description
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request syntax
PUT /openapi/ha3/instances/{instanceId}
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
instanceId | string | No | The instance ID. | ha-cn-2r42mu9xi01 |
body | object | No | The request body. | |
components | array<object> | No | The information about the instance specification. | |
object | No | The request body. | ||
code | string | No | The code of the specification, which must be consistent with the value that you specify on the buy page. | 200 |
value | string | No | The value of the specification. | "" |
orderType | string | No | The type of the order. Valid values: UPGRADE and DOWNGRADE. UPGRADE upgrades the instance specifications. DOWNGRADE: downgrades the instance specifications. | "" |
description | string | No | The description of the instance. | "" |
Response parameters
Examples
Sample success responses
JSON
format
{
"result": {
"description": "Test instance\n",
"resourceGroupId": "rg-aeky6hthboewpuy",
"expiredTime": "2019-01-06T16:00:00.0",
"commodityCode": "ha3-code",
"status": "Running",
"instanceId": "ha-cn-0ju2s170b03",
"createTime": "2018-12-06T11:17:49.0",
"lockMode": "Unlock",
"chargeType": "PrePaid",
"updateTime": "2018-12-06T11:17:49.0",
"inDebt": false
},
"requestId": "90D6B8F5-FE97-4509-9AAB-367836C51818"
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-03-02 | The internal configuration of the API is changed, but the call is not affected | View Change Details |
2022-01-12 | Add Operation | View Change Details |
Example
Sample requests
PUT /openapi/ha3/instances/ha-cn-xxxxxx
{
"description": "the new description"
}
or
{
"resourceGroupId": "the new resourceGroupId"
}
Sample responses
Success responses
{
"result": {
"instanceId": "airec-cn-o400whm78004",
"description": "airec-cn-o400whm78004",
"status": "Running",
"chargeType": "PrePaid",
"commodityCode": "airecpre",
"createTime": "2018-12-06T11:17:49.0",
"updateTime": "2018-12-06T11:17:49.0",
"expiredTime": "2019-01-06T16:00:00.0",
"resourceGroupId": "rg-abcdefg",
"lockMode": "Unlock",
"inDebt": false,
"spec": {
"password": "passwd",
"searchResource": {
"disk": 50,
"mem": 8,
"cpu": 2,
"nodeCount": 2
},
"instanceName": "testInstance",
"vSwitchId": "vswitch_id_xxx",
"vpcId": "vpc_id_xxx",
"qrsResource": {
"disk": 50,
"mem": 8,
"cpu": 2,
"nodeCount": 2
},
"region": "cn-hangzhou",
"userName": "user"
},
"status": {
"phase": "PENDING",
"instancePhase": "INIT",
"createSuccess": false
}
},
"requestId": "90D6B8F5-FE97-4509-9AAB-367836C51818"
}
For more information, see Response struct.