Files
doc-exports/docs/geminidb/api-ref/nosql_05_0109.html
wangdengke2 59805c5073 GeminiDB_API
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>
2026-03-12 09:56:41 +00:00

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

Table 1 URI parameter

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

Table 2 Request header 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

Table 3 Request body parameters

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:

  • on, indicating that autoscaling is enabled for storage space.
  • off, indicating that autoscaling is disabled for storage space.

The default value is on.

policy

No

Array of diskAutoExpansionPolicy

Autoscaling policies for storage space.

Table 4 diskAutoExpansionPolicy

Parameter

Mandatory

Type

Description

threshold

No

Integer

Threshold for triggering autoscaling.

  • GeminiDB Cassandra instance
    • The value can be 80, 85, or 90.
    • The default threshold is 90, indicating that autoscaling is enabled when the used storage space exceeds 90% of total storage space or the available storage space is less than 10 GB.

step

No

Integer

Autoscaling step (s%).

  • GeminiDB Cassandra instance
    • The value can be 10, 15, or 20, and the default value is 10.
    • After autoscaling is enabled, storage space will increase by s% automatically.
NOTE:
  • GeminiDB Cassandra instance
    • If the autoscaling step is not a multiple of 10, round it up.
    • The value after the decimal point is rounded. The minimum step is 100 GB by default.

size

No

Integer

Storage limit in GB that autoscaling can increase storage space to.

  • GeminiDB Cassandra instance
    • Storage upper limit ≥ Current storage + 100 GB
    • The upper limit cannot exceed the maximum storage supported by the current specifications.
    • The value cannot be specified during batch autoscaling. By default, the storage is scaled up to the maximum defined by your instance specifications.

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 
        } 
      }
  • 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"
      }

Example Responses

Status code: 204

No Content

{ }

Status Codes

See Status Codes.

Error Codes

See Error Codes.