Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Instance Management/ Modifying a Storage Autoscaling Policy
Updated on 2025-10-20 GMT+08:00

Modifying a Storage Autoscaling Policy

Function

This API is used to modify a storage autoscaling policy. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

PUT /v3/{project_id}/instances/{instance_id}/auto-enlarge-policy

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language.

Constraints

N/A

Range

  • zh-cn
  • en-us

Default Value

en-us

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

switch_option

No

Boolean

Definition

Whether to enable or disable storage autoscaling.

Constraints

N/A

Range

  • true
  • false

Default Value

false

limit_volume_size

No

Integer

Definition

Maximum storage that can be automatically scaled to.

Constraints

N/A

Range

N/A

Default Value

N/A

trigger_available_percent

No

Integer

Definition

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

Constraints

N/A

Range

0–100

Default Value

20

step_size

No

Integer

Definition

Scaling step when the storage is scaled by fixed size.

Constraints

Multiple of 40

Range

N/A

Default Value

40

step_percent

No

Integer

Definition

Scaling step when the storage is scaled by percentage.

Constraints

The value cannot be less than 1.

Range

N/A

Default Value

20

Response Parameters

None

Example Request

Modifying a storage autoscaling policy

PUT https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/cc6fd964d93f4003851dfc29d57d30a5in14/auto-enlarge-policy
{
	"switch_option": true,
	"trigger_available_percent": 20,
	"limit_volume_size": 120,
	"step_percent": 20
}

Example Response

Storage autoscaling policy modified.

{}

Status Codes

Error Codes

For details, see Error Codes.