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

NAT网关

复制全文
下载 pdf
SNAT规则
ModifySnatEntryAttributes - 修改SNAT规则
复制全文
下载 pdf
ModifySnatEntryAttributes - 修改SNAT规则
调用 ModifySnatEntryAttributes 接口,修改SNAT规则的名称、关联的公网IP。​
使用说明​
修改SNAT规则中的公网IP,将导致原有的SNAT连接断开,需要云服务器实例重新发起请求,建立连接,请谨慎操作。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ModifySnatEntryAttributes​
要执行的操作,取值:ModifySnatEntryAttributes。​
​
Version string 必选 示例值:2020-04-01​
API的版本,取值:2020-04-01。​
​
SnatEntryName string 可选 示例值:test-another-name​
SNAT规则的名称。​
  • 需要以字母、中文或数字开头,可包含点号(.)、下划线(_)和短划线(-)。​
  • 长度限制为1 ~ 128个字符。不传保持原有配置。​
​
EipId string 可选 示例值:EipId=eip-2feaac9wtccn459gp67qe****​
公网NAT网关绑定公网IP的ID。多个公网IP的ID之间用英文逗号分隔。​
您可以调用 DescribeEipAddresses 接口,查询公网IP的ID。​
  • 传入单个IP,SNAT规则将关联该公网IP,业务连接都通过该公网IP访问公网。​
  • 传入多个公网IP,SNAT规则将关联多个公网IP,业务连接通过对其五元组哈希算法后分配到的公网IP访问公网。​
说明​
当SNAT规则关联多个公网IP时,建议将公网IP加入共享带宽包,避免业务因其中的单个公网IP带宽达到上限而导致流量丢包。​
​
NatIpId string 可选 示例值:vpcnatip-gw8y7q3cpk3fggs8****​
私网NAT网关的中转IP的ID。​
​
SnatEntryId string 必选 示例值:snat-2fedi096gdiww59gp680r****​
SNAT规则的ID。​
您可以调用 DescribeSnatEntries 接口,查询SNAT规则的ID。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
RequestId string 示例值:2021062415303301022514515207C4****​
请求ID。​
​
​
​
请求示例​
​
GET /?Action=ModifySnatEntryAttributes&Version=2020-04-01&SnatEntryId=snat-2fedi096gdiww59gp680r****&EipId=eip-2feaac9wtccn459gp67qe**** HTTP/1.1​
Host: natgateway.cn-beijing.volcengineapi.com​
Service: natgateway​
Region: cn-beijing​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2021062415303301022514515207C4****",​
"Action": "ModifySnatEntryAttributes",​
"Version": "2020-04-01",​
"Service": "natgateway",​
"Region": "cn-beijing"​
},​
"Result":{​
"RequestId": "2021062415303301022514515207C4****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
MissingParameter​
The request is missing a required parameter.​
该请求缺少必要参数。​
400​
InvalidEip.InstanceMismatch​
The specified elastic ip and instance mismatch.​
指定的公网IP和实例不匹配。​
400​
InvalidNatGateway.InvalidStatus​
The specified NAT gateway is not in the correct status for the request.​
指定的NAT网关所处的状态无法响应该请求。​
400​
LimitExceeded.EipsPerSnatEntry​
You've reached the limit on the number of EIPs per snat entry.​
已达到每条SNAT规则支持关联公网IP的数量上限。​
400​
InvalidSnatEntry.EipNotSupported​
Can not create or modify SNAT entry with eip on the specified NAT gateway.​
不支持在指定的NAT网关上创建或修改使用EIP的SNAT规则。​
400​
InvalidSnatEntry.NatIpConflict​
The specified nat ip and eip conflict.​
指定的NAT IP和EIP参数冲突。​
400​
InvalidSnatEntry.NatIpNotSupported​
Can not create or modify SNAT entry with nat ip on the specified NAT gateway.​
不支持在指定的NAT网关上创建或修改使用NAT IP的SNAT规则。​
400​
InvalidEip.InUse​
The specified eip has been used by dnat entry of ip mapping.​
指定的EIP已被IP映射的DNAT规则使用。​
400​
InvalidEip.InvalidStatus​
The specified elastic ip is not in the correct status for the request. The specified elastic ip is in freeze.​
指定的公网IP或私有网络所处的状态无法响应该请求。当前公网IP被冻结。​
400​
InvalidName.Malformed​
The specified name is malformed.Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidSnatEntry.InvalidStatus​
The specified snat entry is not in the correct status for the request.​
指定的snat规则所处的状态无法响应该请求。​
404​
InvalidSnatEntry.NotFound​
The specified snat entry does not exist.​
指定的SNAT规则不存在。​
404​
InvalidEip.NotFound​
The specified EIP does not exist.​
指定的公网IP不存在。​
404​
InvalidNatIp.NotFound​
The specified nat ip does not exist.​
指定的NAT IP不存在。​
409​
InvalidSnatEntry.EipConflict​
The specified EIP conflicts with that of another EIP in the snat entry.​
SNAT规则中的公网IP冲突。​
412​
InvalidNatGateway.Expired​
The specified NatGateway has expired.​
指定的NAT网关实例已到期。​
500​
InternalError​
An internal error has occurred.​
发生内部错误。​
​
​
最近更新时间:2025.11.30 15:42:25
这个页面对您有帮助吗?
有用
有用
无用
无用