调用AddSnatEntry给智能接入网关实例添加私网SNAT条目。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
Action String AddSnatEntry

系统规定参数。取值:AddSnatEntry

RegionId String cn-hangzhou

智能接入网关实例所在的地域ID。

SmartAGId String sag-jf5w9a8k5mhi5h****

智能接入网关实例ID。

CidrBlock String 192.168.1.0/24

目标网段。

SnatIp String 11.0.XX.XX

公网IP地址。

返回数据

名称 类型 示例值 描述
RequestId String 56BF6C79-C77D-41A0-86DD-A4B156E784EA

请求ID。

InstanceId String snat-m2obgkt5ya1puz****

SNAT实例ID。

示例

请求示例

http(s)://[Endpoint]/?Action=AddSnatEntry
&RegionId=cn-hangzhou
&SmartAGId=sag-jf5w9a8k5mhi5h****
&CidrBlock=192.168.1.0/24
&SnatIp=11.0.XX.XX
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8" ?>
    <AddSnatEntryResponse>
	<InstanceId>snat-m2obgkt5ya1puz****</InstanceId>
	<RequestId>56BF6C79-C77D-41A0-86DD-A4B156E784EA</RequestId>
    </AddSnatEntryResponse>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "InstanceId" : "snat-m2obgkt5ya1puz****",
  "RequestId" : "56BF6C79-C77D-41A0-86DD-A4B156E784EA"
}

错误码

HttpCode 错误码 错误信息 描述
400 SAG.InstanceNoFound The specified SAG instance does not exist. 智能接入网关实例不存在。
400 SNAT.CidrConfigExist The specified SNAT CIDR block already exists. SNAT地址段已经存在。
400 SNAT.AmountLimit The maximum number of SNAT entries is exceeded. SNAT条目已经到达上限。
400 SNAT.SnatDnatIpConflict The SNAT destination IP address is the same as the DNAT IP address. SNAT目标IP与DNAT IP冲突
400 SNAT.InvalidCidr The specified SNAT CIDR block is invalid. SNAT地址段非法。
400 SmartAccessGatewayInArrears The specified Smart Access Gateway has expired. 该智能接入网关已经到期停服,请续费。
400 SmartAccessGatewayNotActivated The specified Smart Access Gateway has not been activated. 该智能接入网关尚未激活,请先激活该实例。
400 SNAT.InvalidIp The specified SNAT destination IP is invalid. SNAT目标IP非法。
403 FeatureNotSupport The current edition of the smart access gateway does not support this feature. 智能接入网关当前版本不支持该功能特性。
403 FeatureNotSupportForStandBySmartAG The current edition of the standby smart access gateway does not support this feature. 备智能接入网关的当前版本不支持该功能特性。

访问错误中心查看更多错误码。