Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::WAF3::TGW

Última atualização: Jun 27, 2026

O recurso ALIYUN::WAF3::TGW adiciona um recurso ao WAF no modo de proxy transparente.

Sintaxe

{
  "Type": "ALIYUN::WAF3::TGW",
  "Properties": {
    "InstanceId": String,
    "Listen": Map,
    "ResourceGroupId": String,
    "Redirect": Map,
    "WAFInstanceRegion": String
  }
}

Propriedades

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

InstanceId

String

Sim

Não

ID da instância do WAF.

Nenhuma.

Listen

Map

Sim

Sim

Configurações do listener.

Detalhado na seção de propriedades Listen abaixo.

ResourceGroupId

String

Não

Sim

ID do grupo de recursos.

Nenhuma.

Redirect

Map

Não

Sim

Configurações de encaminhamento.

Nenhuma.

WAFInstanceRegion

String

Não

Não

Regiões compatíveis com o WAF 3.0.

Valores válidos:

  • ChineseMainland: regiões dentro da China continental

  • NonMainland: regiões fora da China continental

Sintaxe de Listen

"Listen": {
  "CustomCiphers": List,
  "TLSVersion": String,
  "Http2Enabled": Boolean,
  "CipherSuite": Integer,
  "EnableTLSv3": Boolean,
  "Port": Integer,
  "ResourceProduct": String,
  "Certificates": List,
  "Protocol": String,
  "ResourceInstanceId": String
}

Propriedades de Listen

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Port

Integer

Sim

Não

Porta de escuta.

Nenhuma.

Protocol

String

Sim

Não

Tipo de protocolo.

Nenhuma.

ResourceProduct

String

Sim

Não

Serviço de nuvem proprietário do recurso.

Nenhuma.

ResourceInstanceId

String

Sim

Não

ID do recurso a ser adicionado ao WAF.

Nenhuma.

CustomCiphers

List

Não

Sim

Conjuntos de cifras personalizados.

Disponível apenas quando CipherSuite for 99. Máximo: 5.

CipherSuite

Integer

Não

Sim

Tipo do conjunto de cifras.

Valores válidos:

  • 1: todos os conjuntos de cifras

  • 2: conjuntos de cifras fortes

  • 99: conjuntos de cifras personalizados

Certificates

List

Não

Sim

Nomes de domínio vinculados aos certificados.

Máximo: 10.

EnableTLSv3

Boolean

Não

Sim

Indica se o TLS 1.3 deve ser ativado.

Valores válidos:

  • true

  • false

Http2Enabled

Boolean

Não

Sim

Indica se o HTTP/2 deve ser ativado.

Valores válidos:

  • true

  • false

TLSVersion

String

Não

Sim

Versão do TLS.

Valores válidos:

  • tlsv1

  • tlsv1.1

  • tlsv1.2

Sintaxe de Certificates

"Certificates": [
  {
    "AppliedType": String,
    "CertificateId": String
  }
]

Propriedades de Certificates

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

AppliedType

String

Não

Sim

Tipo de certificado HTTPS.

Valores válidos:

  • default: certificado padrão

  • extension: certificado adicional

CertificateId

String

Não

Sim

ID do certificado.

Nenhuma.

Sintaxe de Redirect

"Redirect": {
  "XffHeaders": List,
  "WriteTimeout": Integer,
  "XffHeaderMode": Integer,
  "Keepalive": Boolean,
  "RequestHeaders": List,
  "KeepaliveRequests": Integer,
  "KeepaliveTimeout": Integer,
  "ReadTimeout": Integer,
  "XffProto": Boolean
}

Propriedades de Redirect

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Keepalive

Boolean

Não

Sim

Indica se conexões persistentes devem ser ativadas.

Valores válidos:

  • true (padrão)

  • false

KeepaliveRequests

Integer

Não

Sim

Número máximo de conexões persistentes reutilizadas.

Valores válidos: 60 a 1000.

KeepaliveTimeout

Integer

Não

Sim

Tempo limite para conexão persistente ociosa.

Unidade: segundos. Valores válidos: 1 a 60. Padrão: 15.

RequestHeaders

List

Não

Sim

Campos de cabeçalho personalizados no formato chave-valor.

Rotula o tráfego processado pelo WAF.

ReadTimeout

Integer

