CreateFlowRule_应用高可用服务_API文档

插件下载了解更多
VS Code 插件
安装插件之前,确保已安装 VS Code安装插件之前,确保已安装 VS Code
Alibaba Cloud Developer Toolkit is a collection of extensions that can help access Alibaba Cloud services in Visual Studio Code.
JetBrains 插件
安装插件之前,确保已安装 JetBrains IDE安装插件之前,确保已安装 JetBrains IDE
The Alibaba Cloud Developer Toolkit for JetBrains makes it easier to access Alibaba Cloud services.

流控信息

当前云产品API请求速率暂未透出。

授权信息

如下是此API对应的授权信息,用于RAM权限策略语句的Action元素中,为RAM用户或RAM角色授予调用此API的权限。请通过 RAM 访问控制设置,使用方法可参考访问控制帮助文档

具体说明如下:展开详情

操作访问级别资源类型条件关键字关联操作
暂无数据

请求参数

字段名称字段详情
Namespacestring

命名空间。

示例值:default
AppNamestring

应用名,若为 EDAS 应用,则 AppName 为 EDAS 中的 App ID,可在 EDAS 控制台“应用管理>基本信息”中查看对应的 ID。

示例值:ahas-demo
RelationStrategyinteger<int32>

统计维度。0 表示当前接口,1 表示关联接口,2 表示链路入口。

示例值:0
Thresholdnumber<float>

流控规则的阈值,取值范围为≥0 的整数。

示例值:50
Enableboolean

规则是否开启,默认为 false。

示例值:true
Resourcestring

资源名。不能超过 1024 个字符,且该资源名需要与接口详情页面的资源名称相对应。

示例值:handleServiceA
LimitOriginstring

来源应用,默认为 default。

示例值:default
RefResourcestring

关联接口名、入口资源名。当统计维度 relationStrategy 值为 1(关联接口)或 2(链路入口)时,需要设置该字段。

示例值:handleServiceB参考取值来源:
    ListFlowRulesOfResource
ControlBehaviorinteger<int32>

流控效果。0 表示快速失败,1 表示预热启动,2 表示排队等待。

示例值:0
WarmUpPeriodSecinteger<int32>

预热时间,单位秒。当 controlBehavior 值为 1(预热启动)时,需要设置该字段。

示例值:30
MaxQueueingTimeMsinteger<int32>

超时时间,单位毫秒。当 controlBehavior 值为 2(排队等待)时,需要设置该字段。

示例值:2000
AhasRegionIdstring

地域。

示例值:cn-hangzhou
ThresholdModeinteger<int32>

流控阈值模式。

示例值:2

请求说明

详细参数解释,请参见配置流控规则

返回参数

字段名称字段详情
Messagestring

错误信息。

示例值:null
RequestIdstring

请求 ID。

示例值:3FEEAD12-CE22-4EDE-A729-CE94E*****10
Codestring

返回码。返回 200 代表成功。

示例值:200
Dataobject

返回数据。

Successboolean

是否成功。

示例值:true

返回示例

错误码

全局错误码
HTTP 状态码错误码错误信息操作
400
IllegalArgument.AppName
The specified AppName is invalid.诊断
400
IllegalArgument.MaxQueueingTimeM
The specified MaxQueueingTimeMs is invalid.诊断
400
IllegalArgument.Namespace
The specified Namespace is invalid.诊断
400
IllegalArgument.RefResource
The specified RefResource is invalid.诊断
400
IllegalArgument.RelationStrategy
The specified RelationStrategy is invalid.诊断
400
IllegalArgument.Resource
The specified Resource is invalid.诊断
400
IllegalArgument.Threshold
The specified Threshold is invalid.诊断
400
IllegalArgument.WarmUpPeriodSec
The specified WarmUpPeriodSec is invalid.诊断

变更历史

变更时间变更内容概要操作
2022-10-14
新增请求参数ThresholdMode
变更返回参数

相关示例

AHAS Sentinel 流控规则 API 示例
2021-12-22