Modifies the configuration of a specified instance.
Operation description
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
searchengine:UpdateInstance | update |
|
| none |
Request syntax
PUT /openapi/ha3/instances/{instanceId} HTTP/1.1
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.