BreakerContent
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
scope |
No |
String |
Circuit breaker plug-in type. Options:
|
breaker_condition |
Yes |
PluginBreakerCondition object |
Circuit breaker plug-in condition. |
downgrade_default |
No |
PluginBreakerDowngradeInfo object |
Backend definition for the downgrade policy of the circuit breaker plug-in. |
downgrade_parameters |
No |
Array of PluginCommonParameter objects |
Circuit breaker rule parameters. |
downgrade_rules |
No |
Array of PluginBreakerDowngradeRule objects |
Downgrade rules of the circuit breaker. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
rule_name |
Yes |
String |
Circuit breaker rule name. |
match_regex |
Yes |
String |
Circuit breaker rule expression. For details, see the rule expression description. |
breaker_condition |
No |
PluginBreakerCondition object |
Circuit breaker plug-in condition. |
downgrade_backend |
No |
PluginBreakerDowngradeInfo object |
Backend definition for the downgrade policy of the circuit breaker plug-in. |
parameters |
No |
Array of PluginCommonParameter objects |
Circuit breaker rule parameters. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
breaker_type |
Yes |
String |
Circuit breaker type. Options:
|
breaker_mode |
No |
String |
Circuit breaker condition type. Options:
|
unhealthy_condition |
No |
String |
Rule expression. For details, see the rule expression description. |
unhealthy_threshold |
No |
Integer |
Number of requests to trigger unhealthy conditions. This parameter is required when breaker_mode is set to counter. |
min_call_threshold |
No |
Integer |
Minimum number of requests to trigger the circuit breaker. This parameter is required when breaker_mode is set to percentage. |
unhealthy_percentage |
No |
Integer |
Minimum percentage of unhealthy conditions to trigger the circuit breaker. This parameter is required when breaker_mode is set to percentage. |
time_window |
Yes |
Integer |
Time window for determining the number of unhealthy times. The unit is second. |
open_breaker_time |
Yes |
Integer |
Duration for which the circuit breaker is on. The unit is second. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Circuit breaker downgrade type: http, http_vpc, function, mock, or passthrough. Options:
|
http_info |
No |
HTTP backend definition for the downgrade policy of the circuit breaker plug-in. |
|
http_vpc_info |
No |
HTTP backend load balancing definition for the downgrade policy of the circuit breaker plug-in. |
|
func_info |
No |
Function backend definition for the downgrade policy of the circuit breaker plug-in. |
|
mock_info |
No |
Mock backend definition for the downgrade policy of the circuit breaker plug-in. |
|
passthrough_infos |
No |
Array of PluginBreakerDowngradePassthroughInfo objects |
This parameter is required when the circuit breaker downgrade type is set to "passthrough". |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
address |
Yes |
String |
Backend service address. It consists of a domain name or IP address and a port number. Maximum length: 255 characters. It must be in the format "Host name:Port number", for example, apig.example.com:7443. If the port number is not specified, the default HTTPS port 443 or the default HTTP port 80 is used. |
scheme |
Yes |
String |
Request protocol. Options:
|
method |
Yes |
String |
Request method. Options:
|
path |
Yes |
String |
Request address. The request path can contain a maximum of 512 characters with request parameters enclosed in braces ({}), for example, /getUserInfo/{userId}, and these special characters: */%-_.
NOTE:
The value of this parameter must comply with URI specifications. |
timeout |
Yes |
Integer |
Timeout allowed for requesting the backend service. You can set the maximum timeout using the backend_timeout configuration item. The maximum value is 600,000. Unit: ms. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
vpc_channel_id |
Yes |
String |
Load balance channel ID. |
scheme |
Yes |
String |
Request protocol. Options:
|
method |
Yes |
String |
Request method. |
path |
Yes |
String |
Request address. The request path can contain a maximum of 512 characters with request parameters enclosed in braces ({}), for example, /getUserInfo/{userId}, and these special characters: */%-_.
NOTE:
The value of this parameter must comply with URI specifications. |
timeout |
Yes |
Integer |
Timeout allowed for requesting the backend service. You can set the maximum timeout using the backend_timeout configuration item. The maximum value is 600,000. Unit: ms. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
function_urn |
Yes |
String |
Function URN. |
version |
No |
String |
Version. Either alias or version must be set. |
alias_urn |
No |
String |
Alias. Either alias or version must be set. |
invocation_type |
Yes |
String |
Invocation mode. Options:
|
timeout |
Yes |
Integer |
Timeout allowed for requesting the backend service. You can set the maximum timeout using the backend_timeout configuration item. The maximum value is 600,000. Unit: ms. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
status_code |
Yes |
String |
HTTP status code for the Mock backend. Options:
|
result_content |
No |
String |
Response body. |
headers |
No |
Array of PluginBreakerDowngradeMockHeader objects |
Mock response header. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
No |
String |
Response header name. |
value |
Yes |
String |
Response header value. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
location |
No |
String |
Parameter location: header, query, or path. |
name |
Yes |
String |
Parameter name. Start with a letter and include only letters, digits, hyphens (-), underscores (_), and periods (.). |
origin |
Yes |
String |
Parameter type: constant or system. |
value |
Yes |
String |
Parameter value with a maximum of 255 characters. If the origin type is "constant", the value is a constant. If the origin type is "system", the value is a system parameter name. System parameters include gateway parameters and frontend/backend authentication parameters. You can set the frontend or backend authentication parameters after enabling custom frontend or backend authentication. The gateway parameters are as follows:
Frontend authentication parameter: prefixed with "$context.authorizer.frontend.". For example, to return "aaa" upon successful custom authentication, set this parameter to "$context.authorizer.frontend.aaa". Backend authentication parameter: prefixed with "$context.authorizer.backend.". For example, to return "aaa" upon successful custom authentication, set this parameter to "$context.authorizer.backend.aaa". |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Parameter type. Options:
|
name |
Yes |
String |
Parameter name for "parameters" of "rules". |
value |
Yes |
String |
Parameter source value. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot