Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::WAF::DomainConfig

Última atualização: Jun 27, 2026

O recurso ALIYUN::WAF::DomainConfig adiciona configurações de nome de domínio ao Web Application Firewall (WAF).

Sintaxe

{
  "Type": "ALIYUN::WAF::DomainConfig",
  "Properties": {
    "HttpToUserIp": Integer,
    "Domain": String,
    "SourceIps": String,
    "InstanceId": String,
    "Region": String,
    "HttpPort": String,
    "LoadBalancing": Integer,
    "HttpsPort": String,
    "RsType": Integer,
    "IsAccessProduct": Integer,
    "HttpsRedirect": Integer,
    "Protocols": String
  }
}

Propriedades

Propriedade Tipo Obrigatório Editável Descrição Restrição
HttpToUserIp Integer Não Sim Define se o recurso de back-to-origin via HTTP deve ser ativado. Quando habilitado, a instância do WAF usa HTTP para encaminhar solicitações HTTPS à origem.
Nota Se o seu site não oferecer suporte a acesso HTTPS, ative o recurso de back-to-origin via HTTP para permitir o acesso HTTPS por meio do WAF. Por padrão, a porta 80 é usada para encaminhar as solicitações à origem.
Valor padrão: 0. Valores válidos:
  • 0: desativa o recurso de back-to-origin via HTTP.
  • 1: ativa o recurso de back-to-origin via HTTP.
Domain String Sim Não Nome de domínio. Nenhuma
SourceIps String Não Sim Endereço IP de origem. Especifique vários endereços IP separados por vírgula. Exemplo: ["1.1.1.1", "10.0.0.0"]. Nenhuma
InstanceId String Sim Não ID da instância do WAF. Nenhuma
Region String Não Sim Região onde a instância do WAF está localizada. Valor padrão: cn. Valores válidos:
  • cn: China continental
  • cn-hongkong: China (Hong Kong) e regiões fora da China
HttpPort String Não Sim Número da porta HTTP. Separe vários números de porta com vírgulas (,). Exemplo: [80, 8000]. Parâmetro obrigatório se Protocols estiver definido como HTTP. Valor padrão: 80. Especifique HttpPort ou HttpsPort na solicitação.
LoadBalancing Integer Não Sim Política de balanceamento de carga para tráfego de back-to-origin. Valores válidos:
  • 0: IP hash
  • 1: round robin
HttpsPort String Não Sim Número da porta HTTPS. Separe vários números de porta HTTPS com vírgulas (,). Exemplo: [443]. Parâmetro obrigatório se Protocols estiver definido como https. Valor padrão: 443. Especifique HttpPort ou HttpsPort na solicitação.
RsType Integer Não Não Tipo de endereço de origem do nome de domínio. Valores válidos:
  • 0: endereço IP.
  • 1: nome de domínio.
IsAccessProduct Integer Sim Não Indica se há um proxy de camada 7, como Anti-DDoS Pro ou CDN, configurado para filtrar o tráfego de entrada antes do encaminhamento ao WAF. Valores válidos:
  • 0: nenhum proxy de camada 7 configurado.
  • 1: proxy de camada 7 configurado.
HttpsRedirect Integer Não Sim Define se as solicitações HTTP devem ser redirecionadas para HTTPS. Valor padrão: 0. Valores válidos:
  • 0: sem redirecionamento de HTTP para HTTPS.
  • 1: redireciona HTTP para HTTPS.
Especifique este parâmetro apenas quando Protocols estiver definido como https. Se definido como 1, as solicitações HTTP serão redirecionadas para a porta HTTPS 443.
Protocols String Sim Não Protocolos de acesso compatíveis com o nome de domínio. Valores válidos:
  • http
  • https
  • http,https

Parâmetros de resposta

Fn::GetAtt

  • ProtocolType: tipo de protocolo compatível. 0 indica HTTP, 1 indica HTTPS e 2 indica ambos (HTTP e HTTPS).

  • Cname: CNAME atribuído pelo WAF.

Exemplos

