调用ModifyForwardEntry修改DNAT规则。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ens:ModifyForwardEntry |
update |
*全部资源
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ForwardEntryId |
string |
是 |
待修改的 DNAT 条目的 ID。 |
dnat-5tfjp3537mi6iokl59g5c**** |
| ForwardEntryName |
string |
否 |
DNAT 规则的名称。长度为 2~128 个字符,不能以 |
test0 |
| HealthCheckPort |
integer |
否 |
DNAT 的探测端口,需要在内网端口范围内。默认值为空。 |
80 |
| ExternalIp |
string |
否 |
DNAT 条目中提供公网访问的弹性公网 IP 地址。 |
121.XXX.XXX.28 |
| ExternalPort |
string |
否 |
需要进行端口转发的外部端口或端口段。
|
22 |
| InternalIp |
string |
否 |
通过 DNAT 条目进行公网通信的实例的私网 IP 地址。 |
10.XXX.XXX.50 |
| InternalPort |
string |
否 |
需要进行端口转发的内部端口或端口段。
|
22 |
| IpProtocol |
string |
否 |
协议类型,取值:
|
Any |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
Schema of Response |
||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | ens.interface.error | Failed to call API. | 接口调用发生异常。 |
| 400 | InvalidParameter.DnatNotFound | The specified dnat is not found. | 指定的DNAT规则不存在。 |
| 400 | IncorretDnatEntryStatus | Dnat entry status blocked this operation. | Dnat状态不正确,请检查Dnat状态。 |
| 400 | InstanceNotFound | Instance not found, please check the InstanceId. | 找不到实例,请检查实例ID |
| 400 | IncorrectInstanceStatus | The current status of the instance does not support this operation. | 当前实例状态不支持此操作。 |
| 400 | Forbidden.ExternalPort.Duplicated | The specified ExternalPort is duplicated. | 该外部端口已配置了DNAT规则,请您不要重复设置。 |
| 400 | InvalidExternalIp.NotFound | Specified ExternalIp does not found on the NAT Gateway. | 该公网IP不在NAT网关中。 |
| 400 | InvalidPort.Malformed | The specified ExternalPort or InternalPort is not a valid port. | 外网端口或内网端口不正确。 |
| 400 | Forbidden.ExternalIpUsedInSnat | The external ip is already in use in the snat rule. | 公网IP已经在SNAT规则中使用,请检查。 |
| 400 | InvalidParameter.HealthCheckPort | HealthCheckPort is not in the range of InternalPort. | 健康检查端口没有在内网端口范围内。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。