调用ListDegradeRulesOfApp接口获取应用降级规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListDegradeRulesOfApp |
系统规定参数。取值:ListDegradeRulesOfApp。 |
AppName | String | 是 | ahas-demo |
应用名,若为EDAS应用,则AppName为EDAS中的App ID,可在EDAS控制台“应用管理>基本信息”中查看对应的ID。 |
Namespace | String | 是 | default |
命名空间。 |
PageIndex | Integer | 否 | 1 |
当前页码,默认为1。 |
PageSize | Integer | 否 | 10 |
每页数据条数,默认为10。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
Code | String | 200 |
返回码 |
Data | Struct |
返回数据 |
|
Datas | Array of Datas |
降级规则列表 |
|
AppName | String | ahas-demo |
应用名,若为EDAS应用,则AppName为EDAS中的App ID,可在EDAS控制台“应用管理>基本信息”中查看对应的ID。 |
Enable | Boolean | true |
规则是否开启 |
HalfOpenBaseAmountPerStep | Integer | 5 |
熔断恢复每步最小通过数目,默认值为5。 |
HalfOpenRecoveryStepNum | Integer | 1 |
熔断恢复阶段数 |
MinRequestAmount | Integer | 10 |
触发熔断的最小请求数 |
Namespace | String | default |
命名空间 |
RecoveryTimeoutMs | Integer | 5000 |
熔断时长 |
Resource | String | handleServiceA |
资源名 |
RuleId | Long | 123 |
规则ID |
SlowRtMs | Integer | 2000 |
慢调用RT |
StatDurationMs | Integer | 2000 |
统计窗口时长 |
Strategy | Integer | 0 |
阈值类型 |
Threshold | Float | 0.6 |
降级阈值 |
PageIndex | Integer | 1 |
当前页码 |
PageSize | Integer | 10 |
每页数据条数 |
TotalCount | Integer | 23 |
总数据量 |
TotalPage | Integer | 3 |
总页数 |
Message | String | null |
错误信息 |
RequestId | String | 3FEEAD12-CE22-4EDE-A729-CE94EC070610 |
请求ID |
Success | Boolean | true |
是否成功 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListDegradeRulesOfApp
&AppName=ahas-demo
&Namespace=default
&<公共请求参数>
正常返回示例
XML
格式
<Message>null</Message>
<RequestId>3FEEAD12-CE22-4EDE-A729-CE94EC070610</RequestId>
<Data>
<TotalCount>23</TotalCount>
<PageSize>10</PageSize>
<TotalPage>3</TotalPage>
<Datas>
<MinRequestAmount>10</MinRequestAmount>
<RuleId>123</RuleId>
<Resource>handleServiceA</Resource>
<SlowRtMs>2000</SlowRtMs>
<Namespace>default</Namespace>
<AppName>ahas-demo</AppName>
<HalfOpenRecoveryStepNum>1</HalfOpenRecoveryStepNum>
<RecoveryTimeoutMs>5000</RecoveryTimeoutMs>
<Enable>true</Enable>
<Strategy>0</Strategy>
<HalfOpenBaseAmountPerStep>5</HalfOpenBaseAmountPerStep>
<StatDurationMs>2000</StatDurationMs>
<Threshold>0.6</Threshold>
</Datas>
<PageIndex>1</PageIndex>
</Data>
<Code>200</Code>
<Success>true</Success>
JSON
格式
{"Message":"null","RequestId":"3FEEAD12-CE22-4EDE-A729-CE94EC070610","Data":{"TotalCount":"23","PageSize":"10","TotalPage":"3","Datas":[{"MinRequestAmount":"10","RuleId":"123","Resource":"handleServiceA","SlowRtMs":"2000","Namespace":"default","AppName":"ahas-demo","HalfOpenRecoveryStepNum":"1","RecoveryTimeoutMs":"5000","Enable":"true","Strategy":"0","HalfOpenBaseAmountPerStep":"5","StatDurationMs":"2000","Threshold":"0.6"}],"PageIndex":"1"},"Code":"200","Success":"true"}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IllegalArgument.AppName | The specified AppName is invalid. | 参数AppName不合法 |
400 | IllegalArgument.Namespace | The specified Namespace is invalid. | 参数Namespace不合法 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交