Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
20 KiB
Changing the Storage Type of a DB Instance
Function
This API is used to change the storage type of a DB instance.
- Before calling an API, you need to understand the API in Authentication.
- Before calling this API, obtain the required region and endpoint.
Constraints
- The storage type of an instance can be changed only when the instance is in the Available state.
- Changing the storage type may affect storage performance, so the storage type should be changed during off-peak hours.
- If the storage type of a read replica is different from that of its associated DB instance, the data synchronization may be affected. To change the storage type of a DB instance, change that of its read replica (if any) first to ensure that the storage type of the read replica is the same as that of the DB instance.
URI
- Parameter description
Table 1 URI Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
instance_id
Yes
Instance ID.
Request
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Content-Type |
Yes |
String |
The content type. The default value is application/json. |
X-Auth-Token |
Yes |
String |
Specifies the user token. The user token is a response to the API used to obtain a user token. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
change_volume |
Yes |
Object |
Target storage type. For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
volume_code |
Yes |
Integer |
Specification code of the target storage type.
|
Example Request
Change the storage type of an RDS for MySQL primary/standby DB instance to ESSD.
POST https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action
{
"change_volume": {
"volume_code": "rds.mysql.volume.essd.ha"
}
}
Response
- Normal response
Table 5 Response body parameters Parameter
Type
Description
job_id
String
Task ID.
- Example normal response
{ "job_id": "2b414788a6004883a02390e2eb0ea227" } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.