Formato JSON

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "HttpToUserIp": {
      "Type": "Number",
      "Description": "Whether to open HTTPS access request is forwarded back to the source station via the HTTP protocol, the value of:\n0: off (default)\n1: Turn\nNote If your site does not support HTTPS back to the source, open source HTTP return (default back to the source port is port 80) function key, can be realized by WAF HTTPS access.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "HttpPort": {
      "Type": "String",
      "Description": "HTTP protocol configuration port. When specifying a plurality of HTTP port \",\" separated. Example values: [80].\nConfigure the HTTP protocol, this parameter is required. The default value is 80. HttpPort HttpsPort with at least two parameters need to fill a request."
    },
    "IsAccessProduct": {
      "Type": "Number",
      "Description": "The domain before WAF is configured with seven agents (eg, high defense, CDN, etc.), the value of:\n0: none.\n1: expressed.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "RsType": {
      "Type": "Number",
      "Description": "Back to the source address type the domain name values:\n0: back to the source to IP.\n1: Indicates the domain name back to the source.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "Protocols": {
      "Type": "String",
      "Description": "The domain supports access protocols, values:\nhttp: expressed support for the HTTP protocol.\nhttps: support for HTTPS protocol.\nhttp, https: supports HTTP, HTTPS protocol."
    },
    "InstanceId": {
      "Type": "String",
      "Description": "WAF instance ID.\nDescription Interface You can view your current WAF instance ID by calling DescribePayInfo."
    },
    "SourceIps": {
      "Type": "String",
      "Description": "Source station IP, supports a plurality of specified IP. Example values: [ \"1.1.1.1\"]."
    },
    "HttpsRedirect": {
      "Type": "Number",
      "Description": "HTTPS is turned forcefully jump the argument:\n0: off (default)\n1: Turn\nDescription required to complete the request parameters using only HTTPS access protocol. After opening force will show a jump HTTP request is HTTPS, a default jump to 443.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "Region": {
      "Type": "String",
      "Description": "Examples of areas where the WAF. Value:\ncn: China mainland (default)\ncn-hongkong: China HongKong and other overseas",
      "AllowedValues": [
        "cn",
        "cn-hongkong"
      ]
    },
    "Domain": {
      "Type": "String",
      "Description": "Domain name."
    },
    "LoadBalancing": {
      "Type": "Number",
      "Description": "Back to the source load balancing policy values:\n0: IP Hash way.\n1: represents a polling mode.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "HttpsPort": {
      "Type": "String",
      "Description": "HTTPS protocol configuration port. When specifying a plurality HTTPS port, using the \",\" separated. Example values: [443].\nConfigure the protocol is HTTPS, this parameter is required. The default value is 443. HttpPort HttpsPort with at least two parameters need to fill a request."
    }
  },
  "Resources": {
    "DomainConfig": {
      "Type": "ALIYUN::WAF::DomainConfig",
      "Properties": {
        "HttpToUserIp": {
          "Ref": "HttpToUserIp"
        },
        "HttpPort": {
          "Ref": "HttpPort"
        },
        "IsAccessProduct": {
          "Ref": "IsAccessProduct"
        },
        "RsType": {
          "Ref": "RsType"
        },
        "Protocols": {
          "Ref": "Protocols"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "SourceIps": {
          "Ref": "SourceIps"
        },
        "HttpsRedirect": {
          "Ref": "HttpsRedirect"
        },
        "Region": {
          "Ref": "Region"
        },
        "Domain": {
          "Ref": "Domain"
        },
        "LoadBalancing": {
          "Ref": "LoadBalancing"
        },
        "HttpsPort": {
          "Ref": "HttpsPort"
        }
      }
    }
  },
  "Outputs": {
    "ProtocolType": {
      "Description": "agreement type:0: indicates that the HTTP protocol is supported.1: indicates that the HTTPS protocol is supported.2: indicates that both HTTP and HTTPS protocols are supported.",
      "Value": {
        "Fn::GetAtt": [
          "DomainConfig",
          "ProtocolType"
        ]
      }
    },
    "Cname": {
      "Description": "CNAME assigned by WAF instance.",
      "Value": {
        "Fn::GetAtt": [
          "DomainConfig",
          "Cname"
        ]
      }
    }
  }
}

