文档

ALIYUN::DDoSPro::SchedulerRule

更新时间:

ALIYUN::DDoSPro::SchedulerRule类型用于流量调度器调度规则。

语法

{
  "Type": "ALIYUN::DDoSPro::SchedulerRule",
  "Properties": {
    "ResourceGroupId": String,
    "Param": String,
    "RuleType": Integer,
    "Rules": String,
    "RuleName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

RuleName

String

规则名称。

Rules

String

通用联动规则的详细信息,使用JSON格式的字符串表述。

具体结构如下:

  • Type: String类型,必选,联动资源的地址格式。取值:

    • A:IP 地址。

    • CNAME:域名。

  • Value:String类型,必选,联动资源的地址。

  • Priority:Integer类型,必选,规则优先级。取值范围:0~100,取值越大,优先级越高。

  • ValueType:Integer 类型,必选,联动资源的类型。取值:

    • 1:DDoS 高防IP。

    • 2:(阶梯防护)云资源IP。

    • 3:(出海加速)加速线路IP。

    • 5:(CDN 联动)加速域名。

    • 6:(云产品联动)云资源IP。

  • RegionId:String类型,可选(ValueType2时必选),地域ID。

RuleType

Integer

规则类型。

取值:

  • 2:阶梯防护。

  • 3:出海加速。

  • 5:CDN联动。

  • 6:云产品联动。

  • 8:安全加速。

Param

String

CDN联动规则的详细信息,使用JSON格式的字符串表达。

具体结构如下:

  • ParamType:必选,String类型,CDN 联动类型。取值:cdn,表示CDN联动。

  • ParamData:必选,Map类型,CDN联动参数。具体结构如下。

    • Domain:必选,String 类型,CDN加速域名。

    • Cname:必选,String 类型,加速域名CNAME地址。

    • AccessQps:必选,Integer类型,访问QPS阈值。超过阈值切换到DDoS 高防。

    • UpstreamQps:可选,Integer 类型,回源QPS阈值。低于阈值切换到CDN。

示例:

{"ParamType":"cdn","ParamData":{"Domain":"example.aliyundoc.com","Cname":"demo.aliyundoc.com","AccessQps":100,"UpstreamQps":100}}

ResourceGroupId

String

DDoS高防实例在资源管理产品中所属的资源组ID。

默认为空,即属于默认资源组。

返回值

Fn::GetAtt

RuleName:规则名称。

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  RuleType:
    Type: Number
    Description:
      en: |-
        The type of the custom defense rule. Valid values: 
        2: tiered protection 
        3: network acceleration 
        5: CDN interaction 
        6: cloud service interaction
    Required: true
  Rules:
    Type: String
    Description:
      en: |-
        The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter: 
        Type: the address type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type. Valid values: A: IP address. CNAME: domain name
        Value: the address of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type.
        Priority: the priority of the scheduling rule. This field is required and must be of the integer type. Valid values: 0 to 100. A larger value indicates a higher priority.
        ValueType: the type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the integer type. Valid values: 1: the IP address of the Anti-DDoS Pro or Anti-DDoS Premium instance. 2: the IP address of the interaction resource in the tiered protection scenario. 3: the IP address that is used to accelerate access in the network acceleration scenario. 5: the domain name that is configured in Alibaba Cloud CDN (CDN) in the CDN interaction scenario. 6 the IP address of the interaction resource in the cloud service interaction scenario 
        RegionId: the region where the interaction resource is deployed. This parameter must be specified when ValueType is set to 2. The value must be of the string type.
    Required: true
  RuleName:
    Type: String
    Description:
      en: The name of the rule.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::DDoSPro::SchedulerRule
    Properties:
      RuleType:
        Ref: RuleType
      Rules:
        Ref: Rules
      RuleName:
        Ref: RuleName
Outputs:
  RuleName:
    Description: The name of the rule.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RuleName

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "RuleType": {
      "Type": "Number",
      "Description": {
        "en": "The type of the custom defense rule. Valid values: \n2: tiered protection \n3: network acceleration \n5: CDN interaction \n6: cloud service interaction"
      },
      "Required": true
    },
    "Rules": {
      "Type": "String",
      "Description": {
        "en": "The details of the scheduling rule. This parameter is a JSON string. The following list describes the fields in the value of the parameter: \nType: the address type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type. Valid values: A: IP address. CNAME: domain name\nValue: the address of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the string type.\nPriority: the priority of the scheduling rule. This field is required and must be of the integer type. Valid values: 0 to 100. A larger value indicates a higher priority.\nValueType: the type of the interaction resource that you want to use in the scheduling rule. This field is required and must be of the integer type. Valid values: 1: the IP address of the Anti-DDoS Pro or Anti-DDoS Premium instance. 2: the IP address of the interaction resource in the tiered protection scenario. 3: the IP address that is used to accelerate access in the network acceleration scenario. 5: the domain name that is configured in Alibaba Cloud CDN (CDN) in the CDN interaction scenario. 6 the IP address of the interaction resource in the cloud service interaction scenario \nRegionId: the region where the interaction resource is deployed. This parameter must be specified when ValueType is set to 2. The value must be of the string type."
      },
      "Required": true
    },
    "RuleName": {
      "Type": "String",
      "Description": {
        "en": "The name of the rule."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::DDoSPro::SchedulerRule",
      "Properties": {
        "RuleType": {
          "Ref": "RuleType"
        },
        "Rules": {
          "Ref": "Rules"
        },
        "RuleName": {
          "Ref": "RuleName"
        }
      }
    }
  },
  "Outputs": {
    "RuleName": {
      "Description": "The name of the rule.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RuleName"
        ]
      }
    }
  }
}
                        
  • 本页导读 (1)