Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::DDoSPro::Port

Última atualização: Jun 27, 2026

O recurso ALIYUN::DDoSPro::Port crie uma regra de encaminhamento de porta para uma instância do Anti-DDoS Proxy.

Sintaxe

{
  "Type": "ALIYUN::DDoSPro::Port",
  "Properties": {
    "BackendPort": String,
    "InstanceId": String,
    "RealServers": List,
    "FrontendPort": String,
    "FrontendProtocol": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

FrontendProtocol

String

Sim

Não

Tipo do protocolo de encaminhamento.

Valores válidos:

  • tcp

  • udp

InstanceId

String

Sim

Não

ID da instância do Anti-DDoS Proxy à qual a regra de encaminhamento de porta pertence.

Nenhuma.

RealServers

List

Sim

Não

Endereços IP do servidor de origem.

Nenhuma.

BackendPort

String

Não

Não

Porta do servidor de origem.

Valores válidos: 0 a 65535.

FrontendPort

String

Não

Não

Porta de encaminhamento.

Valores válidos: 0 a 65535.

Valores de retorno

Fn::GetAtt

FrontendPort: a porta de encaminhamento.

Exemplos

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BackendPort:
    Type: String
    Description:
      en: 'The port of the origin server. Valid values: 0 to 65535.'
    Required: false
  InstanceId:
    Type: String
    Description:
      en: The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to which the port forwarding rule belongs.
    Required: true
  RealServers:
    AssociationPropertyMetadata:
      Parameter:
        Type: String
        Description:
          en: The IP address of the origin server.
        Required: true
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: An array that consists of the IP addresses of origin servers.
    Required: true
  FrontendPort:
    Type: String
    Description:
      en: 'The forwarding port. Valid values: 0 to 65535.'
    Required: false
  FrontendProtocol:
    Type: String
    Description:
      en: |-
        The type of the protocol. Valid values: 
        tcp
        udp
    AllowedValues:
      - tcp
      - udp
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::DDoSPro::Port
    Properties:
      BackendPort:
        Ref: BackendPort
      InstanceId:
        Ref: InstanceId
      RealServers:
        Ref: RealServers
      FrontendPort:
        Ref: FrontendPort
      FrontendProtocol:
        Ref: FrontendProtocol
Outputs:
  FrontendPort:
    Description: The forwarding port.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FrontendPort

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BackendPort": {
      "Type": "String",
      "Description": {
        "en": "The port of the origin server. Valid values: 0 to 65535."
      },
      "Required": false
    },
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the Anti-DDoS Pro or Anti-DDoS Premium instance to which the port forwarding rule belongs."
      },
      "Required": true
    },
    "RealServers": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Description": {
            "en": "The IP address of the origin server."
          },
          "Required": true
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "An array that consists of the IP addresses of origin servers."
      },
      "Required": true
    },
    "FrontendPort": {
      "Type": "String",
      "Description": {
        "en": "The forwarding port. Valid values: 0 to 65535."
      },
      "Required": false
    },
    "FrontendProtocol": {
      "Type": "String",
      "Description": {
        "en": "The type of the protocol. Valid values: \ntcp\nudp"
      },
      "AllowedValues": [
        "tcp",
        "udp"
      ],
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::DDoSPro::Port",
      "Properties": {
        "BackendPort": {
          "Ref": "BackendPort"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "RealServers": {
          "Ref": "RealServers"
        },
        "FrontendPort": {
          "Ref": "FrontendPort"
        },
        "FrontendProtocol": {
          "Ref": "FrontendProtocol"
        }
      }
    }
  },
  "Outputs": {
    "FrontendPort": {
      "Description": "The forwarding port.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FrontendPort"
        ]
      }
    }
  }
}