ALIYUN::DDoSPro::SchedulerRule类型用于流量调度器调度规则。
语法
{
"Type": "ALIYUN::DDoSPro::SchedulerRule",
"Properties": {
"ResourceGroupId": String,
"Param": String,
"RuleType": Integer,
"Rules": String,
"RuleName": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
RuleName | String | 是 | 否 | 规则名称。 | 无 |
Rules | String | 是 | 否 | 通用联动规则的详细信息,使用JSON格式的字符串表述。 | 具体结构如下:
|
RuleType | Integer | 是 | 否 | 规则类型。 | 取值:
|
Param | String | 否 | 否 | CDN联动规则的详细信息,使用JSON格式的字符串表达。 | 具体结构如下:
示例:
|
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"
]
}
}
}
}