Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ SQL Throttling/ Modifying a SQL Throttling Task

Modifying a SQL Throttling Task

Updated on 2024-11-07 GMT+08:00

Function

This API is used to modify a SQL throttling task based on the specific scope and type. Before calling this API:

URI

PUT https://{Endpoint}/v3/{project_id}/instances/{instance_id}/limit-task/{task_id}

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Explanation:

Project ID of a tenant in a region.

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

Restrictions:

None

Value range:

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

Default value:

None

instance_id

Yes

Instance ID.

task_id

Yes

Throttling task ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

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

After the request is processed, the value of X-Subject-Token in the message header is the token value.

X-Language

No

String

Language.

Default value: en-us

Value range:

  • zh-cn
  • en-us
Table 3 Request body parameters

Parameter

Mandatory

Type

Description

start_time

No

String

Task start time. This parameter is mandatory when task_scope is set to SQL.

Value range: two minutes later than or equal to the current time (UTC time).

The format must be yyyy-mm-ddThh:mm:ss+0000.

end_time

No

String

Task end time. This parameter is mandatory when task_scope is set to SQL.

Value range: later than the task start time.

The format must be yyyy-mm-ddThh:mm:ss+0000.

key_words

No

String

Keyword. This parameter is mandatory when limit_type is set to SQL_TYPE.

You can enter 2 to 100 keywords and separate multiple keywords by commas (,). Each keyword can contain 2 to 64 characters and cannot start and end with a space. The specifical characters ("\{}) and null are not allowed.

task_name

No

String

Name of the SQL throttling task. The value can contain up to 100 characters. Only uppercase letters, lowercase letters, underscores (_), digits, and dollar signs ($) are allowed.

parallel_size

No

Integer

Maximum concurrency. The value can be 0 or a positive integer. Value range: [0, 2147483647]

cpu_utilization

No

Integer

CPU usage threshold. The value is an integer ranging from [0, 100).

This parameter is mandatory when limit_type is set to SESSION_ACTIVE_MAX_COUNT.

This parameter and memory_utilization cannot be both set to 0. If you only need one of them for throttling, set the other threshold to 0.

memory_utilization

No

Integer

Memory usage threshold. The value is an integer ranging from [0, 100).

This parameter is mandatory when limit_type is set to SESSION_ACTIVE_MAX_COUNT.

This parameter and cpu_utilization cannot be both set to 0. If you only need one of them for throttling, set the other threshold to 0.

databases

No

String

Databases of the instance. Databases are separated by commas (,).

This parameter is mandatory when limit_type is set to SQL_TYPE.

Response Parameters

Table 4 Response body parameters

Parameter

Type

Description

task_id

String

Throttling task ID.

databases

String

Databases of the instance. Databases are separated by commas (,).

task_name

String

Throttling task name.

key_words

String

Keyword. This parameter is returned only when the task type is SQL_TYPE.

parallel_size

Integer

Maximum concurrency.

cpu_utilization

Integer

CPU usage threshold. This parameter is returned with only its integer part retained when the task type is SESSION_ACTIVE_MAX_COUNT.

memory_utilization

Integer

Memory usage threshold. This parameter is returned with only its integer part retained when the task type is SESSION_ACTIVE_MAX_COUNT.

start_time

String

Start time of the throttling task. The format is yyyy-mm-ddThh:mm:ssZ. This parameter is returned when task_scope is set to SQL.

end_time

String

End time of the throttling task. The format is yyyy-mm-ddThh:mm:ssZ. This parameter is returned when task_scope is set to SQL.

rule_name

String

Rule name.

job_id

String

Job ID.

Example Request

  • Modifying a throttling task whose type is SQL_ID
    https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/3d39c18788b54a919bab633874c159dfin14/limit-task/96854ba7-8d50-4a3c-8fd8-210a7390e9d1
    {
      "start_time" : "2024-08-20T06:54:42+0800",
      "end_time" : "2024-08-20T07:54:42+0800",
      "task_name" : "SOLIdLimit",
      "parallel_size" : 10
    }
  • Modifying a throttling task whose type is SQL_TYPE
    https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/3d39c18788b54a919bab633874c159dfin14/limit-task/96854ba7-8d50-4a3c-8fd8-210a7390e9d1
    {
      "start_time" : "2024-08-20T06:54:42+0800",
      "end_time" : "2024-08-20T07:54:42+0800",
      "key_words" : "version,type",
      "task_name" : "KeywordLimit",
      "parallel_size" : 10,
      "databases" : "gaussdb_test3"
    }
  • Modifying a throttling task whose type is SESSION_ACTIVE_MAX_COUNT
    https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/3d39c18788b54a919bab633874c159dfin14/limit-task/96854ba7-8d50-4a3c-8fd8-210a7390e9d1
    {
      "task_name": "ThresholdLimit",
      "parallel_size": 10,
      "cpu_utilization": 20,
      "memory_utilization": 20
    }

Example Response

  • Throttling task whose type is SQL_ID modified.
    {
        "task_id": "bca08a79-8557-42c2-ab73-09a14d178c57",
        "task_name": "SOLIdLimit",
        "parallel_size": 10,
        "start_time": "2024-08-19T22:54:42Z",
        "end_time": "2024-08-19T23:54:42Z",
        "job_id": "d44bbbc3-4465-4079-ac71-d8e7ab0643a4"
    }
  • Throttling task whose type is SQL_TYPE modified.
    {
        "task_id": "ef8575c7-0133-43b4-8ab2-b950b9a6daaf",
        "databases": "gaussdb_test3",
        "task_name": "KeywordLimit",
        "key_words": "type,version",
        "parallel_size": 10,
        "start_time": "2024-08-19T22:54:42Z",
        "end_time": "2024-08-19T23:54:42Z",
        "job_id": "40e2e10f-6f4c-4883-9db7-5422f42187cc"
    }
  • Throttling task whose type is SESSION_ACTIVE_MAX_COUNT modified.
    {
        "task_id": "37b6232c-58ea-4d62-a5b5-54fc215c2115",
        "task_name": "ThresholdLimit",
        "parallel_size": 10,
        "cpu_utilization": 20,
        "memory_utilization": 20,
        "job_id": "0ec7109d-bc8f-41f6-9a78-a70f966739fc"
    }

Status Code

Error Code

For details, see Error Codes.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback