添加NAT网关端口转发规则-CreateNATGWPolicy

添加NAT网关端口转发规则

Request Parameters

Parameter nameTypeDescriptionRequired
Regionstring地域。 参见 地域和可用区列表Yes
ProjectIdstring项目Id。不填写为默认项目,子帐号必须填写。 请参考GetProjectList接口No
NATGWIdstringNAT网关IdYes
Protocolstring协议类型。枚举值为:TCP、UDPYes
SrcEIPIdstring源IP。填写对应的EIP IdYes
SrcPortstring源端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535Yes
DstIPstring目标IP。填写对饮的目标IP地址Yes
DstPortstring目标端口。可填写固定端口,也可填写端口范围。支持的端口范围为1-65535Yes
PolicyNamestring转发策略名称。默认为空No

Response Elements

Parameter nameTypeDescriptionRequired
RetCodeint操作返回码Yes
Actionstring操作名称Yes
PolicyIdstring创建时分配的策略IdYes

Request Example

https://api.ucloud.cn/?Action=CreateNATGWPolicy
&Region=xxx
&ProjectId=xxx
&NATGWId=voSmtyDG
&Protocol=TCP
&SrcEIPId=MXCFGaVb
&SrcPort=NIQlfARc
&DstIp=WPpinHDz
&DstPort=NjuwdUIK
&PolicyName=MGnDgSGN

Response Example

{
    "Action": "CreateNATGWPolicyResponse",
    "PolicyId": "FXizRyCb",
    "RetCode": 0
}