修改特殊设置 - UpdateSpecialThrottlingConfigurationV2
功能介绍
修改某个流控策略下的某个特殊设置。
调用方法
请参见如何调用API。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
授权项
访问级别
资源类型(*为必须)
条件键
别名
依赖的授权项
apig:requestThrottling:updateSpecial
Write
instance *
g:ResourceTag/<tag-key>
- apig:specialThrottles:update
- apig:instance:get
- apig:requestThrottling:get
URI
PUT /v2/{project_id}/apigw/instances/{instance_id}/throttles/{throttle_id}/throttle-specials/{strategy_id}
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
project_id |
是 |
String |
项目ID,获取方式请参见获取项目ID。 |
|
instance_id |
是 |
String |
实例ID,在API网关控制台的“实例信息”中获取。 |
|
throttle_id |
是 |
String |
流控策略的编号 |
|
strategy_id |
是 |
String |
特殊配置的编号 |
请求参数
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
X-Auth-Token |
是 |
String |
用户Token。通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
call_limits |
是 |
Long |
流控时间内特殊对象能够访问API的最大次数限制 |
响应参数
状态码:200
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
id |
String |
特殊配置的编号 |
|
call_limits |
Integer |
特殊对象在流控时间内能够访问API的最大次数限制 |
|
apply_time |
String |
设置时间 |
|
app_name |
String |
作用的APP名称 |
|
app_id |
String |
作用的APP编号 |
|
object_id |
String |
特殊对象的身份标识 |
|
object_type |
String |
特殊对象类型:APP、USER |
|
object_name |
String |
作用的APP或租户的名称 |
|
throttle_id |
String |
流控策略编号 |
状态码:400
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码:401
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码:403
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码:404
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
状态码:500
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
String |
错误码 |
|
error_msg |
String |
错误描述 |
请求示例
修改流控策略下的特殊设置
{
"call_limits" : 200
}
响应示例
状态码:200
OK
{
"call_limits" : 200,
"app_name" : "app_demo",
"object_name" : "app_demo",
"object_id" : "356de8eb7a8742168586e5daf5339965",
"throttle_id" : "3437448ad06f4e0c91a224183116e965",
"apply_time" : "2020-08-04T02:40:56Z",
"id" : "a3e9ff8db55544ed9db91d8b048770c0",
"app_id" : "356de8eb7a8742168586e5daf5339965",
"object_type" : "APP"
}
状态码:400
Bad Request
{
"error_code" : "APIG.2003",
"error_msg" : "The parameter value is too large,parameterName:call_limits. Please refer to the support documentation"
}
状态码:401
Unauthorized
{
"error_code" : "APIG.1002",
"error_msg" : "Incorrect token or token resolution failed"
}
状态码:403
Forbidden
{
"error_code" : "APIG.1005",
"error_msg" : "No permissions to request this method"
}
状态码:404
Not Found
{
"error_code" : "APIG.3013",
"error_msg" : "Excluded request throttling configuration a3e9ff8db55544ed9db91d8b048770c0 does not exist"
}
状态码:500
Internal Server Error
{
"error_code" : "APIG.9999",
"error_msg" : "System error"
}
状态码
|
状态码 |
描述 |
|---|---|
|
200 |
OK |
|
400 |
Bad Request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
|
500 |
Internal Server Error |
错误码
请参见错误码。