Não

Sim

Tempo limite de leitura da conexão.

Unidade: segundos. Valores válidos: 1 a 3600.

WriteTimeout

Integer

Não

Sim

Tempo limite de gravação da conexão.

Unidade: segundos. Valores válidos: 1 a 3600.

XffHeaders

List

Não

Sim

Campos de cabeçalho personalizados para obter o endereço IP do cliente.

Formato: ["header1", "header2", ...]. Máximo: 20.

XffHeaderMode

Integer

Não

Sim

Método usado pelo WAF para obter o endereço IP do cliente.

Valores válidos:

  • 0: Nenhum proxy de camada 7 encaminha tráfego antes do WAF.

  • 1: O WAF lê o primeiro valor do cabeçalho X-Forwarded-For (XFF) como o endereço IP do cliente.

  • 2: O WAF lê o valor de um campo de cabeçalho personalizado como o endereço IP do cliente.

XffProto

Boolean

Não

Sim

Indica se o X-Forward-For-Proto deve ser usado para identificar o protocolo no encaminhamento de solicitações ao servidor de origem.

Valores válidos:

  • true (padrão)

  • false

Sintaxe de RequestHeaders

"RequestHeaders": [
  {
    "Value": String,
    "Key": String
  }
]

Propriedades de RequestHeaders

Propriedade

Tipo

Obrigatório

Editável

Descrição

Restrição

Key

String

Não

Sim

Chave do campo de cabeçalho.

Nenhuma.

Value

String

Não

Sim

Valor do campo de cabeçalho.

Nenhuma.

Valores de retorno

Fn::GetAtt

  • InstanceId: ID da instância do WAF.

  • Port: porta do serviço de nuvem do recurso.

  • ResourceProduct: serviço de nuvem do recurso.

  • TgwId: ID do recurso de proxy transparente no WAF.

Exemplos

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  InstanceId:
    Type: String
    Description:
      en: The ID of the WAF instance.
    Required: true
  Listen:
    AssociationPropertyMetadata:
      Parameters:
        CustomCiphers:
          Type: Json
          Description:
            en: Customize the encryption suite list. This parameter is used only when CipherSuite is set to 99.
          Required: false
          MinLength: 0
          MaxLength: 5
        TLSVersion:
          Type: String
          Description:
            en: |-
              The TLS version to be added. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:
              tlsv1
              tlsv1.1
              tlsv1.2
          AllowedValues:
            - tlsv1
            - tlsv1.1
            - tlsv1.2
          Required: false
        Http2Enabled:
          Type: Boolean
          Description:
            en: |-
              Whether to enable HTTP2. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:
              true: Enable HTTP2.
              false (default): Disable HTTP2.
          Required: false
        CipherSuite:
          Type: Number
          Description:
            en: |-
              The type of encryption suite to be added. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:
              1: Indicates adding all encryption suites.
              2: Indicates adding a strong encryption suite. This value can be selected only when the value of TLSVersion is tlsv1.2.
              99: Indicates adding a custom encryption suite.
          Required: false
        EnableTLSv3:
          Type: Boolean
          Description:
            en: |-
              Whether to support TSL1.3 version. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Value:
              true: indicates that TSL1.3 version is supported.
              false: indicates that TSL1.3 version is not supported.
          Required: false
        Port:
          Type: Number
          Description:
            en: Access the cloud product port of WAF.
          Required: true
        ResourceProduct:
          Type: String
          Description:
            en: Access to WAF cloud products.
          Required: true
        Certificates:
          AssociationPropertyMetadata:
            Parameters:
              AppliedType:
                Type: String
                Description:
                  en: |-
                    The certificate type for the HTTPS protocol. Valid values:
                    default: Indicates the default certificate.
                    extension: Indicates an extended certificate.
                AllowedValues:
                  - default
                  - extension
                Required: false
              CertificateId:
                Type: String
                Description:
                  en: The ID of the certificate that was added.
                Required: false
          AssociationProperty: List[Parameters]
          Type: Json
          Description:
            en: The domain name bound to the certificate.
          Required: false
          MinLength: 0
          MaxLength: 10
        Protocol:
          Type: String
          Description:
            en: Protocol type
          Required: true
        ResourceInstanceId:
          Type: String
          Description:
            en: The instance ID of the cloud product connected to WAF.
          Required: true
    Type: Json
    Description:
      en: Listening information.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::WAF3::TGW
    Properties:
      InstanceId:
        Ref: InstanceId
      Listen:
        Ref: Listen
