All Products
Search
Document Center

Microservices Engine:ListCircuitBreakerRules

Last Updated:Jun 10, 2026

Mengkueri aturan Pemutus sirkuit.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mse:ListCircuitBreakerRules

list

*All Resource

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Namespace

string

Yes

Namespace layanan mikro tempat aplikasi berada.

default

AppName

string

Yes

Nama aplikasi.

spring-cloud-a

ResourceSearchKey

string

No

Kata kunci antarmuka dalam aturan perlindungan.

a

AppId

string

No

ID aplikasi.

hkhon1po62@c3df23522bXXXXX

Resource

string

No

Antarmuka yang dikonfigurasi aturan perlindungannya.

/a

PageIndex

integer

No

Nomor halaman pertama. Nilai default: 1.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai default: 6.

10

AcceptLanguage

string

No

Bahasa yang digunakan untuk menampilkan hasil. Nilai valid: zh-CN (nilai default): Bahasa Mandarin. en-US: Bahasa Inggris.

zh

Elemen respons

Element

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<object>

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.

1

Strategy

integer

The threshold type.

Valid values:

  • 0 :

    慢调用比例

  • 1 :

    异常比例

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

Contoh

Respons sukses

JSONformat

{
  "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": 1,
        "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
}

Kode kesalahan

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

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.