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>
18 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 |
---|---|---|---|
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
For details, see Status Codes.
Error Codes
For details, see Error Codes.