ALIYUN::DDoSPro::SceneDefensePolicy is used to create a scenario-specific custom policy.
Syntax
{
"Type": "ALIYUN::DDoSPro::SceneDefensePolicy",
"Properties": {
"EndTime": Integer,
"StartTime": Integer,
"Name": String,
"Template": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
EndTime | Integer | Yes | No | The end time of the policy. | This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
Name | String | Yes | No | The policy name. | None. |
StartTime | Integer | Yes | No | The start time of the policy. | This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. |
Template | String | Yes | No | The template of the policy. | Valid values:
|
Return values
Fn::GetAtt
Name: the policy name.
Examples
YAML
format
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
EndTime:
Type: Number
Description:
en: 'The end time of the policy. This value is a UNIX timestamp. Units: milliseconds.'
Required: true
StartTime:
Type: Number
Description:
en: 'The start time of the policy. This value is a UNIX timestamp. Units: milliseconds.'
Required: true
Template:
Type: String
Description:
en: |-
The template of the policy. Valid values:
promotion: important activity
bypass: all traffic forwarded
AllowedValues:
- promotion
- bypass
Required: true
Name:
Type: String
Description:
en: The name of the policy.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::DDoSPro::SceneDefensePolicy
Properties:
EndTime:
Ref: EndTime
StartTime:
Ref: StartTime
Template:
Ref: Template
Name:
Ref: Name
Outputs:
Name:
Description: The name of the policy.
Value:
Fn::GetAtt:
- ExtensionResource
- Name
JSON
format
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"EndTime": {
"Type": "Number",
"Description": {
"en": "The end time of the policy. This value is a UNIX timestamp. Units: milliseconds."
},
"Required": true
},
"StartTime": {
"Type": "Number",
"Description": {
"en": "The start time of the policy. This value is a UNIX timestamp. Units: milliseconds."
},
"Required": true
},
"Template": {
"Type": "String",
"Description": {
"en": "The template of the policy. Valid values:\npromotion: important activity\nbypass: all traffic forwarded"
},
"AllowedValues": [
"promotion",
"bypass"
],
"Required": true
},
"Name": {
"Type": "String",
"Description": {
"en": "The name of the policy."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::DDoSPro::SceneDefensePolicy",
"Properties": {
"EndTime": {
"Ref": "EndTime"
},
"StartTime": {
"Ref": "StartTime"
},
"Template": {
"Ref": "Template"
},
"Name": {
"Ref": "Name"
}
}
}
},
"Outputs": {
"Name": {
"Description": "The name of the policy.",
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Name"
]
}
}
}
}