All Products
Search
Document Center

ApsaraVideo Media Processing:UpdateMedia

Last Updated:Jun 11, 2026

Memperbarui informasi dasar tentang file media.

Deskripsi operasi

The basic information that you can update by calling this operation includes the title, description, and category of a media file. This operation applies to a full update. You must set all the parameters unless you want to replace the value of a specific parameter with a NULL value.

QPS limit

You can call this operation up to 100 times per second per account. Requests that exceed this limit are dropped and you will experience service interruptions. We recommend that you take note of this limit when you call this operation. For more information, see QPS limit.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

mts:UpdateMedia

update

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

MediaId

string

Yes

ID file media yang ingin Anda perbarui informasi dasarnya. Untuk mendapatkan ID file media, Anda dapat log on ke Konsol ApsaraVideo Media Processing (MPS) dan memilih Manajemen media > Daftar Media di panel navigasi sebelah kiri.

3e1cd21131a94525be55acf65888****

Title

string

No

Judul file media. Mendukung berbagai jenis karakter, seperti huruf dan angka.

  • Jika Anda tidak menentukan parameter ini, nilainya adalah NULL.

  • Nilai dikodekan dalam UTF-8 dan panjangnya dapat mencapai 128 byte.

hello

Description

string

No

Deskripsi file media. Mendukung berbagai jenis karakter, seperti huruf dan angka.

  • Jika Anda tidak menentukan parameter ini, nilainya adalah NULL.

  • Nilai dikodekan dalam UTF-8 dan panjangnya dapat mencapai 1,024 byte.

example description

CoverURL

string

No

URL Gambar mini. Parameter ini digunakan untuk menentukan lokasi penyimpanan Gambar mini. Untuk mendapatkan URL, Anda dapat log on ke Konsol MPS dan memilih Alur kerja > Bucket Media di panel navigasi sebelah kiri. Atau, Anda dapat log on ke Konsol OSS dan mengklik Bucket di panel navigasi sebelah kiri.

  • Nilai dapat memiliki panjang hingga 3.200 byte.

  • URL mematuhi RFC 2396 dan dikodekan dalam UTF-8, dengan karakter yang dicadangkan dikodekan persen. Untuk informasi lebih lanjut, lihat Pengodean URL.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com/test****.jpg

CateId

integer

No

ID kategori tempat file media berada. Nilai harus berupa bilangan bulat.

  • Jika Anda tidak menentukan parameter ini, nilainya adalah NULL.

  • Nilai tidak boleh negatif.

1

Tags

string

No

Tag yang ingin Anda tambahkan ke file media.

  • Anda dapat menentukan hingga 16 tag untuk sebuah file media. Pisahkan beberapa tag dengan koma (,).

  • Setiap tag dapat memiliki panjang hingga 32 byte.

  • Nilai dikodekan dalam UTF-8.

tag1,tag2

Elemen respons

Element

Type

Description

Example

object

The response parameters.

RequestId

string

The ID of the request.

6A88246F-C91F-42BD-BABE-DB0DF993F960

Media

object

The information about the media file.

CreationTime

string

The time when the media file was created.

2016-09-14T08:30:33Z

CateId

integer

The ID of the category to which the media file belongs.

1

Height

string

The height of the media file.

1080

CensorState

string

The review state of the media file. Valid values:

  • Initiated: The media file is uploaded but not reviewed.

  • Pass: The media file is uploaded and passes the review.

Initiated

Tags

object

Tag

array

The information about the tags.

string

The tags that you want to add to the media file.

tag1,tag2

Bitrate

string

The bitrate of the media file.

2659.326

MediaId

string

The ID of the media file.

3e1cd21131a94525be55acf65888****

File

object

The information about the input file.

State

string

The state of the input file. Valid values:

  • Normal: The input file is normal.

  • Deleted: The input file is deleted.

Normal

URL

string

The name of the OSS bucket in which the input media file is stored.

http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4

PublishState

string

The publishing state of the media file. Valid values:

  • Initiated: The media file is in the initial state.

  • UnPublish: The media file has not been published, and the playback permission on the OSS object is Private.

  • Published: The media file has been published, and the playback permission on the OSS object is Default.

  • Deleted: The media file is deleted.

Published

Description

string

The description of the media file.

example description

Width

string

The width of the media file.

1920

Size

string

The size of the media file.

2647692

CoverURL

string

The URL of the thumbnail.

http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg

RunIdList

object

RunId

array

The IDs of the media workflow execution instances.

string

The IDs of the media workflow execution instances.

{"RunId":["47b42486019c4f688bf144c1a6ba****"]}

Duration

string

The duration of the media file.

7.965000

Fps

string

The frame rate of the media file.

25.0

Title

string

The title of the media file.

hello

Format

string

The format of the media file. Valid values: mov, mp4, m4a, 3gp, 3g2, and mj2.

mov

Contoh

Respons sukses

JSONformat

{
  "RequestId": "6A88246F-C91F-42BD-BABE-DB0DF993F960",
  "Media": {
    "CreationTime": "2016-09-14T08:30:33Z",
    "CateId": 1,
    "Height": "1080",
    "CensorState": "Initiated",
    "Tags": {
      "Tag": [
        "tag1,tag2"
      ]
    },
    "Bitrate": "2659.326",
    "MediaId": "3e1cd21131a94525be55acf65888****",
    "File": {
      "State": "Normal",
      "URL": "http://example-bucket-****.oss-cn-hangzhou.aliyuncs.com//example-****.mp4"
    },
    "PublishState": "Published",
    "Description": "example description",
    "Width": "1920",
    "Size": "2647692",
    "CoverURL": "http://example-bucket-****.oss-cn-shanghai.aliyuncs.com/example-****.jpg",
    "RunIdList": {
      "RunId": [
        "{\"RunId\":[\"47b42486019c4f688bf144c1a6ba****\"]}"
      ]
    },
    "Duration": "7.965000",
    "Fps": "25.0",
    "Title": "hello",
    "Format": "mov"
  }
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.