ALIYUN::ThreatDetection::CycleTask

更新时间:
复制为 MD 格式

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

是否启用任务。

取值:

  • 1:是

  • 0:否。

FirstDateStr

Integer

任务首次执行时间。

IntervalPeriod

Integer

任务运行的间隔。

PeriodUnit

String

扫描间隔的单位。

取值:

  • day

  • hour

TargetEndTime

Integer

任务结束时间。

单位:小时。

TargetStartTime

Integer

任务开始时间。

单位:小时。

TaskName

String

任务名称。

TaskType

String

任务类型。

取值:

  • VIRUS_VUL_SCHEDULE_SCAN:病毒扫描任务

  • IMAGE_SCAN:镜像扫描任务

  • EMG_VUL_SCHEDULE_SCAN:紧急漏洞扫描任务。

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."
    }
  }
}