ALIYUN::WAF::WafSwitch

更新时间:
复制 MD 格式

ALIYUN::WAF::WafSwitch is used to enable or disable Web attack protection.

Syntax

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

Properties

ParameterTypeRequiredEditableDescriptionConstraint
InstanceIdStringYesNot supportedWeb Application Firewall instance ID.None
DomainStringYesNot supportedThe domain name.None
ServiceOnIntegerYesYesWeb attack protection switchValid values:
  • 0: Disable the rule.
  • 1: Enable the rule.
RegionStringNot supportedSupportedThe region of the Web Application Firewall instance.Valid values:
  • cn: Chinese mainland (default)
  • cn-hongkong: China (Hong Kong) and other regions outside China

Return value

Fn::GetAtt

None

Examples

JSON format

{
  "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 format

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