ALIYUN::ICE::InsertMediaToSearchLib

ALIYUN::ICE::InsertMediaToSearchLib类型用于插入媒资到搜索库。

语法

{
  "Type": "ALIYUN::ICE::InsertMediaToSearchLib",
  "Properties": {
    "Input": String,
    "MediaId": String,
    "MediaType": String,
    "MsgBody": Map,
    "SearchLibName": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Input

String

需要入库的视频、音频或图片文件的地址。

MediaId

String

媒资 ID。

MediaType

String

媒资类型。

取值:

  • video:视频(默认值)

  • image:图片

  • audio:音频

MsgBody

Map

媒资信息消息体。

SearchLibName

String

搜索库名称。

返回值

Fn::GetAtt

MediaId:媒资 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Input:
    Type: String
    Description:
      en: |-
        The URL of the video, audio, or image file that you want to import to the search library.
        Note: Make sure that you specify a correct file name and the bucket in which the file resides is in the same region where this operation is called. Otherwise, the file cannot be found or the operation may fail.
        Specify an Object Storage Service (OSS) URL in the following format: oss://[Bucket name]/[File path]. For example, you can specify oss://[example-bucket-]/[object_path-].
        Specify an HTTP URL in the following format: public endpoint. For example, you can specify http://example-test-****.mp4.
    Required: true
    Default: http://example-test.mp4
Resources:
  InsertMediaToSearchLib:
    Type: ALIYUN::ICE::InsertMediaToSearchLib
    Properties:
      Input:
        Ref: Input
Outputs:
  MediaId:
    Description: The ID of the media asset.
    Value:
      Fn::GetAtt:
        - InsertMediaToSearchLib
        - MediaId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Input": {
      "Type": "String",
      "Description": {
        "en": "The URL of the video, audio, or image file that you want to import to the search library.\nNote: Make sure that you specify a correct file name and the bucket in which the file resides is in the same region where this operation is called. Otherwise, the file cannot be found or the operation may fail.\nSpecify an Object Storage Service (OSS) URL in the following format: oss://[Bucket name]/[File path]. For example, you can specify oss://[example-bucket-]/[object_path-].\nSpecify an HTTP URL in the following format: public endpoint. For example, you can specify http://example-test-****.mp4."
      },
      "Required": true,
      "Default": "http://example-test.mp4"
    }
  },
  "Resources": {
    "InsertMediaToSearchLib": {
      "Type": "ALIYUN::ICE::InsertMediaToSearchLib",
      "Properties": {
        "Input": {
          "Ref": "Input"
        }
      }
    }
  },
  "Outputs": {
    "MediaId": {
      "Description": "The ID of the media asset.",
      "Value": {
        "Fn::GetAtt": [
          "InsertMediaToSearchLib",
          "MediaId"
        ]
      }
    }
  }
}