The batch operation feature of COS allows you to perform specified operations on the specified object list in the bucket. You can generate an inventory of objects through the inventory feature as the specified object list, or record the objects to be processed in a CSV file according to the format requirement of an inventory file. Then, COS will process the objects in batches based on the object inventory file.
For more information, see Inventory Overview.
At present, the batch operation feature only supports the following operations:
You can use the batch operation feature in the COS console. For more information, see Batch Operation.
Batch operation is currently available only in public cloud regions in the Chinese mainland.
To perform a batch operation, you need to create a batch operation job first, which contains all the information needed to perform the specified operation on the object list. You can use an inventory as an object list.
After you provide an inventory file and start the created batch operation job, the batch operation feature will execute the specified operation on the objects in the inventory sequentially. During job execution, you can monitor the execution status in the COS console or choose to output a job report after the job is completed. The job report provides details about each operation in the job.
The batch operation feature is only applicable to objects in the current bucket. If you want to batch operate on the objects in another bucket, please enable the batch operation feature for that bucket.
An object inventory is a list of all the objects to be operated on. To create a batch operation job, you need to provide an object inventory first to tell COS what objects it should operate on. You need to put the object inventory file in the bucket and provide information such as the filename, ETag, and VersionID (if applicable). You can create an object inventory in the following two ways:
examplebucket-appid, exampleobject, PZ9ibn9D5lP6p298B7S9_ceqx1n5EJ0p examplebucket-appid, exampleobject, PZ9ibn9D5lP6p298B7S9_ceqx1n5EJ0p examplebucket-appid, exampleobject, jbo9_jhdPEyB4RrmOxWS0kU0EoNrU_oI
- If versioning is or was once enabled for your bucket, you must provide object versioning information in the object inventory. Before executing a job, COS will parse your inventory and determine the objects to be operated on based on the inventory.
- An object inventory can contain all the objects in a bucket. However, it may take a longer time to operate on a large number of objects.
- If version ID is not specified, COS will operate on the objects on the latest version by default. If you uploaded an object with the same name as an object to be operated on before creating a job, COS will operate on the object on the latest version by default rather than the version when the object inventory was created. To avoid this issue, you can enable versioning and specify the version ID in the object inventory.
This section describes how to create a batch operation job and how the system will respond after creation.
When creating a batch operation job, you need to provide the following information:
PUT Object-copy, you should make sure that your account has the
Get Objectpermission in the source bucket and the
PUT Objectpermission in the destination bucket. In addition, for all batch operation jobs, you should have permission to read the object inventory and write into the job report. For more information on permission configuration, see Access Policy Language Overview and Examples of Bucket Policies.