All Products
Search
Document Center

ApsaraVideo VOD:DeleteImage

Last Updated:Mar 03, 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. 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.

QPS limits

You can call this operation up to 50 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 limits on API operations in ApsaraVideo VOD.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:DeleteImageWrite
  • All Resources
    *
    none
none
vod:DeleteImageWrite
  • 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 multiple URLs. Separate multiple URLs with commas (,).

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

The ID of the image file. You can specify multiple image IDs. Separate multiple IDs 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. This method is applicable to images that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of the ImageId parameter from the response to the CreateUploadImage operation.
  • Obtain the value of the ImageId parameter from the response to the SearchMedia operation after you upload images.
Note This parameter is required only if you set DeleteImageType to ImageId.
bbc65bba53fed90de118a7849****,594228cdd14b4d069fc17a8c4a****
VideoIdstringNo

The ID of the video file. You can use one of the following methods to obtain the video 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. This method is applicable to files that are uploaded by using the ApsaraVideo VOD console.
  • Obtain the value of the VideoId parameter from the response to the CreateUploadVideo operation.
  • Obtain the value of the VideoId parameter from the response to the SearchMedia operation after you upload media files.
Note This parameter 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. This parameter is required only if you set DeleteImageType to VideoId. Valid values:

  • CoverSnapshot: thumbnail snapshot.
  • NormalSnapshot: normal snapshot.
  • SpriteSnapshot: sprite snapshot.
  • SpriteOriginSnapshot: sprite source snapshot.
  • All: images of all the preceding types. If this parameter is not set to All, you can specify multiple types and separate the types with commas (,).
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.