All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ECS::ForwardEntry

Last Updated:Jun 15, 2026

ALIYUN::ECS::ForwardEntry is a resource type for creating a DNAT entry in the DNAT table of a NAT gateway.

Syntax

{
  "Type": "ALIYUN::ECS::ForwardEntry",
  "Properties": {
    "ExternalIp": String,
    "ExternalPort": String,
    "ForwardTableId": String,
    "InternalIp": String,
    "IpProtocol": String,
    "InternalPort": String,
    "PortBreak": Boolean,
    "ForwardEntryName": String
  }
}

Properties

Property name Type Required Update Allowed Description Constraints
ExternalIp String Yes No The public IP address. The public IP address must be included in the Internet Shared Bandwidth instance of the NAT Gateway.
ExternalPort String Yes No The public port number. Valid values: 1 to 65535.
ForwardTableId String Yes No The ID of the DNAT table. None
InternalIp String Yes No The private IP address to which requests are forwarded. The value must be a private IP address.
IpProtocol String Yes No The protocol type. Valid values:
  • TCP
  • UDP
  • Any
InternalPort String Yes No The private port number. Valid values: 1 to 65535.
PortBreak Boolean No No Specifies whether to enable port breaking. Valid values:
  • true: Enables port breaking.
  • false (default): Disables port breaking.
Note If a DNAT entry and an SNAT entry use the same public IP address, set PortBreak to true to configure a port number greater than 1024.
ForwardEntryName String No No The name of the DNAT rule. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://.

Return value

Fn::GetAtt

ForwardEntryId: the ID of the DNAT entry.

Examples

  • YAML format

    Parameters:
      ForwardTableId:
        Type: String
        Description: Create forward entry in specified forward table.
    ROSTemplateFormatVersion: '2015-09-01'
    Outputs:
      ForwardEntryId:
        Description: The id of created forward entry.
        Value:
          Fn::GetAtt:
            - ForwardTableEntry
            - ForwardEntryId
    Resources:
      ForwardTableEntry:
        Type: ALIYUN::ECS::ForwardEntry
        Properties:
          IpProtocol: TCP
          ExternalIp: 100.100.100.1
          ForwardTableId:
            Ref: ForwardTableId
          ExternalPort: '22'
          InternalPort: '22'
          InternalIp: 192.168.1.1       
  • JSON format

    {
      "Parameters": {
        "ForwardTableId": {
          "Type": "String",
          "Description": "Create forward entry in specified forward table."
        }
      },
      "ROSTemplateFormatVersion": "2015-09-01",
      "Outputs": {
        "ForwardEntryId": {
          "Description": "The id of created forward entry.",
          "Value": {
            "Fn::GetAtt": [
              "ForwardTableEntry",
              "ForwardEntryId"
            ]
          }
        }
      },
      "Resources": {
        "ForwardTableEntry": {
          "Type": "ALIYUN::ECS::ForwardEntry",
          "Properties": {
            "IpProtocol": "TCP",
            "ExternalIp": "100.100.100.1",
            "ForwardTableId": {
              "Ref": "ForwardTableId"
            },
            "ExternalPort": "22",
            "InternalPort": "22",
            "InternalIp": "192.168.1.1"
          }
        }
      }
    }

For more examples, see the JSON example and the YAML example.