O recurso ALIYUN::ICE::MediaInfo registra um ativo de mídia no Intelligent Media Services (IMS).
Sintaxe
{
"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
}
}
Propriedades
|
Propriedade |
Tipo |
Obrigatória |
Editável |
Descrição |
Restrição |
|
InputURL |
String |
Sim |
Não |
URL do ativo de mídia em outro serviço. |
Associa-se ao ID do ativo de mídia no IMS e não pode ser modificada após o registro. Tipos de URL suportados:
|
|
BusinessType |
String |
Não |
Não |
Tipo de negócio do ativo de mídia. |
Valores válidos:
|
|
CateId |
Integer |
Não |
Sim |
ID da categoria. |
Nenhuma. |
|
CoverURL |
String |
Não |
Sim |
URL da miniatura. |
|
|
Description |
String |
Não |
Sim |
Descrição do ativo de mídia. |
|
|
MediaType |
String |
Não |
Não |
Tipo do ativo de mídia. |
Valores válidos:
|
|
MediaTags |
List |
Não |
Sim |
Tags. |
|
|
Overwrite |
Boolean |
Não |
Não |
Define se deve sobrescrever um ativo de mídia já registrado com a InputURL. |
|
|
RegisterConfig |
String |
Não |
Não |
Configuração de registro. |
Sprite sheets são geradas por padrão. Defina NeedSprite como false para desativar. Snapshots são gerados por padrão. Defina NeedSnapshot como false para desativar. |
|
ReferenceId |
String |
Não |
Sim |
ID personalizado. |
De 6 a 64 caracteres. Aceita letras, dígitos, hifens (-) e sublinhados (_). Deve ser único na conta. |
|
SmartTagTemplateId |
String |
Não |
Não |
ID do modelo de marcação inteligente. |
Valores válidos:
|
|
Title |
String |
Não |
Sim |
Título. |
Padrão: gerado automaticamente com base na data atual.
|
|
UserData |
Map |
Não |
Sim |
Dados do usuário. |
Suporta uma URL de callback personalizada.
|
|
WorkflowId |
String |
Não |
Não |
ID do fluxo de trabalho. |
Nenhuma. |
Valores de retorno
Fn::GetAtt
MediaId: o ID do ativo de mídia no IMS.
Exemplos
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"
]
}
}
}
}