The ALIYUN::ThreatDetection::CycleTask resource creates a general scheduled scan task.
Syntax
{
"Type": "ALIYUN::ThreatDetection::CycleTask",
"Properties": {
"Enable": Integer,
"FirstDateStr": Integer,
"IntervalPeriod": Integer,
"PeriodUnit": String,
"TargetEndTime": Integer,
"TaskName": String,
"TaskType": String,
"TargetStartTime": Integer,
"Param": Map,
"Source": String
}
}Properties
Parameter | Type | Required | Editable | Description | Constraints |
Enable | Integer | Yes | Yes | Specifies whether to enable the task. | Valid values:
|
FirstDateStr | Integer | Yes | Yes | The time of the first task execution. | None |
IntervalPeriod | Integer | Yes | Yes | The task execution interval. | None |
PeriodUnit | String | Yes | Yes | The unit of the scan interval. | Valid values:
|
TargetEndTime | Integer | Yes | Yes | The end time for the task. | The unit is hours. |
TargetStartTime | Integer | Yes | Yes | The start time for the task. | The unit is hours. |
TaskName | String | Yes | No | The task name. | None |
TaskType | String | Yes | No | The task type. | Valid values:
|
Param | Map | No | Yes | The additional information. | None |
Source | String | No | No | The additional source for the task. | None |
Return values
Fn::GetAtt
TargetEndTime: The end time for the task. The unit is hours.
TaskName: The task name.
TaskType: The task type.
Param: The additional information.
Enable: Specifies whether to enable the task.
FirstDateStr: The time of the first task execution.
IntervalPeriod: The task execution interval.
TargetStartTime: The start time for the task. The unit is hours.
ConfigId: The configuration ID.
PeriodUnit: The unit of the scan interval.
Examples
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TargetEndTime:
Type: Number
Description:
en: 'The time when the task ends. Unit: hours.'
Required: true
PeriodUnit:
Type: String
Description:
en: |-
The unit of the scan interval. Valid values:
* **day**
* **hour**
AssociationProperty: PayPeriodUnit
AllowedValues:
- day
- hour
Required: true
TargetStartTime:
Type: Number
Description:
en: 'The start time for the task. The unit is hours.'
Required: true
Param:
Description:
en: The additional information.
Required: false
Default: Null
Type: Json
Source:
Type: String
Description:
en: The additional source for the task.
Default: Null
Required: false
Enable:
Type: Number
Description:
en: |-
Specifies whether to enable the task. Valid values:
* **1**: Enabled
* **0**: Disabled
AllowedValues:
- 0
- 1
Required: true
FirstDateStr:
Type: Number
Description:
en: The time of the first task execution.
Required: true
IntervalPeriod:
Type: Number
Description:
en: The task execution interval.
Required: true
TaskType:
Type: String
Description:
en: |-
The type of the task. Valid values:
* **VIRUS_VUL_SCHEDULE_SCAN**: virus scan task
* **IMAGE_SCAN**: image scan task
* **EMG_VUL_SCHEDULE_SCAN**: urgent vulnerability scan task
AllowedValues:
- VIRUS_VUL_SCHEDULE_SCAN
- IMAGE_SCAN
- EMG_VUL_SCHEDULE_SCAN
Required: true
TaskName:
Type: String
Description:
en: The task name.
Required: true
Resources:
ExtensionResource:
Type: ALIYUN::ThreatDetection::CycleTask
Properties:
TargetEndTime:
Ref: TargetEndTime
PeriodUnit:
Ref: PeriodUnit
TargetStartTime:
Ref: TargetStartTime
Param:
Ref: Param
Source:
Ref: Source
Enable:
Ref: Enable
FirstDateStr:
Ref: FirstDateStr
IntervalPeriod:
Ref: IntervalPeriod
TaskType:
Ref: TaskType
TaskName:
Ref: TaskName
Outputs:
TargetEndTime:
Value:
Fn::GetAtt:
- ExtensionResource
- TargetEndTime
Description: 'The time when the task ends. Unit: hours.'
PeriodUnit:
Value:
Fn::GetAtt:
- ExtensionResource
- PeriodUnit
Description: The unit of the scan interval.
TargetStartTime:
Value:
Fn::GetAtt:
- ExtensionResource
- TargetStartTime
Description: 'The start time for the task. The unit is hours.'
Param:
Value:
Fn::GetAtt:
- ExtensionResource
- Param
Description: The additional information.
Enable:
Value:
Fn::GetAtt:
- ExtensionResource
- Enable
Description: Specifies whether to enable the task.
FirstDateStr:
Value:
Fn::GetAtt:
- ExtensionResource
- FirstDateStr
Description: The time of the first task execution.
IntervalPeriod:
Value:
Fn::GetAtt:
- ExtensionResource
- IntervalPeriod
Description: The task execution interval.
TaskType:
Value:
Fn::GetAtt:
- ExtensionResource
- TaskType
Description: The type of the task.
ConfigId:
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigId
Description: 'The configuration ID.'
TaskName:
Value:
Fn::GetAtt:
- ExtensionResource
- TaskName
Description: The task name.
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TargetEndTime": {
"Type": "Number",
"Description": {
"en": "The time when the task ends. Unit: hours."
},
"Required": true
},
"PeriodUnit": {
"Type": "String",
"Description": {
"en": "The unit of the scan interval. Valid values:\n* **day**\n* **hour**"
},
"AssociationProperty": "PayPeriodUnit",
"AllowedValues": [
"day",
"hour"
],
"Required": true
},
"TargetStartTime": {
"Type": "Number",
"Description": {
"en": "The start time for the task. The unit is hours."
},
"Required": true
},
"Param": {
"Description": {
"en": "The additional information."
},
"Required": false,
"Default": null,
"Type": "Json"
},
"Source": {
"Type": "String",
"Description": {
"en": "The additional source for the task."
},
"Default": null,
"Required": false
},
"Enable": {
"Type": "Number",
"Description": {
"en": "Specifies whether the task is enabled. Valid values:\n* **1**: Enabled\n* **0**: Disabled"
},
"AllowedValues": [
0,
1
],
"Required": true
},
"FirstDateStr": {
"Type": "Number",
"Description": {
"en": "The time of the first task execution."
},
"Required": true
},
"IntervalPeriod": {
"Type": "Number",
"Description": {
"en": "The task execution interval."
},
"Required": true
},
"TaskType": {
"Type": "String",
"Description": {
"en": "The type of the task. Valid values:\n* **VIRUS_VUL_SCHEDULE_SCAN**: virus scan task\n* **IMAGE_SCAN**: image scan task\n* **EMG_VUL_SCHEDULE_SCAN**: urgent vulnerability scan task"
},
"AllowedValues": [
"VIRUS_VUL_SCHEDULE_SCAN",
"IMAGE_SCAN",
"EMG_VUL_SCHEDULE_SCAN"
],
"Required": true
},
"TaskName": {
"Type": "String",
"Description": {
"en": "The task name."
},
"Required": true
}
},
"Resources": {
"ExtensionResource": {
"Type": "ALIYUN::ThreatDetection::CycleTask",
"Properties": {
"TargetEndTime": {
"Ref": "TargetEndTime"
},
"PeriodUnit": {
"Ref": "PeriodUnit"
},
"TargetStartTime": {
"Ref": "TargetStartTime"
},
"Param": {
"Ref": "Param"
},
"Source": {
"Ref": "Source"
},
"Enable": {
"Ref": "Enable"
},
"FirstDateStr": {
"Ref": "FirstDateStr"
},
"IntervalPeriod": {
"Ref": "IntervalPeriod"
},
"TaskType": {
"Ref": "TaskType"
},
"TaskName": {
"Ref": "TaskName"
}
}
}
},
"Outputs": {
"TargetEndTime": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TargetEndTime"
]
},
"Description": "The time when the task ends. Unit: hours."
},
"PeriodUnit": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"PeriodUnit"
]
},
"Description": "The unit of the scan interval."
},
"TargetStartTime": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TargetStartTime"
]
},
"Description": "The start time for the task. The unit is hours."
},
"Param": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Param"
]
},
"Description": "The additional information."
},
"Enable": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"Enable"
]
},
"Description": "Specifies whether to enable the task."
},
"FirstDateStr": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"FirstDateStr"
]
},
"Description": "The time of the first task execution."
},
"IntervalPeriod": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"IntervalPeriod"
]
},
"Description": "The task execution interval."
},
"TaskType": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TaskType"
]
},
"Description": "The type of the task."
},
"ConfigId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigId"
]
},
"Description": "The configuration ID."
},
"TaskName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TaskName"
]
},
"Description": "The task name."
}
}
}