Todos os produtos
Search
Central de documentação

Resource Orchestration Service:ALIYUN::ICE::InsertMediaToSearchLib

Última atualização: Jun 27, 2026

O recurso ALIYUN::ICE::InsertMediaToSearchLib adiciona um ativo de mídia a uma biblioteca de pesquisa.

Sintaxe

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

Propriedades

Propriedade

Tipo

Obrigatória

Editável

Descrição

Restrição

Input

String

Sim

Não

URL do arquivo de vídeo, áudio ou imagem para adicionar à biblioteca de pesquisa.

Nenhuma.

MediaId

String

Não

Não

ID do ativo de mídia.

Nenhuma.

MediaType

String

Não

Não

Tipo do ativo de mídia.

Valores válidos:

  • video (padrão)

  • image

  • audio

MsgBody

Map

Não

Sim

Corpo da mensagem do ativo de mídia.

Nenhuma.

SearchLibName

String

Não

Não

Nome da biblioteca de pesquisa.

Nenhuma.

Valores de retorno

Fn::GetAtt

MediaId: ID do ativo de mídia.

Exemplos

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