ALIYUN::WAF::AclRule类型用于为指定域名添加精准访问控制规则。

语法

{
  "Type": "ALIYUN::WAF::AclRule",
  "Properties": {
    "Rules": String,
    "InstanceId": String,
    "Domain": String,
    "Region": String,
    "RuleId": Integer
  }
}

属性

属性名称 类型 必须 允许更新 描述 约束
Rules String 精准访问控制规则详细信息,采用JSON格式的字符串表述。详情请参考:请求参数 无。
InstanceId String Web应用防火墙实例ID。 无。
Domain String 域名名称。 无。
Region String Web应用防火墙实例所在的地域。 取值范围:
  • cn:中国大陆地区(默认值)
  • cn-hongkong:海外地区
RuleId Integer 精准访问控制规则ID。 无。

返回值

Fn::GetAtt

无。

示例

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Resources": {
    "AclRule": {
      "Type": "ALIYUN::WAF::AclRule",
      "Properties": {
        "Rules": {
          "Ref": "Rules"
        },
        "InstanceId": {
          "Ref": "InstanceId"
        },
        "Domain": {
          "Ref": "Domain"
        },
        "Region": {
          "Ref": "Region"
        },
        "RuleId": {
          "Ref": "RuleId"
        }
      }
    }
  },
  "Parameters": {
    "Rules": {
      "Type": "String",
      "Description": "Detailed information of precise access control rules, expressed in JSON format strings."
    },
    "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."
    },
    "Region": {
      "Type": "String",
      "Description": "Examples of areas where the WAF. Value: cn: said China mainland (default) cn-hongkong: overseas representation",
      "AllowedValues": [
        "cn",
        "cn-hongkong"
      ]
    },
    "RuleId": {
      "Type": "Number",
      "Description": "Precise access control rule ID"
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Resources:
  AclRule:
    Type: ALIYUN::WAF::AclRule
    Properties:
      Rules:
        Ref: Rules
      InstanceId:
        Ref: InstanceId
      Domain:
        Ref: Domain
      Region:
        Ref: Region
      RuleId:
        Ref: RuleId
Parameters:
  Rules:
    Type: String
    Description: Detailed information of precise access control rules, expressed in
      JSON format strings.
  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.
  Region:
    Type: String
    Description: 'Examples of areas where the WAF. Value: cn: said China mainland
      (default) cn-hongkong: overseas representation'
    AllowedValues:
    - cn
    - cn-hongkong
  RuleId:
    Type: Number
    Description: Precise access control rule ID