CreateFullNatEntry - 添加FULLNAT条目

更新时间:
复制 MD 格式

调用CreateFullNatEntry接口在FULLNAT列表中添加FULLNAT条目。

接口说明

CreateFullNatEntry 接口属于异步接口,即系统会先返回一个 FULLNAT 条目,但该 FULLNAT 条目并未添加完成,系统后台的添加任务仍在进行。您可以调用 ListFullNatEntries 查询 FULLNAT 条目添加的状态:

  • 当 FULLNAT 条目处于 Creating 状态时,表示 FULLlNAT 条目正在添加中,在该状态下,您只能执行查询操作,不能执行其他操作。

  • 当 FULLNAT 条目处于 Available 状态时,表示 FULLlNAT 条目已添加完成。

调试

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

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

vpc:CreateFullNatEntry

create

*FullNat

acs:vpc:{#regionId}:{#accountId}:vpcfullnattable/{#FullNatTableId}

无 无

请求参数

名称

类型

必填

描述

示例值

ClientToken

string

否

客户端 Token,用于保证请求的幂等性。

从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符。

说明

如果未配置该参数,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 可能不一样。

5A2CFF0E-5718-45B5-9D4D-70B3FF3898

FullNatTableId

string

是

FullNAT 条目所属的 FullNAT 列表的 ID。

fulltb-gw88z7hhlv43rmb26****

NetworkInterfaceId

string

是

弹性网卡 ID。

eni-gw8g131ef2dnbu3k****

NatIp

string

是

提供地址转换的 NAT IP 地址。

192.168.XX.XX

NatIpPort

string

否

FULLNAT 端口映射的前端端口,取值范围:1~65535。

说明

如果未配置该参数,系统将随机分配一个可用端口。

80

AccessIp

string

否

FULLNAT 地址转换的后端 IP 地址。

192.168.XX.XX

AccessPort

string

是

FULLNAT 端口映射的后端端口,取值范围:1~65535。

80

IpProtocol

string

是

转发端口的协议类型,取值:

  • TCP:转发 TCP 协议的报文。

  • UDP:转发 UDP 协议的报文。

TCP

FullNatEntryName

string

否

FULLNAT 条目的名称。 长度为 2~128 个字符,必须以大小写字母或中文开头,但不能以 http://或 https://开头。

test

FullNatEntryDescription

string

否

FULLNAT 条目的描述信息。

描述可以为空;或填写 2~256 个字符,不能以http://或https://开头。

abc

DryRun

boolean

否

是否只预检此次请求,取值:

  • true:发送检查请求,不会添加 FULLNAT 条目。检查项包括 AccessKey 是否有效、RAM 用户的授权情况和是否填写了必需参数。如果检查不通过,则返回对应错误。如果检查通过,会返回错误码DryRunOperation。

  • false(默认值):发送正常请求,通过检查后返回 2xx HTTP 状态码并添加 FULLNAT 条目。

false

RegionId

string

是

FULLNAT 条目的 VPC NAT 网关所在地域 ID。

您可以通过调用 DescribeRegions 接口获取地域 ID。

eu-central-1

AccessDomain

string

否

FULLNAT 地址转换的后端域名。

xxx.com

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

2315DEB7-5E92-423A-91F7-4C1EC9AD97C3

FullNatEntryId

string

FULLNAT 条目的 ID。

fullnat-gw8fz23jezpbblf1j****

示例

正常返回示例

JSON格式

{
  "RequestId": "2315DEB7-5E92-423A-91F7-4C1EC9AD97C3",
  "FullNatEntryId": "fullnat-gw8fz23jezpbblf1j****"
}

错误码

HTTP status code

错误码

错误信息

描述

400 ResourceNotFound.NatIp The specified resource of %s is not found. NatIp资源找不到。
400 IllegalParamFormat.NatIp The param format of %s[%s] is illegal. NatIp的格式不正确。
400 UnsupportedFeature.PrivateLinkMode The feature of %s is not supported. 暂不支持反向访问特性。
400 QuotaExceeded.FullNatEntry The quota of %s is exceeded, usage %s/%s. FullNatEntry使用个数已经超额。
400 IncorrectStatus.NatIp The status of %s [%s] is incorrect. NatIp当前状态不正确。
400 ResourceAlreadyExist.FullNatEntry The specified resource of %s is already exist. 此FULLNAT规则已经存在
400 IncorrectStatus.NetworkInterface The status of network interface is incorrect. 弹性网卡状态不正确。
400 OperationFailed.AllocateNatIpPortFailed NatIpPort allocation failed. 前端端口分配失败
400 IllegalParam.NetworkInterfaceId The param of NetworkInterfaceId is illegal. NetworkInterfaceId参数不合法。
400 IllegalParam.AccessDomain The request parameter AccessDomain is illegal. 请求参数中AccessDomain参数不合法
400 ExclusiveParam.AccessIpAndAccessDomain The specified AccessIp and AccessDomain are mutually exclusive. 指定的入参AccessIp和AccessDomain存在冲突
400 InstanceUnsupported.FullNatDomain The current instance does not support the configuration of the FullNat rule domain name. 当前实例不支持配置FullNat规则域名形式。
400 ZoneUnsupported.FullNatDomain The current zone does not support the configuration of the FullNat rule domain name. 当前可用区不支持配置FullNat规则域名形式。
500 InternalError The request processing has failed due to some unknown error, exception or failure. 内部错误
404 ResourceNotFound.NatGateway The NatGateway instance not exist. 此nat网关不存在

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

变更历史

更多信息,参考变更详情。