All Products
Search
Document Center

Microservices Engine:ListCircuitBreakerRules

Last Updated:Jul 22, 2025

Queries circuit breaker rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that support authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mse:ListCircuitBreakerRules

list

*All Resource

*

None 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

ResourceSearchKey

string

No

The interface keyword in the protection rule.

a

AppId

string

No

The ID of the application.

hkhon1po62@c3df23522bXXXXX

Resource

string

No

The interface for which the protection rule is configured.

/a

PageIndex

integer

No

The first page number. Default value: 1.

1

PageSize

integer

No

The number of entries per page. Default value: 6.

10

AcceptLanguage

string

No

The language in which you want the results to be displayed. Valid values: zh-CN (default value): Chinese. en-US: English

zh

Response parameters

Parameter

Type

Description

Example

object

Code

integer

The response code.

200

Message

string

The response message.

OK

RequestId

string

The ID of the request.

4E9FDCFE-0738-493B-B801-82BDFBCB****

Success

boolean

The result of the request.

true

Data

object

The rules.

Result

array

The returned result.

object

Namespace

string

The microservice namespace to which the application belongs.

default

RuleId

integer

The ID of the rule.

1

AppName

string

The name of the application.

spring-cloud-a

Resource

string

The name of the interface to which the rule applies. The interface name must be the same as that displayed on the API Details page in the console.

/a

ResourceType

integer

The interface resource type.

Strategy

integer

The threshold type.

0

Threshold

number

A percentage threshold for triggering circuit breaking. Valid values: 0-1. These values represent 0% to 100%.

0.8

Enable

boolean

Indicates whether the rule is enabled.

true

RetryTimeoutMs

integer

The period in which circuit breaking is implemented. Unit: milliseconds. If circuit breaking is implemented on the resources, all requests quickly fail in the configured duration.

10000

StatIntervalMs

integer

The length of the time window. Unit: milliseconds. The valid range is from 1 second to 120 minutes.

20000

AppId

string

The ID of the application.

hkhon1po62@c3df23522bXXXXX

RegionId

string

The region in which the cluster resides.

cn-hangzhou

FallbackObject

string

The behavior that was bound to the rule.

"{\"appName\":\"spring-cloud-a\",\"fallbackBehavior\":{\"webFallbackMode\":0,\"webRespContentType\":0,\"webRespMessage\":\"Blocked\",\"webRespStatusCode\":429},\"id\":977,\"name\":\"Fallback\",\"namespace\":\"default\",\"resourceClassification\":1}"

MaxAllowedRtMs

integer

The maximum 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

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.

10

HalfOpenBaseAmountPerStep

integer

The minimum number of requests that can be passed in each step after circuit breaking recovers.

5

HalfOpenRecoveryStepNum

integer

The number of circuit breaking recovery steps.

1

PageNumber

integer

The first page number.

1

PageSize

integer

The number of entries per page.

10

TotalSize

integer

The total number of pages.

3

HttpStatusCode

integer

The HTTP status code.

200

Examples

Success response

JSON format

{
  "Code": 200,
  "Message": "OK",
  "RequestId": "4E9FDCFE-0738-493B-B801-82BDFBCB****",
  "Success": true,
  "Data": {
    "Result": [
      {
        "Namespace": "default",
        "RuleId": 1,
        "AppName": "spring-cloud-a",
        "Resource": "/a",
        "ResourceType": 0,
        "Strategy": 0,
        "Threshold": 0.8,
        "Enable": true,
        "RetryTimeoutMs": 10000,
        "StatIntervalMs": 20000,
        "AppId": "hkhon1po62@c3df23522bXXXXX",
        "RegionId": "cn-hangzhou",
        "FallbackObject": "\"{\\\"appName\\\":\\\"spring-cloud-a\\\",\\\"fallbackBehavior\\\":{\\\"webFallbackMode\\\":0,\\\"webRespContentType\\\":0,\\\"webRespMessage\\\":\\\"Blocked\\\",\\\"webRespStatusCode\\\":429},\\\"id\\\":977,\\\"name\\\":\\\"Fallback\\\",\\\"namespace\\\":\\\"default\\\",\\\"resourceClassification\\\":1}\"",
        "MaxAllowedRtMs": 200,
        "MinRequestAmount": 10,
        "HalfOpenBaseAmountPerStep": 5,
        "HalfOpenRecoveryStepNum": 1
      }
    ],
    "PageNumber": 1,
    "PageSize": 10,
    "TotalSize": 3
  },
  "HttpStatusCode": 200
}

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
500 InternalError Console error. Try again later:%s Console error. Try again later: %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

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.