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>
17 KiB
Configuring an Autoscaling Policy for Storage Space
Function
This API is used to configure an autoscaling policy for storage space.
Constraints
- This API supports GeminiDB Cassandra instances.
- This API supports both pay-per-use and yearly/monthly instances.
- If the instance status is not normal, autoscaling of storage space cannot be configured.
URI
PUT https://{Endpoint}/v3/{project_id}/instances/disk-auto-expansion
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
Content-Type |
Yes |
String |
MIME type of the request body. application/json is recommended. |
X-Auth-Token |
Yes |
String |
User token |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
instance_ids |
Yes |
Array of strings |
IDs of the instances where autoscaling is enabled for storage space. Up to 50 instances are supported. |
switch_option |
No |
String |
Whether autoscaling is enabled. The value can be:
The default value is on. |
policy |
No |
Array of diskAutoExpansionPolicy |
Autoscaling policies for storage space. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
threshold |
No |
Integer |
Threshold for triggering autoscaling.
|
step |
No |
Integer |
Autoscaling step (s%).
NOTE:
|
size |
No |
Integer |
Storage limit in GB that autoscaling can increase storage space to.
|
Response Parameters
Status code: 204
No response parameters
Example Requests
- Enabling the autoscaling policy of storage space
- URI example
POST https://{Endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/disk-auto-expansion - Enabling autoscaling for storage space (Set threshold to 90, step to 10, and size to 600.)
{ "instance_ids" : [ "93e4b3eda14349b1b870f72829bc3b9bin06" ], "policy" : { "threshold" : 90, "step" : 10, "size" : 600 } }
- URI example
- Disabling the autoscaling policy of storage space
- URI example
POST https://{Endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/disk-auto-expansion - Disabling the autoscaling policy of storage space
{ "instance_ids" : [ "93e4b3eda14349b1b870f72829bc3b9bin06" ], "switch_option":"off" }
- URI example
Example Responses
Status code: 204
No Content
{ }
Status Codes
See Status Codes.
Error Codes
See Error Codes.