ALIYUN::ThreatDetection::CycleTask类型用于新增通用计划扫描任务。
语法
{
"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
}
}
属性
|
属性名称 |
类型 |
必须 |
允许更新 |
描述 |
约束 |
|
Enable |
Integer |
是 |
是 |
是否启用任务。 |
取值:
|
|
FirstDateStr |
Integer |
是 |
是 |
任务首次执行时间。 |
无 |
|
IntervalPeriod |
Integer |
是 |
是 |
任务运行的间隔。 |
无 |
|
PeriodUnit |
String |
是 |
是 |
扫描间隔的单位。 |
取值:
|
|
TargetEndTime |
Integer |
是 |
是 |
任务结束时间。 |
单位:小时。 |
|
TargetStartTime |
Integer |
是 |
是 |
任务开始时间。 |
单位:小时。 |
|
TaskName |
String |
是 |
否 |
任务名称。 |
无 |
|
TaskType |
String |
是 |
否 |
任务类型。 |
取值:
|
|
Param |
Map |
否 |
是 |
附加信息。 |
无 |
|
Source |
String |
否 |
否 |
任务的附加来源。 |
无 |
返回值
Fn::GetAtt
-
TargetEndTime:任务结束时间。单位:小时。
-
TaskName:任务名称。
-
TaskType:任务类型。
-
Param:附加信息。
-
Enable:是否启用任务。
-
FirstDateStr:任务首次执行时间。
-
IntervalPeriod:任务运行的间隔。
-
TargetStartTime:任务开始时间。单位:小时。
-
ConfigId:配置ID。
-
PeriodUnit:扫描间隔的单位。
示例
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 time when the task is started. Unit: 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**: yes
* **0**: no.
AllowedValues:
- 0
- 1
Required: true
FirstDateStr:
Type: Number
Description:
en: The first time when the task is performed.
Required: true
IntervalPeriod:
Type: Number
Description:
en: The interval at which the task is run.
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 time when the task is started. Unit: 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 first time when the task is performed.
IntervalPeriod:
Value:
Fn::GetAtt:
- ExtensionResource
- IntervalPeriod
Description: The interval at which the task is run.
TaskType:
Value:
Fn::GetAtt:
- ExtensionResource
- TaskType
Description: The type of the task.
ConfigId:
Value:
Fn::GetAtt:
- ExtensionResource
- ConfigId
Description: 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 time when the task is started. Unit: 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:\n* **1**: yes\n* **0**: no."
},
"AllowedValues": [
0,
1
],
"Required": true
},
"FirstDateStr": {
"Type": "Number",
"Description": {
"en": "The first time when the task is performed."
},
"Required": true
},
"IntervalPeriod": {
"Type": "Number",
"Description": {
"en": "The interval at which the task is run."
},
"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 time when the task is started. Unit: 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 first time when the task is performed."
},
"IntervalPeriod": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"IntervalPeriod"
]
},
"Description": "The interval at which the task is run."
},
"TaskType": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TaskType"
]
},
"Description": "The type of the task."
},
"ConfigId": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"ConfigId"
]
},
"Description": "Configuration ID."
},
"TaskName": {
"Value": {
"Fn::GetAtt": [
"ExtensionResource",
"TaskName"
]
},
"Description": "The task name."
}
}
}该文章对您有帮助吗?