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": "The region where the WAF instance is located.
       Default value: cn.Valid 
       values: 
       cn: mainland China
       cn-hongkong: Hong Kong (China) and outside China",
      "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: 'The region where the WAF instance is located.
       Default value: cn.Valid 
       values: 
       cn: mainland China
       cn-hongkong: Hong Kong (China) and outside China'
    AllowedValues:
    - cn
    - cn-hongkong