ALIYUN::Aligreen::OssStockTask

ALIYUN::Aligreen::OssStockTask类型用于创建OSS存量扫描任务。

语法

{
  "Type": "ALIYUN::Aligreen::OssStockTask",
  "Properties": {
    "Buckets": List,
    "StartDate": String,
    "AudioAntispamFreezeConfig": Map,
    "AudioOpened": Boolean,
    "AutoFreezeType": String,
    "AudioMaxSize": Integer,
    "AudioScenes": List,
    "AudioAutoFreezeOpened": Boolean,
    "AudioScanLimit": Integer,
    "BizType": String,
    "CallbackId": Integer,
    "EndDate": String,
    "ImageOpened": Boolean,
    "ImageLiveFreezeConfig": Map,
    "ImageAutoFreezeOpened": Boolean,
    "ImageScenes": List,
    "ImageTerrorismFreezeConfig": Map,
    "ImageScanLimit": Integer,
    "ImageAdFreezeConfig": Map,
    "ImagePornFreezeConfig": Map,
    "OssStockTaskName": String,
    "ScanImageNoFileType": Boolean,
    "VideoTerrorismFreezeConfig": Map,
    "VideoOpened": Boolean,
    "VideoFrameInterval": Integer,
    "VideoLiveFreezeConfig": Map,
    "VideoScanLimit": Integer,
    "VideoPornFreezeConfig": Map,
    "VideoAutoFreezeOpened": Boolean,
    "VideoVoiceAntispamFreezeConfig": Map,
    "VideoScenes": List,
    "VideoAdFreezeConfig": Map,
    "VideoMaxFrames": Integer,
    "VideoMaxSize": Integer
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Buckets

List

要扫描的OSSBucket配置列表。

最多支持配置20Bucket。示例:

[{"Bucket":"bucket_01","Selected":true,"Prefixes":["img/test_"],"Type":"exclude"}]

StartDate

String

要查询的起始时间。

格式为:yyyy-MM-dd HH:mm:ss Z。

AudioAntispamFreezeConfig

Map

语音自动冻结配置。

根据语音检测结果中的建议冻结结果。示例:

{"Type": "suggestion", "Value" : "block" }

AudioOpened

Boolean

OSS存量扫描任务是否扫描音频。

取值:

  • true:扫描

  • false:不扫描

AutoFreezeType

String

自动冻结类型。

取值:

  • acl:修改权限。

  • copy: 移动文件。

AudioMaxSize

Integer

单个音频的最大大小。

取值范围1~2048MB,默认为 200MB,超过则无法检测。

AudioScenes

List

OSS存量扫描任务中的音频检测方案。

取值:

  • antispam

AudioAutoFreezeOpened

Boolean

音频检测自动冻结开关。

取值:

  • true:自动冻结。

  • false:不自动冻结。

AudioScanLimit

Integer

OSS存量扫描任务中语音扫描的上限。

默认值为 1000Bucket。

BizType

String

使用OSS存量扫描任务的业务场景。

CallbackId

Integer

OSS存量扫描任务绑定的通知信息主键 ID。

EndDate

String

要查询的结束时间。

格式为:yyyy-MM-dd HH:mm:ss Z。

ImageOpened

Boolean

OSS存量扫描任务是否检测图像。

取值:

  • true:扫描图像,

  • false:不扫描图像。

ImageLiveFreezeConfig

Map

图片自动冻结实时场景配置。

结果将根据图片检测结果中的建议进行冻结。示例:

{"Type":"suggestion","Value":"block,review"}

ImageAutoFreezeOpened

Boolean

图像检测是否自动冻结开关。

取值:

  • true:自动冻结,

  • false:不自动冻结。

ImageScenes

List

OSS存量扫描任务中包含的图像处理方案。

取值:

  • porn: 色情内容检测。

  • terrorism: 恐怖主义内容检测。

  • ad: 违规广告检测。

  • live: 不良场景检测。

ImageTerrorismFreezeConfig

Map

图像自动冻结恐怖主义场景的配置。

结果将根据图片检测结果中的建议进行冻结。示例:

 {"Type": "suggestion", "Value": "block,review"}

ImageScanLimit

Integer

OSS存量扫描任务中扫描图像的上限。

ImageAdFreezeConfig

Map

图片自动冻结广告场景的配置。

结果将根据图片检测结果中的建议进行冻结。示例:

{"Type": "suggestion", "Value": "block,review"}

ImagePornFreezeConfig

Map

图片自动冻结色情场景配置。

结果将根据图片检测结果中的建议进行冻结。示例:

{"Type": "suggestion", "Value": "block,review"}

OssStockTaskName

String

OSS存量扫描任务名称。

ScanImageNoFileType

Boolean

OSS存量扫描任务是否检测文件名不带后缀的图片。

取值:

  • true:检测文件名不带后缀的图片

  • false:不检测文件名不带后缀的图片。

VideoTerrorismFreezeConfig

Map

视频自动冻结恐怖主义场景的配置。

结果将根据视频检测结果中的建议进行冻结。示例:

{"Type": "suggestion","Value":"block,review"}

VideoOpened

Boolean

OSS存量扫描任务检测视频。

取值:

  • true:扫描视频,

  • false:不扫描视频。

VideoFrameInterval

Integer

代表成帧频率的资源属性字段。

取值范围:

1~60 秒/帧,默认为 1 秒/帧。

VideoLiveFreezeConfig

Map

视频自动冻结实时场景配置。

结果将根据视频检测结果中的建议进行冻结。示例:

{"Type" : "suggestion", "Value" : "block" }

VideoScanLimit

Integer

OSS存量扫描任务中视频扫描的上限。

VideoPornFreezeConfig

Map

视频自动冻结色情场景配置。

结果将根据视频检测结果中的建议进行冻结。示例:

{"Type": "suggestion", "Value": "block,review"}

VideoAutoFreezeOpened

Boolean

视频检测自动冻结开关。

取值:

  • true:自动冻结,

  • false:不自动冻结。

VideoVoiceAntispamFreezeConfig

Map

视频中的语音自动冻结配置。

结果将根据视频检测结果中的建议进行冻结。示例:

{"Type": "suggestion", "Value" : "block" }

VideoScenes

List

OSS存量扫描任务中包含的视频检测场景。

取值:

  • porn: 色情内容检测。

  • terrorism: 恐怖主义内容检测。

  • ad: 违规广告检测。

  • live: 不良场景检测。

  • antispam:反垃圾邮件、视频语音反垃圾邮件。

VideoAdFreezeConfig

Map

视频会自动冻结广告情景配置。

结果将根据视频检测结果中的建议冻结。示例:

{"Type":"suggestion","Value":"block,review"}

VideoMaxFrames

Integer

单个视频帧剪切的上限。

取值范围:

5 至 20000 帧,默认值为 200 帧。

VideoMaxSize

Integer

单个视频的最大大小。

取值范围:

1~2048MB,默认值为 500MB,超过则无法检测。

返回值

Fn::GetAtt

  • ImageOpened:OSS存量扫描任务是否检测图像。

  • AudioAntispamFreezeConfig:语音自动冻结配置。

  • ScanImageNoFileType:OSS存量扫描任务是否检测文件名不带后缀的图片。

  • AudioOpened:OSS存量扫描任务是否扫描音频。

  • Buckets:要扫描的OSSBucket配置列表。

  • StartDate:要查询的起始时间。

  • ImageLiveFreezeConfig:图片自动冻结实时场景配置。

  • ImageAutoFreezeOpened:图像检测是否自动冻结开关。

  • AutoFreezeType:自动冻结类型。

  • ImageScenes:OSS存量扫描任务中包含的图像处理方案。

  • AudioMaxSize:单个音频的最大大小。

  • VideoTerrorismFreezeConfig:视频自动冻结恐怖主义场景的配置。

  • VideoOpened:OSS存量扫描任务检测视频。

  • ImageTerrorismFreezeConfig:图像自动冻结恐怖主义场景的配置。

  • CallbackId:与OSS存量扫描任务绑定的通知信息主键 ID。

  • ImageScanLimit:在OSS存量扫描任务中扫描图像的上限。

  • BizType:使用OSS存量扫描任务的业务场景。

  • ImageAdFreezeConfig:图片自动冻结广告场景的配置。

  • AudioScenes:在OSS存量扫描任务中的音频检测方案。

  • VideoFrameInterval:代表成帧频率的资源属性字段。

  • EndDate:要查询的结束时间。

  • ImagePornFreezeConfig:图片自动冻结色情场景配置。

  • VideoLiveFreezeConfig:视频自动冻结实时场景配置。

  • AudioAutoFreezeOpened:音频检测自动冻结开关。

  • VideoScanLimit:OSS存量扫描任务中视频扫描的上限。

  • VideoPornFreezeConfig:视频自动冻结色情场景配置。

  • VideoAutoFreezeOpened:视频检测自动冻结开关。

  • VideoVoiceAntispamFreezeConfig:视频中的语音自动冻结配置。

  • AudioScanLimit:OSS存量扫描任务中语音扫描的上限。

  • VideoScenes:OSS存量扫描任务中包含的视频检测场景。

  • VideoAdFreezeConfig:视频会自动冻结广告情景配置。

  • VideoMaxFrames:单个视频帧剪切的上限。

  • VideoMaxSize:单个视频的最大大小。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters: {}
Resources:
  ExtensionResource:
    Type: ALIYUN::Aligreen::OssStockTask
    Properties:
      Buckets:
        - Bucket: terraform-14945
          Selected: true
          Prefixes: []
          Region: cn-shanghai
          Type: exclude
      ImageOpened: true
      ImageScenes:
        - porn
      AutoFreezeType: acl
      StartDate: 2024-08-01 00:00:00 +0800
Outputs:
  ImageOpened:
    Description: oss stock scan task detect images.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageOpened
  AudioAntispamFreezeConfig:
    Description: Voice auto freeze configuration.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioAntispamFreezeConfig
  ScanImageNoFileType:
    Description: Whether the oss stock scan task detects images with file names without suffixes.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ScanImageNoFileType
  AudioOpened:
    Description: oss stock scan task detect audio.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioOpened
  Buckets:
    Description: The bucket configuration list of the oss stock scan task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Buckets
  StartDate:
    Description: The start time of the file upload time range represents the files uploaded after scanning this time point.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - StartDate
  ImageLiveFreezeConfig:
    Description: Picture automatic freezing live scene configuration.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageLiveFreezeConfig
  ImageAutoFreezeOpened:
    Description: 'Picture detection auto freeze switch. Value: true: auto freeze, false: not auto freeze.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageAutoFreezeOpened
  AutoFreezeType:
    Description: Automatic freeze type.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AutoFreezeType
  ImageScenes:
    Description: The image moderation scenario included in the oss stock scan task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageScenes
  AudioMaxSize:
    Description: Resource property field representing the maximum size of a single audio.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioMaxSize
  VideoTerrorismFreezeConfig:
    Description: The video automatically freezes the configuration of terrorism scenes.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoTerrorismFreezeConfig
  VideoOpened:
    Description: oss stock scan task detect video.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoOpened
  ImageTerrorismFreezeConfig:
    Description: The picture automatically freezes the configuration of terrorism scenes.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageTerrorismFreezeConfig
  CallbackId:
    Description: The ID of the primary key of the notification message bound to the oss stock scan task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - CallbackId
  ImageScanLimit:
    Description: 'The upper limit for scanning images in the oss stock scan task. '
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageScanLimit
  BizType:
    Description: Business scenarios used by the oss stock scan task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - BizType
  ImageAdFreezeConfig:
    Description: Picture automatically freezes the configuration of ad scenes.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImageAdFreezeConfig
  AudioScenes:
    Description: The audio detection scenarios included in the oss stock scan task. Set the value to antispam.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioScenes
  VideoFrameInterval:
    Description: Resource attribute field representing the framing frequency.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoFrameInterval
  EndDate:
    Description: The end time of the file upload time range indicates the scanning of files uploaded before this time point.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - EndDate
  ImagePornFreezeConfig:
    Description: Picture automatic freezing porn scene configuration.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ImagePornFreezeConfig
  VideoLiveFreezeConfig:
    Description: Video automatic freeze live scene configuration.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoLiveFreezeConfig
  AudioAutoFreezeOpened:
    Description: 'Audio detection auto freeze switch. Value: true: automatically freeze, false: not automatically freeze.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioAutoFreezeOpened
  VideoScanLimit:
    Description: The upper limit of video scanning in the oss stock scan task. The default value is 1000/Bucket.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoScanLimit
  VideoPornFreezeConfig:
    Description: 'Video automatic freezing porn scene configuration. '
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoPornFreezeConfig
  VideoAutoFreezeOpened:
    Description: 'Video detection auto freeze switch. Value: true: automatically freeze, false: not automatically freeze.'
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoAutoFreezeOpened
  VideoVoiceAntispamFreezeConfig:
    Description: Voice auto freeze configuration in video.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoVoiceAntispamFreezeConfig
  AudioScanLimit:
    Description: The upper limit of voice scan in the oss stock scan task. The default value is 1000/Bucket.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - AudioScanLimit
  VideoScenes:
    Description: The video detection scenarios included in the oss stock scan task.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoScenes
  VideoAdFreezeConfig:
    Description: The video automatically freezes the configuration of ad scenarios.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoAdFreezeConfig
  VideoMaxFrames:
    Description: A resource attribute field that represents the upper limit of a single video frame cut.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoMaxFrames
  VideoMaxSize:
    Description: Resource property field representing the maximum size of a single video.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - VideoMaxSize
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::Aligreen::OssStockTask",
      "Properties": {
        "Buckets": [
          {
            "Bucket": "terraform-14945",
            "Selected": true,
            "Prefixes": [],
            "Region": "cn-shanghai",
            "Type": "exclude"
          }
        ],
        "ImageOpened": true,
        "ImageScenes": [
          "porn"
        ],
        "AutoFreezeType": "acl",
        "StartDate": "2024-08-01 00:00:00 +0800"
      }
    }
  },
  "Outputs": {
    "ImageOpened": {
      "Description": "oss stock scan task detect images.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageOpened"
        ]
      }
    },
    "AudioAntispamFreezeConfig": {
      "Description": "Voice auto freeze configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioAntispamFreezeConfig"
        ]
      }
    },
    "ScanImageNoFileType": {
      "Description": "Whether the oss stock scan task detects images with file names without suffixes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ScanImageNoFileType"
        ]
      }
    },
    "AudioOpened": {
      "Description": "oss stock scan task detect audio.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioOpened"
        ]
      }
    },
    "Buckets": {
      "Description": "The bucket configuration list of the oss stock scan task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Buckets"
        ]
      }
    },
    "StartDate": {
      "Description": "The start time of the file upload time range represents the files uploaded after scanning this time point.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "StartDate"
        ]
      }
    },
    "ImageLiveFreezeConfig": {
      "Description": "Picture automatic freezing live scene configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageLiveFreezeConfig"
        ]
      }
    },
    "ImageAutoFreezeOpened": {
      "Description": "Picture detection auto freeze switch. Value: true: auto freeze, false: not auto freeze.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageAutoFreezeOpened"
        ]
      }
    },
    "AutoFreezeType": {
      "Description": "Automatic freeze type.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AutoFreezeType"
        ]
      }
    },
    "ImageScenes": {
      "Description": "The image moderation scenario included in the oss stock scan task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageScenes"
        ]
      }
    },
    "AudioMaxSize": {
      "Description": "Resource property field representing the maximum size of a single audio.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioMaxSize"
        ]
      }
    },
    "VideoTerrorismFreezeConfig": {
      "Description": "The video automatically freezes the configuration of terrorism scenes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoTerrorismFreezeConfig"
        ]
      }
    },
    "VideoOpened": {
      "Description": "oss stock scan task detect video.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoOpened"
        ]
      }
    },
    "ImageTerrorismFreezeConfig": {
      "Description": "The picture automatically freezes the configuration of terrorism scenes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageTerrorismFreezeConfig"
        ]
      }
    },
    "CallbackId": {
      "Description": "The ID of the primary key of the notification message bound to the oss stock scan task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "CallbackId"
        ]
      }
    },
    "ImageScanLimit": {
      "Description": "The upper limit for scanning images in the oss stock scan task. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageScanLimit"
        ]
      }
    },
    "BizType": {
      "Description": "Business scenarios used by the oss stock scan task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "BizType"
        ]
      }
    },
    "ImageAdFreezeConfig": {
      "Description": "Picture automatically freezes the configuration of ad scenes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImageAdFreezeConfig"
        ]
      }
    },
    "AudioScenes": {
      "Description": "The audio detection scenarios included in the oss stock scan task. Set the value to antispam.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioScenes"
        ]
      }
    },
    "VideoFrameInterval": {
      "Description": "Resource attribute field representing the framing frequency.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoFrameInterval"
        ]
      }
    },
    "EndDate": {
      "Description": "The end time of the file upload time range indicates the scanning of files uploaded before this time point.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "EndDate"
        ]
      }
    },
    "ImagePornFreezeConfig": {
      "Description": "Picture automatic freezing porn scene configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ImagePornFreezeConfig"
        ]
      }
    },
    "VideoLiveFreezeConfig": {
      "Description": "Video automatic freeze live scene configuration.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoLiveFreezeConfig"
        ]
      }
    },
    "AudioAutoFreezeOpened": {
      "Description": "Audio detection auto freeze switch. Value: true: automatically freeze, false: not automatically freeze.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioAutoFreezeOpened"
        ]
      }
    },
    "VideoScanLimit": {
      "Description": "The upper limit of video scanning in the oss stock scan task. The default value is 1000/Bucket.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoScanLimit"
        ]
      }
    },
    "VideoPornFreezeConfig": {
      "Description": "Video automatic freezing porn scene configuration. ",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoPornFreezeConfig"
        ]
      }
    },
    "VideoAutoFreezeOpened": {
      "Description": "Video detection auto freeze switch. Value: true: automatically freeze, false: not automatically freeze.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoAutoFreezeOpened"
        ]
      }
    },
    "VideoVoiceAntispamFreezeConfig": {
      "Description": "Voice auto freeze configuration in video.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoVoiceAntispamFreezeConfig"
        ]
      }
    },
    "AudioScanLimit": {
      "Description": "The upper limit of voice scan in the oss stock scan task. The default value is 1000/Bucket.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "AudioScanLimit"
        ]
      }
    },
    "VideoScenes": {
      "Description": "The video detection scenarios included in the oss stock scan task.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoScenes"
        ]
      }
    },
    "VideoAdFreezeConfig": {
      "Description": "The video automatically freezes the configuration of ad scenarios.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoAdFreezeConfig"
        ]
      }
    },
    "VideoMaxFrames": {
      "Description": "A resource attribute field that represents the upper limit of a single video frame cut.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoMaxFrames"
        ]
      }
    },
    "VideoMaxSize": {
      "Description": "Resource property field representing the maximum size of a single video.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "VideoMaxSize"
        ]
      }
    }
  }
}