Tüm Ürünler
Search
Belge Merkezi

:CreateForwardEntry

Son Güncelleme:Oct 01, 2026

CreateForwardEntry çağrısı yaparak bir DNAT girişi ekler.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ens:CreateForwardEntry

create

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

NatGatewayId

string

Yes

NAT ağ geçidinin kimliği.

nat-5t7nh1cfm6kxiszlttr38****

ExternalIp

string

Yes

Genel ağ erişimi sağlayan Esnek IP adresi (EIP).

EIP, aynı NAT ağ geçidine ait bir SNAT kuralı tarafından kullanılmamalıdır. EIP'nin Boşta (Idle) durumunda olduğunu doğrulamak için DescribeNatGateways tarafından döndürülen IpLists.UsingStatus alanını kontrol edebilirsiniz.

121.XXX.XXX.28

ExternalPort

string

Yes

Port yönlendirme için harici port veya port aralığı.

  • Port aralığı 1 ile 65535 arasında olmalıdır.

  • Bir port aralığında trafik yönlendirmek için başlangıç ve bitiş portlarını eğik çizgi (/) ile ayırın, örneğin 10/20.

  • ExternalPort bir port aralığı olarak ayarlanırsa, InternalPort da aynı sayıda porta sahip bir aralık olarak ayarlanmalıdır. Örneğin, ExternalPort 10/20 olarak ayarlanırsa, InternalPort 80/90 olarak ayarlanmalıdır.

22

InternalIp

string

Yes

DNAT girişi üzerinden İnternet ile iletişim kuran örneğin özel IP adresi.

10.0.XXX.XXX

InternalPort

string

Yes

Port yönlendirme için dahili port veya port aralığı.

  • Port aralığı 1 ile 65535 arasında olmalıdır.

  • Bir port aralığında trafik yönlendirmek için başlangıç ve bitiş portlarını eğik çizgi (/) ile ayırın, örneğin 10/20.

22

ForwardEntryName

string

No

DNAT kuralının adı. Ad, 2 ila 128 karakter uzunluğunda olmalıdır ve http:// veya https:// ile başlamamalıdır.

test0

IpProtocol

string

No

Protokol türü. Geçerli değerler:

  • TCP: TCP paketlerini yönlendirir.

  • UDP: UDP paketlerini yönlendirir.

  • Any (varsayılan): Tüm paketleri yönlendirir.

Valid values:

  • TCP :

    TCP protokolü.

  • UDP :

    UDP protokolü.

  • Any :

    Tüm protokoller.

Any

HealthCheckPort

integer

No

DNAT için sağlık kontrolü portu. Port, dahili port aralığında olmalıdır. Varsayılan değer: boş.

80

StandbyExternalIp

string

No

Genel ağ erişimi sağlayan yedek EIP. Yedek EIP, NAT ağ geçidine bağlı olmalıdır. DNAT girişi oluşturulduktan sonra yedek EIP devreye girer.

101.XXX.XXX.4

Response elements

Element

Type

Description

Example

object

Yanıt şeması.

RequestId

string

İstek kimliği.

EF6D6FA4-DACA-5822-A981-81006271D263

ForwardEntryId

string

DNAT girişinin kimliği.

fwd-5tc07cw14metghn3siv4a****

Examples

Success response

JSON format

{
  "RequestId": "EF6D6FA4-DACA-5822-A981-81006271D263",
  "ForwardEntryId": "fwd-5tc07cw14metghn3siv4a****"
}

Error codes

HTTP status code

Error code

Error message

Description

400 Invalid%s The specified parameter %s is invalid.
400 Missing%s You must specify the parameter %s.
400 InvalidParameter.NatNotFound The specified Nat is not found.
400 InvalidParameter.ExternalIp The specified externalIp is not found.
400 Forbidden.ExternalIpUsedInSnat Forbidden.ExternalIpUsedInSnat
400 InvalidParameter.InternalIpNotFound The input parameter internalIp that is not found.
400 Forbidden.ExternalPort.Duplicated The specified ExternalPort is duplicated.
400 ForwardEntryLimitExceed The limit of forward entry in the nat reaches.
400 InvalidParameter.HealthCheckPort HealthCheckPort is not in the range of InternalPort
400 IncorrectInstanceStatus The current status of the instance does not support this operation.
400 SystemBusy System is busy, please try again later.
400 InvalidParameter.InternalIp The specified parameter internalIp is invalid.
400 InvalidPort.Malformed The specified port is not a valid port.
400 ens.interface.error Failed to call API.
400 NoPermission Permission denied.
400 InvalidParameter.%s The specified field %s invalid. Please check it again.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.