Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ SQL Throttling (RDS for PostgreSQL)/ Enabling or Disabling a SQL Throttling Rule or Disabling All SQL Throttling Rules
Updated on 2025-08-20 GMT+08:00

Enabling or Disabling a SQL Throttling Rule or Disabling All SQL Throttling Rules

Function

This API is used to enable or disable a SQL throttling rule or disable all SQL throttling rules.

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/sql-limit/switch

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

db_name

Yes

String

Definition

Database name.

Constraints

N/A

Range

N/A

Default Value

N/A

id

Yes

String

Definition

SQL throttling rule ID.

Constraints

N/A

Range

N/A

Default Value

N/A

action

Yes

String

Definition

Action applied to the SQL throttling rule.

Constraints

N/A

Range

  • open: Enable the SQL throttling rule.
  • close: Disable the SQL throttling rule.
  • disable_all: Disable all SQL throttling rules.

Default Value

N/A

Example Request

Enable a SQL throttling rule.

PUT https://rds.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/ 49b9dd1d6f464ba4bc91df5cbd2e52ebin03/sql-limit/switch

{ 
   "db_name" : "postgres", 
   "id" : "1", 
   "action" : "open" 
 }

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    resp

    String

    Definition

    Calling result.

    Range

    Returns successful if the calling is successful.

Status Code

Error Code

For details, see Error Codes.