Outputs:
  InstanceId:
    Description: The ID of the WAF instance.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - InstanceId
  Port:
    Description: Access the cloud product port of WAF.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Port
  ResourceProduct:
    Description: Access to WAF cloud products.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ResourceProduct
  TgwId:
    Description: The protection object ID of the transparent access resource.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TgwId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the WAF instance."
      },
      "Required": true
    },
    "Listen": {
      "AssociationPropertyMetadata": {
        "Parameters": {
          "CustomCiphers": {
            "Type": "Json",
            "Description": {
              "en": "Customize the encryption suite list. This parameter is used only when CipherSuite is set to 99."
            },
            "Required": false,
            "MinLength": 0,
            "MaxLength": 5
          },
          "TLSVersion": {
            "Type": "String",
            "Description": {
              "en": "The TLS version to be added. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:\ntlsv1\ntlsv1.1\ntlsv1.2"
            },
            "AllowedValues": [
              "tlsv1",
              "tlsv1.1",
              "tlsv1.2"
            ],
            "Required": false
          },
          "Http2Enabled": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to enable HTTP2. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:\ntrue: Enable HTTP2.\nfalse (default): Disable HTTP2."
            },
            "Required": false
          },
          "CipherSuite": {
            "Type": "Number",
            "Description": {
              "en": "The type of encryption suite to be added. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Values:\n1: Indicates adding all encryption suites.\n2: Indicates adding a strong encryption suite. This value can be selected only when the value of TLSVersion is tlsv1.2.\n99: Indicates adding a custom encryption suite."
            },
            "Required": false
          },
          "EnableTLSv3": {
            "Type": "Boolean",
            "Description": {
              "en": "Whether to support TSL1.3 version. This parameter is used only when the value of HttpsPorts is not empty (indicating that the domain name uses the HTTPS protocol). Value:\ntrue: indicates that TSL1.3 version is supported.\nfalse: indicates that TSL1.3 version is not supported."
            },
            "Required": false
          },
          "Port": {
            "Type": "Number",
            "Description": {
              "en": "Access the cloud product port of WAF."
            },
            "Required": true
          },
          "ResourceProduct": {
            "Type": "String",
            "Description": {
              "en": "Access to WAF cloud products."
            },
            "Required": true
          },
          "Certificates": {
            "AssociationPropertyMetadata": {
              "Parameters": {
                "AppliedType": {
                  "Type": "String",
                  "Description": {
                    "en": "The certificate type for the HTTPS protocol. Valid values:\ndefault: Indicates the default certificate.\nextension: Indicates an extended certificate."
                  },
                  "AllowedValues": [
                    "default",
                    "extension"
                  ],
                  "Required": false
                },
                "CertificateId": {
                  "Type": "String",
                  "Description": {
                    "en": "The ID of the certificate that was added."
                  },
                  "Required": false
                }
              }
            },
            "AssociationProperty": "List[Parameters]",
            "Type": "Json",
            "Description": {
              "en": "The domain name bound to the certificate."
            },
            "Required": false,
            "MinLength": 0,
            "MaxLength": 10
          },
          "Protocol": {
            "Type": "String",
            "Description": {
              "en": "Protocol type"
            },
            "Required": true
          },
          "ResourceInstanceId": {
            "Type": "String",
            "Description": {
              "en": "The instance ID of the cloud product connected to WAF."
            },
            "Required": true
          }
        }
      },
      "Type": "Json",
      "Description": {
        "en": "Listening information."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::WAF3::TGW",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Listen": {
          "Ref": "Listen"
        }
      }
    }
  },
  "Outputs": {
    "InstanceId": {
      "Description": "The ID of the WAF instance.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "InstanceId"
        ]
      }
    },
    "Port": {
      "Description": "Access the cloud product port of WAF.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Port"
        ]
      }
    },
    "ResourceProduct": {
      "Description": "Access to WAF cloud products.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ResourceProduct"
        ]
      }
    },
    "TgwId": {
      "Description": "The protection object ID of the transparent access resource.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TgwId"
        ]
      }
    }
  }
}