All Products
Search
Document Center

ApsaraVideo VOD:DeleteImage

Last Updated:Dec 19, 2024

Deletes uploaded images and video snapshots that are automatically captured.

Operation description

  • After you call this operation to delete an image, the source file is permanently deleted and cannot be recovered. Exercise caution when you call this operation.
  • If some images are cached on Alibaba Cloud CDN points of presence (POPs), the image URLs do not immediately become invalid.
  • You can call this operation to delete uploaded images and video snapshots.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vod:DeleteImage
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DeleteImageTypestringYes

The method that is used to delete images. Valid values:

  • ImageURL: deletes images based on URLs.
  • ImageId: deletes images based on image IDs.
  • VideoId: deletes images associated with a video based on the video ID.
VideoId
ImageURLsstringNo

The URL of the image. You can obtain the value of ImageURL from the response to the CreateUploadImage operation. You can specify up to 20 URLs and separate them with commas (,).

Note This parameter takes effect and is required only if you set DeleteImageType to ImageURL.
https://example.aliyundoc.com/image/default/41AE7ADABBE*****.png
ImageIdsstringNo

The ID of the image. You can specify up to 20 image IDs and separate them with commas (,). You can use one of the following methods to obtain the image ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Image to view the image ID.
  • Obtain the image ID from the response to the CreateUploadImage operation that you call to obtain the upload credential and URL.
  • Obtain the image ID from the response to the SearchMedia operation that you call to query images.
Note This parameter takes effect and is required only if you set DeleteImageType to ImageId.
bbc65bba53fed90de118a7849****,594228cdd14b4d069fc17a8c4a****
VideoIdstringNo

The ID of the video. You can specify only one ID. You can use one of the following methods to obtain the ID:

  • Log on to the ApsaraVideo VOD console. In the left-side navigation pane, choose Media Files > Audio/Video. On the Video and Audio page, view the ID of the media file.
  • Obtain the video ID from the response to the CreateUploadVideo operation that you call to obtain the upload credential and URL.
  • Obtain the video ID from the response to the SearchMedia operation that you call to query videos.
Note This parameter takes effect and is required only if you set DeleteImageType to VideoId.
eb1861d2c9a8842340e989dd56****
ImageTypestringNo

The type of images that you want to delete. The images are associated with the video. Valid values:

  • CoverSnapshot: thumbnail snapshot.
  • NormalSnapshot: regular snapshot.
  • SpriteSnapshot: sprite snapshot.
  • SpriteOriginSnapshot: sprite source snapshot.
  • All: images of all the preceding types. You can specify multiple types other than All for this parameter. Separate multiple types with commas (,).
Note This parameter takes effect and is required only if you set DeleteImageType to VideoId.
All

Response parameters

ParameterTypeDescriptionExample
object

The returned result.

RequestIdstring

The ID of the request.

25818875-5F78-4AF6-D7393642CA58****

Examples

Sample success responses

JSONformat

{
  "RequestId": "25818875-5F78-4AF6-D7393642CA58****"
}

Error codes

For a list of error codes, visit the Service error codes.

Common errors

The following table describes the common errors that this operation can return.

Error codeError messageHTTP status codeDescription
NoSuchResourceThe specified resource does not exist.404The error message returned because the specified image does not exist.