You can compress multiple files into a ZIP package and then upload it to OBS for auto decompression online.
To achieve online decompression, configure a decompression policy before a package upload. If an uploaded package matches the configured policy, OBS automatically decompresses the package. Decompression policies do not apply to the ZIP packages that already exist in OBS before the policies are created.
Online decompression is currently available only in the CN North-Beijing4, CN South-Guangzhou, and CN East-Shanghai1 regions.
Procedure
- In the navigation pane of OBS Console, choose Object Storage.
- In the bucket list, click the bucket name you want. The Objects page is displayed.
- In the navigation pane, choose Data Processing > Online Decompression. The Online Decompression page is displayed.
- Click Create Online Decompression Policy.
- Configure the online decompression policy. Table 1 describes the related parameters.
Table 1 Parameter description
Parameter |
Description |
Policy Name |
Enter a policy name that is easy to remember. The value can contain 1 to 256 characters, and only uppercase letters, lowercase letters, digits, underscores (_), and hyphens (-) are allowed, for example, event_0001. |
Events |
Events that you want to trigger the online decompression policy for. Currently, the following event types are supported:
- ObjectCreated: all kinds of object creation operations, including PUT, POST, and COPY of objects, as well as the merging parts of multipart tasks
- Put: object upload using PUT
- Post: object upload using POST
- Copy: object copying using COPY
- CompleteMultipartUpload: merging parts of multipart tasks
NOTE:
To decompress the ZIP package that contains other ZIP packages, set the event type to ObjectCreated or CompleteMultipartUpload.
|
Prefix |
Optional. If this parameter is configured, the decompression policy applies to the packages whose name contains this prefix. The prefix cannot start with a slash (/) or contain double slashes (//), or contain special characters (\ : * ? " < > |). The total length of the prefix and suffix cannot exceed 1024 characters.
- With this parameter configured, ZIP packages whose name contains the specified prefix will trigger online decompression.
- With this parameter left blank, the decompression policy applies to all the uploaded ZIP packages.
|
Suffix |
If this parameter is specified, the decompression policy applies to the packages whose name contains this suffix. Currently, only ZIP packages are supported. |
Duplicate Name Processing |
This parameter specifies how the decompressed objects are processed if they have the same names as the existing objects in the bucket.
- Do not decompress: Retains the existing objects in the bucket, and does not decompress the objects with the same name.
- Rename the file: Renames the decompressed objects with the CRC32 value.
- Overwrite: Overwrites the existing objects with the same name in the bucket.
|
Decompress To |
Optional, this parameter specifies the path for storing decompressed files. It cannot contain special characters (\:*?\"<>|), start or end with a period (.), or contain two or more consecutive slashes (/). The value can contain 0 to 1023 characters.
|
IAM Agency |
Select an IAM agency of OBS, with permission OBS OperateAccess assigned to this agency. If no such agency is available, create one. |
- Click OK. The online decompression policy is created.