Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com> Co-authored-by: Ru, Li Yi <liyiru7@huawei.com> Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
12 KiB
Changing vCPUs and Memory of a DB Instance
Function
This API is used to change the vCPUs and memory of a DB instance. Before calling this API:
- Learn how to authenticate this API.
- Understand the API in Using APIs.
- Obtain the required region and endpoint.
Constraints
- Currently, the instance specifications can only be scaled out. The new vCPUs and memory of an instance must be greater than the old vCPUs and memory.
- The OS architecture of the new specifications must be the same as that of the old specifications.
URI
- URI format
PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/flavor
- Example
https://gaussdb.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in14/flavor
- Parameter description
Table 1 Parameter description Name
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain this value, see Obtaining a Project ID.
instance_id
Yes
DB instance ID.
Request
- Parameter description
Table 2 Parameter description Name
Mandatory
Type
Description
flavor_ref
Yes
String
New specification code. For details on how to obtain the specification code, see Table 1.
Example Request
Changing the specifications of a pay-per-use DB instance from 4 vCPUs and 32 GB to 8 vCPUs and 64 GB
{ "flavor_ref":"gaussdb.opengauss.ee.dn.m4.2xlarge.8.in" }
Response
- Normal response
Table 3 Parameter description Name
Type
Description
job_id
String
Job ID for changing instance specifications. This parameter is returned only when you change the specifications of a pay-per-use instance.
- 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.