All Products
Search
Document Center

Microservices Engine:ListFlowRules

Last Updated:Nov 20, 2024

Obtains a list of throttling rules.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
mse:ListFlowRuleslist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
NamespacestringYes

The namespace.

default
AppNamestringYes

The name of the application.

xx-demo
ResourceSearchKeystringNo

The keyword that is used for the search.

/a
AppIdstringNo

The ID of the application.

hkhon1po62@c3df23522******
ResourcestringNo

The name of the resource.

/a
PageIndexintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page.

10
AcceptLanguagestringNo

The language of the response. Valid values:

  • zh: Chinese
  • en: English
zh

Response parameters

ParameterTypeDescriptionExample
object
Codeinteger

The HTTP status code.

200
Messagestring

The returned message.

RequestIdstring

The request ID.

316F5F64-F73D-42DC-8632-01E308B6****
Successboolean

Indicates whether the request was successful.

Valid values:

  • true

    :

    The request was successful.

  • false

    :

    The request failed.

true
Dataobject

The details of the data.

Resultarray<object>

The data returned.

Resultobject
Namespacestring

The namespace.

default
RuleIdlong

The rule ID.

2
AppNamestring

The application name.

finance
Resourcestring

The name of the interface resource.

/a
ControlBehaviorinteger

The throttling effect.

Valid values:

  • 0

    :

    fast failure

  • 2

    :

    in queue

0
MaxQueueingTimeMsinteger

The timeout period for queuing when the value of ControlBehavior is set to 2. Unit: milliseconds.

500
Thresholdfloat

The throttling threshold.

10
Enableboolean

Indicates whether the throttling rule was enabled.

Valid values:

  • true

  • false

true
AppIdstring

The ID of the application.

hkhon1po62@5f1b08becb*****
RegionIdstring

The ID of the region in which the instance resides.

cn-hangzhou
FallbackObjectstring

The throttling behavior.

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

The statistical dimension. The value 1 indicates that the number of accepted requests is used for statistics.

1
TrafficTagsobject

A reserved parameter.

{\"origin\":\"default\"}
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

10
TotalSizeinteger

The total number of entries.

11
HttpStatusCodeinteger

The HTTP status code.

200

Examples

Sample success responses

JSONformat

{
  "Code": 200,
  "Message": "",
  "RequestId": "316F5F64-F73D-42DC-8632-01E308B6****",
  "Success": true,
  "Data": {
    "Result": [
      {
        "Namespace": "default",
        "RuleId": 2,
        "AppName": "finance",
        "Resource": "/a",
        "ResourceType": 0,
        "ControlBehavior": 0,
        "MaxQueueingTimeMs": 500,
        "Threshold": 10,
        "Enable": true,
        "AppId": "hkhon1po62@5f1b08becb*****",
        "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}\"",
        "MetricType": 1,
        "TrafficTags": {
          "test": "test",
          "test2": 1
        }
      }
    ],
    "PageNumber": 1,
    "PageSize": 10,
    "TotalSize": 11
  },
  "HttpStatusCode": 200
}

Error codes

HTTP status codeError codeError messageDescription
400IllegalRequestInvalid request:%sInvalid request: %s
400InvalidParameterParameter error:%sRequest parameter error: %s
403NoPermissionYou are not authorized to perform this operation:%sYou do not have the permission to use this interface:%s
404NotFoundNot found:%sThe resource does not exist:%s
500InternalErrorConsole error. Try again later:%sConsole error. Try again later: %s

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-12-19The response structure of the API has changedView Change Details