Help Center> GaussDB> API Reference> APIs (Recommended)> Instance Management> Querying Storage Autoscaling Policies of a DB Instance
Updated on 2024-07-12 GMT+08:00

Querying Storage Autoscaling Policies of a DB Instance

Function

This API is used to query storage autoscaling policies of a DB instance. Before calling this API:

URI

GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auto-enlarge-policy

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID, which is compliant with the UUID format.

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

switch_option

Boolean

Whether to enable or disable storage autoscaling.

limit_volume_size

Integer

Maximum storage that can be automatically scaled to.

min_volume_size

Integer

Minimum storage that can be automatically scaled to.

max_volume_size

Integer

Maximum storage that the system can provide for the instance.

trigger_available_percent

Integer

Percentage of available storage. The storage will be automatically scaled up if the available storage drops to or below the value of this parameter.

percents

Array of integers

Percentages of available storage that you can choose from.

step_size

Integer

Scaling step when the storage is scaled by fixed size.

step_percent

Integer

Scaling step when the storage is scaled by percentage.

Example Request

Querying storage autoscaling policies of a DB instance

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/cc6fd964d93f4003851dfc29d57d30a5in14/auto-enlarge-policy

Example Response

Storage autoscaling policies queried.

{ 
  "switch_option" : true, 
  "limit_volume_size" : 200, 
  "min_volume_size" : 160, 
  "max_volume_size" : 240,
  "trigger_available_percent" : 20,
  "percents": [
        20,
        25,
        50
    ],
   "step_size": 200,
   "step_percent": null
}

Status Code

Error Code

For details, see Error Codes.