Updates a monitoring rule.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateQualityRule

The operation that you want to perform.

Id Long Yes 1234

The ID of the rule.

ProjectName String Yes autotest

The name of the database engine or data source.

BlockType Integer No 0

The strength of the rule. 0 weak rule, 1 strong rule

EntityId Long No 123

The ID of the partition filter expression.

Comment String No Check table rows

The description of the rule.

Checker Integer No 9


ExpectValue String No 300

The expected value of the checker. Range: varchar (255)

Trend String No up

The trend of the expected value. The value of up is increased, that of down is decreased, and the absolute value of abs is decreased.

MethodName String No table_count

Collection method.

Operator String No >

The comparison operator.

Property String No id

The name of the field to be sampled.

PropertyType String No bigint

The type of the field.

RuleType Integer No 0

The type of the rule. 0 system definition 1 customization 2 project level rules

WhereCondition String No dt=$[yyyymmdd]

Or custom SQL.

CriticalThreshold String No 10

The error threshold. Range: varchar (255)

WarningThreshold String No 5

The warning threshold. Range: varchar (255)

TemplateId Integer No 7

The ID of the launch template.

RegionId String No cn-shanghai

The ID of the region where your project resides.

RuleName String No Rules for rows in a verification table

The name of the rule.

PredictType Integer No 0

Identification of dynamic threshold type. 0 indicates statistical analysis rules, and 2 indicates dynamic threshold rules.

Response parameters

Parameter Type Example Description
Data Boolean true

Indicates whether the rule is updated.

ErrorCode String 0

The error code.

ErrorMessage String You have no permission.

The error message.

HttpStatusCode Integer 200

The HTTP status code.

RequestId String 576b9457-2cf5-4****

The ID of the request.

Success Boolean true

Indicates whether the request was successful.


Sample requests

     http(s)://[Endpoint]/? Action=UpdateQualityRule &Id=1234 &ProjectName=autotest &<common request parameters> 

Sample success responses

XML format

     <RequestId>576b9457-2cf5-4****</RequestId> <HttpStatusCode>200</HttpStatusCode> <Data>true</Data> <ErrorCode>0</ErrorCode> <ErrorMessage>You have no permission. </ErrorMessage> <Success>true</Success> 


     { "RequestId": "576b9457-2cf5-4****", "HttpStatusCode": 200, "Data": true, "ErrorCode": 0, "ErrorMessage": "You have no permission.", "Success": true } 

Error codes

Go to the Error Center For more information, see error codes.