You need to enable JavaScript to run this app.
文档中心
NAT网关

NAT网关

复制全文
下载 pdf
IP限速
CreateNatIpLimitRule - 创建限速规则
复制全文
下载 pdf
CreateNatIpLimitRule - 创建限速规则
调用CreateNatIpLimitRule接口,创建NAT网关限速规则。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:CreateNatIpLimitRule​
要执行的操作,取值:CreateNatIpLimitRule。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
CpsLimit integer 可选 示例值:1000​
新建连接数上限,取值范围:1~150000,单位:个/秒。​
​
ConnectionLimit integer 可选 示例值:10000​
并发连接数,取值范围1~1000000,单位:个。​
​
IsDefault boolean 可选 示例值:true​
限速规则类型是否为默认规则类型,取值如下:​
  • true:限速规则类型为默认规则。​
  • false:限速规则类型为自定义规则。​
​
NatGatewayId string 必选 示例值:ngw-1sm2t10buei****​
NAT网关的ID。​
您可以调用 DescribeNatGateways 接口,查询NAT网关的ID。​
​
InternalIp string 可选 示例值:192.XX.XX.1​
限速IP地址。​
当IsDefault取值为true时,不支持传入本参数。​
​
OutboundMbpsLimit integer 可选 示例值:10​
出方向带宽限速值,单位:Mbps。​
限速上限值为NAT网关实例带宽上限,填0表示不限速。​
​
InboundMbpsLimit integer 可选 示例值:10​
入方向带宽限速值,单位:Mbps。​
限速上限值为NAT网关实例带宽上限,填0表示不限速。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:2021062415303301022514515207C4****​
请求ID。​
​
LimitRuleId string 示例值:iplimit-93**​
限速规则ID。​
​
​
​
请求示例​
​
GET /?Action=CreateNatIpLimitRule&Version=2020-04-01&NatGatewayId=ngw-1sm2t10buei****&InternalIp=192.XX.XX.1&OutboundMbpsLimit=10&InboundMbpsLimit=0 HTTP/1.1​
Host: natgateway.cn-beijing.volcengineapi.com​
ServiceName: natgateway​
Region: cn-beijing​
​
​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2021120316053701022513314307D5****",​
"Action": "CreateNatIpLimitRule",​
"Version": "2020-04-01",​
"Service": "natgateway",​
"Region": "cn-beijing"​
},​
"Result":{​
"RequestId": "2021120316053701022513314307D5****",​
"LimitRuleId":"iplimit-93**"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
MissingParameter​
The request is missing a required parameter.​
该请求缺少必要参数。​
400​
InvalidParameter​
A parameter specified in the request is not valid, is unsupported or cannot be used.​
该请求传入了非法或不支持的参数。​
400​
QuotaExceeded.LimitRule​
You've reached the limit on the number of LimitRule that you can create.​
已达到可创建的ip限速规则数量上限。​
400​
InvalidIPAddress.Malformed​
The specified IP address is malformed.​
指定的IP不合法。​
400​
InvalidBandwidth.Malformed​
The specified bandwidth is malformed.​
出入向限速带宽未指定。​
400​
InvalidLimitRule.InvalidStatus​
The specified Limit Rule is not in the correct status for the request.​
指定的NAT IP限速规则所处的状态无法响应该请求。​
400​
LimitExceeded.BandwidthPerInternalIp​
You've reached the limit on the bandwidth of internal ip that you can update.​
超过NAT IP带宽上限。​
400​
InvalidNatGateway.UnSupportAction​
The specified NAT gateway does not support this action.​
指定的NAT网关不支持当前操作。​
400​
InvalidLimitRule.exists​
The specified bandwidth limit rule with nat exists.​
指定的NAT限速规则已创建。​
400​
InvalidLimitRule.exists​
The specified nat default limit rule exists.​
指定的NAT默认限速规则已创建。​
400​
LimitExceeded.Connection​
You've reached the limit on the connection that you can update.​
超过NAT 连接数限速上限。​
400​
LimitExceeded.Cps​
You've reached the limit on the cps that you can update.​
超过NAT CPS限速上限。​
400​
InvalidLimitRule.InternalIP​
The specified default limit rule internal ip is invalid.​
指定的NAT默认限速规则无需指定IP地址。​
403​
Forbidden​
You are not authorized to use nat ip limit.​
无权限使用NAT IP限流。​
403​
Forbidden​
You are not authorized to use nat default limit or cps and connection limit.​
无权限使用NAT默认限流或CPS和连接数限流。​
404​
InvalidNatGateway.NotFound​
The specified NAT gateway does not exist.​
指定的NAT网关不存在。​
412​
InvalidNatGateway.Expired​
The specified NAT gateway has expired.​
指定的NAT网关已到期。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。​
​
​
最近更新时间:2026.01.16 10:52:18
这个页面对您有帮助吗?
有用
有用
无用
无用