调用AddSnatEntry给智能接入网关实例添加私网SNAT条目。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 否 | AddSnatEntry |
要执行的操作。 取值:AddSnatEntry。 |
CidrBlock | String | 是 | 192.168.0.1/24 |
目标网段。 |
RegionId | String | 是 | cn-hangzhou |
智能接入网关实例所在的地域ID。 |
SmartAGId | String | 是 | sag-hgke************* |
智能接入网关实例ID。 |
SnatIp | String | 是 | 10.0.**.** |
公网IP地址。 |
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 56BF6C79-C77D-41A0-86DD-A4B156E784EA |
请求ID。 |
InstanceId | String | snat-m2obgkt5ya1puz**** |
SNAT实例ID。 |
示例
请求示例
http(s)://[Endpoint]/?Action=AddSnatEntry
&CidrBlock=192.168.0.1/24
&RegionId=cn-hangzhou
&SmartAGId=sag-hgke*************
&SnatIp=10.0.**.**
&<公共请求参数>
正常返回示例
XML
格式
<AddSnatEntryResponse>
<InstanceId>snat-m2obgkt5ya1puz****</InstanceId>
<RequestId>56BF6C79-C77D-41A0-86DD-A4B156E784EA</RequestId>
</AddSnatEntryResponse>
JSON
格式
{
"InstanceId":"snat-m2obgkt5ya1puz****",
"RequestId":"56BF6C79-C77D-41A0-86DD-A4B156E784EA"
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
403 | FeatureNotSupport | The current edition of the smart access gateway does not support this feature. | 智能接入网关当前版本不支持该功能特性 |
400 | SAG.InstanceNoFound | The specified SAG instance does not exist. | 智能网关实例不存在。 |
500 | SmartAccessGatewayInArrears | The specified Smart Access Gateway has expired. | 该智能接入网关已经到期停服,请续费。 |
500 | SmartAccessGatewayNotActivated | The specified Smart Access Gateway has not been activated. | 该智能接入网关尚未激活,请先激活该实例。 |
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冲突 |
403 | FeatureNotSupportForStandBySmartAG | The current edition of the standby smart access gateway does not support this feature. | 备智能接入网关的当前版本不支持该功能特性 |
500 | InternalError | An error occurred while processing your request. | 请求失败,发生未知错误。 |
访问错误中心查看更多错误码。
在文档使用中是否遇到以下问题
更多建议
匿名提交