ALIYUN::WAF::WafSwitch类型用于打开或关闭Web攻击防护功能开关。

语法

{
  "Type": "ALIYUN::WAF::WafSwitch",
  "Properties": {
    "InstanceId": String,
    "Domain": String,
    "ServiceOn": Integer,
    "Region": String
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
InstanceId String Web应用防火墙实例ID。 无。
Domain String 域名名称。 无。
ServiceOn Integer Web攻击防护功能开关。 取值范围:
  • 0:表示关闭。
  • 1:表示开启。
Region String Web应用防火墙实例所在的地域。 取值范围:
  • cn:中国大陆地区(默认值)
  • cn-hongkong:海外地区

返回值

Fn::GetAtt

无。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "WafSwitch": {
      "Type": "ALIYUN::WAF::WafSwitch",
      "Properties": {
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Domain": {
          "Ref": "Domain"
        },
        "ServiceOn": {
          "Ref": "ServiceOn"
        },
        "Region": {
          "Ref": "Region"
        }
      }
    }
  },
  "Parameters": {
    "InstanceId": {
      "Type": "String",
      "Description": "WAF instance ID. Description Interface You can view your current WAF instance ID by calling DescribePayInfo."
    },
    "Domain": {
      "Type": "String",
      "Description": "Domain name."
    },
    "ServiceOn": {
      "Type": "Number",
      "Description": "Web attack protection switch, the value of: 0: closed. 1: indicate on.",
      "AllowedValues": [
        0,
        1
      ]
    },
    "Region": {
      "Type": "String",
      "Description": "Examples of areas where the WAF. Value: cn: said China mainland (default) cn-hongkong: overseas representation",
      "AllowedValues": [
        "cn",
        "cn-hongkong"
      ]
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  WafSwitch:
    Type: ALIYUN::WAF::WafSwitch
    Properties:
      InstanceId:
        Ref: InstanceId
      Domain:
        Ref: Domain
      ServiceOn:
        Ref: ServiceOn
      Region:
        Ref: Region
Parameters:
  InstanceId:
    Type: String
    Description: WAF instance ID. Description Interface You can view your current
      WAF instance ID by calling DescribePayInfo.
  Domain:
    Type: String
    Description: Domain name.
  ServiceOn:
    Type: Number
    Description: 'Web attack protection switch, the value of: 0: closed. 1: indicate
      on.'
    AllowedValues:
    - 0
    - 1
  Region:
    Type: String
    Description: 'Examples of areas where the WAF. Value: cn: said China mainland
      (default) cn-hongkong: overseas representation'
    AllowedValues:
    - cn
    - cn-hongkong