Updates a circuit breaking rule.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
mse:UpdateCircuitBreakerRule | update | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Namespace | string | Yes | The microservice namespace to which the application belongs. | default |
AppName | string | Yes | The name of the application. | spring-cloud-a |
Threshold | float | No | A percentage threshold for triggering circuit breaking. Valid values: 0-1. These values represent 0% to 100%. | 0.8 |
Enable | boolean | No | Specifies whether to enable the rule. Valid values:
| true |
AppId | string | No | The ID of the application. | hkhon1po62@c3df23522bXXXXX |
Strategy | integer | No | The threshold type. Valid values:
| 0 |
RetryTimeoutMs | integer | No | The period in which circuit breaking is implemented. Unit: milliseconds. If circuit breaking is implemented on the requests for the route, the calls to all the requests for the route fail in the configured circuit breaking period. The value must be an integral multiple of 1,000. Default value: 10000. This value indicates 10 seconds. | 10000 |
StatIntervalMs | integer | No | The length of the time window. Unit: milliseconds. The valid range is from 1 second to 120 minutes. The default value is 20000. This value indicates 20 seconds. | 20000 |
MaxAllowedRtMs | integer | No | The maximum response time (RT). Unit: milliseconds. If the RT of a request is greater than the value of this parameter, a slow call is counted. If you set Strategy to 0, you must specify this parameter. | 200 |
MinRequestAmount | integer | No | The minimum number of requests to trigger circuit breaking. If the number of requests in the current time window is less than the value of this parameter, circuit breaking is not triggered even if the circuit breaking rule is met. Default value: 10. | 10 |
HalfOpenBaseAmountPerStep | integer | No | The minimum number of requests that can be passed in each step after circuit breaking recovers. Default value: 1. | 5 |
HalfOpenRecoveryStepNum | integer | No | The number of circuit breaking recovery steps. Default value: 1. | 1 |
RuleId | long | Yes | The rule ID. | 1 |
AcceptLanguage | string | No | The language of the response. Valid values: zh-CN and en-US. Default value: zh-CN. The value zh-CN indicates Chinese, and the value en-US indicates English. | zh |
Response parameters
Examples
Sample success responses
JSON
format
{
"Message": "OK",
"RequestId": "EE5C32A1-BC0E-4B79-817C-103E4EDF****",
"Code": "200",
"Data": {
"Namespace": "default",
"Id": 1,
"AppName": "spring-cloud-a",
"Resource": "/a",
"Strategy": 0,
"Threshold": 0.8,
"Enable": true,
"RetryTimeoutMs": 10000,
"StatIntervalMs": 20000,
"AppId": "hkhon1po62@c3df23522bXXXXX",
"MaxAllowedRtMs": 200,
"MinRequestAmount": 10,
"HalfOpenBaseAmountPerStep": 5,
"HalfOpenRecoveryStepNum": 1
},
"Success": true
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | IllegalRequest | Invalid request:%s | Invalid request: %s |
400 | InvalidParameter | Parameter error:%s | Request parameter error: %s |
403 | NoPermission | You are not authorized to perform this operation:%s | You do not have the permission to use this interface:%s |
404 | NotFound | Not found:%s | The resource does not exist:%s |
500 | InternalError | Console error. Try again later:%s | Console error. Try again later: %s |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|