ALIYUN::DDoSPro::SchedulerRule is used to create a scheduling rule for Sec-Traffic Manager.
Syntax
{
"Type": "ALIYUN::DDoSPro::SchedulerRule",
"Properties": {
"ResourceGroupId": String,
"Param": String,
"RuleType": Integer,
"Rules": String,
"RuleName": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
RuleName | String | Yes | No | The name of the scheduling rule. | None. |
Rules | String | Yes | No | The details of the scheduling rule. The value of this property must be a JSON string. | The value of Rules contains the following fields:
|
RuleType | Integer | Yes | No | The type of the scheduling rule. | Valid values:
|
Param | String | No | No | The details of the CDN interaction rule. The value of this property must be a JSON string. | The value of Param contains the following fields:
Example:
|
ResourceGroupId | String | No | No | The ID of the resource group to which the Anti-DDoS Proxy instance belongs in Resource Management. | By default, this property is empty. If you leave this property empty, the instance belongs to the default resource group. |
Return values
Fn::GetAtt
RuleName: the rule name.
Examples
YAML
format
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
format
{
"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"
]
}
}
}
}