调用CreateHotParamItems接口创建热点规则例外项。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateHotParamItems |
系统规定参数。取值:CreateHotParamItems。 |
RuleId | Long | 是 | 123 |
热点规则ID |
Items | String | 是 | [{"itemType":"String","itemValue":"apple","threshold":50.0},{"itemType":"String","itemValue":"orange","threshold":20.0}] |
热点例外项 |
AhasRegionId | String | 否 | cn-hangzhou |
地域 |
返回数据
示例
请求示例
http(s)://[Endpoint]/?Action=CreateHotParamItems
&RuleId=123
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateHotParamItemsResponse>
<Message>null</Message>
<RequestId>3FEEAD12-CE22-4EDE-A729-CE94EC070610</RequestId>
<Data>
<ParamIdx>1</ParamIdx>
<Namespace>default</Namespace>
<ParamFlowItemList>
<ItemValue>apple</ItemValue>
<ItemType>String</ItemType>
<Threshold>10</Threshold>
</ParamFlowItemList>
<StatDurationSec>1</StatDurationSec>
<BurstCount>2</BurstCount>
<RuleId>123</RuleId>
<Resource>handleService</Resource>
<AppName>ahas-demo</AppName>
<MaxQueueingTimeMs>3000</MaxQueueingTimeMs>
<ControlBehavior>0</ControlBehavior>
<MetricType>1</MetricType>
<Threshold>50</Threshold>
<Enable>true</Enable>
</Data>
<Code>200</Code>
<Success>true</Success>
</CreateHotParamItemsResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "null",
"RequestId" : "3FEEAD12-CE22-4EDE-A729-CE94EC070610",
"Data" : {
"ParamIdx" : 1,
"Namespace" : "default",
"ParamFlowItemList" : [ {
"ItemValue" : "apple",
"ItemType" : "String",
"Threshold" : 10
} ],
"StatDurationSec" : 1,
"BurstCount" : 2,
"RuleId" : 123,
"Resource" : "handleService",
"AppName" : "ahas-demo",
"MaxQueueingTimeMs" : 3000,
"ControlBehavior" : 0,
"MetricType" : 1,
"Threshold" : 50,
"Enable" : true
},
"Code" : "200",
"Success" : true
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | IllegalArgument.RuleId | The specified RuleId is invalid. | 参数RuleId不合法 |
400 | IllegalArgument.ParamItems | The specified Items is invalid. | 参数Items不合法 |
访问错误中心查看更多错误码。