All Products
Search
Document Center

Intelligent Media Management:CreateFileUncompressionTask

Last Updated:Dec 11, 2024

Extracts the specified files from a ZIP, RAR, or 7z package to the specified directory or decompresses the entire package.

Operation description

Note The operation is in public preview. For any inquires, join our DingTalk group (ID: 88490020073) and share your questions with us.
  • Before you call this operation, make sure that you are familiar with the billing of Intelligent Media Management (IMM).****

    **

    Note Asynchronous processing does not guarantee timely task completion.

  • The operation supports a package that contains up to 80,000 files.

  • The operation supports ZIP or RAR packages up to 200 GB in size, or 7z packages up to 50 GB in size.

  • The operation extracts files in streams to the specified directory. If the file extraction task is interrupted by a corrupt file, files that have been extracted are not deleted.

  • This operation is an asynchronous operation. After a task is executed, the task information is retained only for seven days and cannot be retrieved when the retention period elapses. You can call the GetTask or ListTasks operation to query information about the task.`` If you specify Notification , you can obtain information about the task based on notifications.

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
imm:CreateFileUncompressionTaskcreate
*Project
acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
ProjectNamestringYes

The name of the project.

immtest
CredentialConfigCredentialConfigNo

If you have no special requirements, leave this parameter empty.

The configurations of authorization chains. For more information, see Use authorization chains to access resources of other entities.

PasswordstringNo

The password that protects the package.

123456
UserDatastringNo

The custom information, which is returned in an asynchronous notification and facilitates notification management. The maximum length of the value is 2,048 bytes.

{"ID": "user1","Name": "test-user1","Avatar": "http://example.com?id=user1"}
SelectedFilesarrayNo

The files to extract. If you do not specify this parameter, the entire package is decompressed.

stringNo

The path of the file to extract. The path is relative to the root directory of the package.

rar5/1.jpg
SourceURIstringYes

The OSS URI of the package.

Specify the OSS URI in the oss://${Bucket}/${Object} format, where ${Bucket} is the name of the bucket in the same region as the current project and ${Object} is the path of the object with the extension included.

oss://imm-apitest-fxf2/name.zip
NotificationNotificationNo

The notification settings. For information about the asynchronous notification format, see Asynchronous message examples.

TargetURIstringNo

The OSS URI to which you want to extract files from the package or decompress the entire package.

Specify the OSS URI in the oss://${Bucket}/${Object} format, where ${Bucket} is the name of the bucket in the same region as the current project and ${Object} is the path of the object with the extension included.

oss://test-bucket/test-dir/

If you want to obtain detailed information about the decompression task, specify the ExtendedMessageURI parameter in Notification. The object specified by this parameter contains task information organized in the following structure:

{
  "Password" : "the password that protects the package.",
  "IsEncryption": "indicates whether the package is password-protected. The value is true or false.",
  "ArchiveFiles": [
    {
      "URI": "the URI of the extracted file. Example: oss://test-bucket/test-dir/test.txt",
      "PathName": "the path of the file relative to the package. Example: ./test.txt",
      "Reason": "the reason for a preview failure",
      "IsFolder": "indicates whether the file is a directory. The value is true or false.",
      "PackedSize": "the size of the file in the package.",
      "UnPackedSize": "the size of the file after it is extracted from the package.",
      "FileAccessTime": "the last access time of the file.",
    },
    {
      "URI": "oss://test-bucket/test-dir/text.doc",
      "PathName": "./text.doc",
      "Reason": "",
      "IsFolder": "true",
      "PackedSize": "102",
      "UnPackedSize": "150",
      "FileAccessTime": "2023-07-21T09:46:35Z",
    },
  ]
}

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

EC564A9A-BA5C-4499-A087-D9B9E76E*****
EventIdstring

The event ID.

0ED-1Bz8z71k5TtsUejT4UJ16Es*****
TaskIdstring

The task ID.

FileUncompression-16ab5dd6-af02-480e-9ed7-a8d51b1*****

Examples

Sample success responses

JSONformat

{
  "RequestId": "EC564A9A-BA5C-4499-A087-D9B9E76E*****",
  "EventId": "0ED-1Bz8z71k5TtsUejT4UJ16Es*****",
  "TaskId": "FileUncompression-16ab5dd6-af02-480e-9ed7-a8d51b1*****"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-08-30The request parameters of the API has changedView Change Details
2023-04-03The request parameters of the API has changedView Change Details
2023-03-09The request parameters of the API has changedView Change Details