ALIYUN::ICE::MediaInfo类型用于注册内容库资源。
语法
{
"Type": "ALIYUN::ICE::MediaInfo",
"Properties": {
"InputURL": String,
"BusinessType": String,
"CateId": Integer,
"CoverURL": String,
"Description": String,
"MediaType": String,
"MediaTags": List,
"Overwrite": Boolean,
"RegisterConfig": String,
"ReferenceId": String,
"SmartTagTemplateId": String,
"Title": String,
"UserData": Map,
"WorkflowId": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
InputURL | String | 是 | 否 | 待注册的媒资在相应系统中的地址。 | 一经注册不可更改,并与 IMS 的 mediaId 绑定。
|
BusinessType | String | 否 | 否 | 媒资业务类型。 | 取值范围:
|
CateId | Integer | 否 | 是 | 分类 ID。 | 无 |
CoverURL | String | 否 | 是 | 封面地址。 |
|
Description | String | 否 | 是 | 内容描述。 |
|
MediaType | String | 否 | 否 | 媒资媒体类型。 | 取值范围:
|
MediaTags | List | 否 | 是 | 标签。 |
|
Overwrite | Boolean | 否 | 否 | 是否覆盖已注册媒资。 |
|
RegisterConfig | String | 否 | 否 | 注册配置。 | 默认为媒资生成雪碧图,如不需要可以手动设置 NeedSprite 字段为 false。 默认生成截图,如不需要可以手动设置 NeedSnapshot 字段为 false。 |
ReferenceId | String | 否 | 是 | 自定义 ID。 | 仅支持小写字母、大写字母、数字、横线、下划线,长度 6-64 位。需保证用户维度唯一。 |
SmartTagTemplateId | String | 否 | 否 | 智能标签模板。 | 取值:
|
Title | String | 否 | 是 | 标题。 | 若不提供,根据日期自动生成默认 title。
|
UserData | Map | 否 | 是 | 用户数据。 | 支持自定义回调地址配置,配置说明可参考配置剪辑完成时的回调
|
WorkflowId | String | 否 | 否 | 工作流 ID。 | 无 |
返回值
Fn::GetAtt
MediaId:IMS 媒资 ID。
示例
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
InputURL:
Type: String
Description:
en: |-
The URL of the media asset in another service. The URL is associated with the ID of the media asset in IMS. The URL cannot be modified once registered. The following types of URLs are supported:
OSS URL in one of the following formats:
http(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4
oss://example-bucket/example.mp4: In this format, it is considered by default that the region of the OSS bucket in which the media asset resides is the same as the region in which IMS is activated.
URL of an ApsaraVideo VOD media asset
vod://***20b48fb04483915d4f2cd8ac****
Required: true
Resources:
MediaInfo:
Type: ALIYUN::ICE::MediaInfo
Properties:
InputURL:
Ref: InputURL
Outputs:
MediaId:
Description: The ID of the media asset in IMS.
Value:
Fn::GetAtt:
- MediaInfo
- MediaId
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"InputURL": {
"Type": "String",
"Description": {
"en": "The URL of the media asset in another service. The URL is associated with the ID of the media asset in IMS. The URL cannot be modified once registered. The following types of URLs are supported:\nOSS URL in one of the following formats:\nhttp(s)://example-bucket.oss-cn-shanghai.aliyuncs.com/example.mp4\noss://example-bucket/example.mp4: In this format, it is considered by default that the region of the OSS bucket in which the media asset resides is the same as the region in which IMS is activated.\nURL of an ApsaraVideo VOD media asset\nvod://***20b48fb04483915d4f2cd8ac****"
},
"Required": true
}
},
"Resources": {
"MediaInfo": {
"Type": "ALIYUN::ICE::MediaInfo",
"Properties": {
"InputURL": {
"Ref": "InputURL"
}
}
}
},
"Outputs": {
"MediaId": {
"Description": "The ID of the media asset in IMS.",
"Value": {
"Fn::GetAtt": [
"MediaInfo",
"MediaId"
]
}
}
}
}