Formato YAML

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  HttpToUserIp:
    Type: Number
    Description: >-
      Whether to open HTTPS access request is forwarded back to the source
      station via the HTTP protocol, the value of:
      0: off (default)
      1: Turn
      Note If your site does not support HTTPS back to the source, open source
      HTTP return (default back to the source port is port 80) function key, can
      be realized by WAF HTTPS access.
    AllowedValues:
      - 0
      - 1
  HttpPort:
    Type: String
    Description: >-
      HTTP protocol configuration port. When specifying a plurality of HTTP port
      "," separated. Example values: [80].
      Configure the HTTP protocol, this parameter is required. The default value
      is 80. HttpPort HttpsPort with at least two parameters need to fill a
      request.
  IsAccessProduct:
    Type: Number
    Description: >-
      The domain before WAF is configured with seven agents (eg, high defense,
      CDN, etc.), the value of:
      0: none.
      1: expressed.
    AllowedValues:
      - 0
      - 1
  RsType:
    Type: Number
    Description: |-
      Back to the source address type the domain name values:
      0: back to the source to IP.
      1: Indicates the domain name back to the source.
    AllowedValues:
      - 0
      - 1
  Protocols:
    Type: String
    Description: |-
      The domain supports access protocols, values:
      http: expressed support for the HTTP protocol.
      https: support for HTTPS protocol.
      http, https: supports HTTP, HTTPS protocol.
  InstanceId:
    Type: String
    Description: >-
      WAF instance ID.
      Description Interface You can view your current WAF instance ID by calling
      DescribePayInfo.
  SourceIps:
    Type: String
    Description: >-
      Source station IP, supports a plurality of specified IP. Example values: [
      "1.1.1.1"].
  HttpsRedirect:
    Type: Number
    Description: >-
      HTTPS is turned forcefully jump the argument:
      0: off (default)
      1: Turn
      Description required to complete the request parameters using only HTTPS
      access protocol. After opening force will show a jump HTTP request is
      HTTPS, a default jump to 443.
    AllowedValues:
      - 0
      - 1
  Region:
    Type: String
    Description: |-
      Examples of areas where the WAF. Value:
      cn: China mainland (default)
      cn-hongkong: China HongKong and other overseas
    AllowedValues:
      - cn
      - cn-hongkong
  Domain:
    Type: String
    Description: Domain name.
  LoadBalancing:
    Type: Number
    Description: |-
      Back to the source load balancing policy values:
      0: IP Hash way.
      1: represents a polling mode.
    AllowedValues:
      - 0
      - 1
  HttpsPort:
    Type: String
    Description: >-
      HTTPS protocol configuration port. When specifying a plurality HTTPS port,
      using the "," separated. Example values: [443].
      Configure the protocol is HTTPS, this parameter is required. The default
      value is 443. HttpPort HttpsPort with at least two parameters need to fill
      a request.
Resources:
  DomainConfig:
    Type: 'ALIYUN::WAF::DomainConfig'
    Properties:
      HttpToUserIp:
        Ref: HttpToUserIp
      HttpPort:
        Ref: HttpPort
      IsAccessProduct:
        Ref: IsAccessProduct
      RsType:
        Ref: RsType
      Protocols:
        Ref: Protocols
      InstanceId:
        Ref: InstanceId
      SourceIps:
        Ref: SourceIps
      HttpsRedirect:
        Ref: HttpsRedirect
      Region:
        Ref: Region
      Domain:
        Ref: Domain
      LoadBalancing:
        Ref: LoadBalancing
      HttpsPort:
        Ref: HttpsPort
Outputs:
  ProtocolType:
    Description: >-
      agreement type:0: indicates that the HTTP protocol is supported.1:
      indicates that the HTTPS protocol is supported.2: indicates that both HTTP
      and HTTPS protocols are supported.
    Value:
      'Fn::GetAtt':
        - DomainConfig
        - ProtocolType
  Cname:
    Description: CNAME assigned by WAF instance.
    Value:
      'Fn::GetAtt':
        - DomainConfig
        - Cname