Task to complete a multipart upload
| 359 | |
| 360 | |
| 361 | class CompleteMultipartUploadTask(Task): |
| 362 | """Task to complete a multipart upload""" |
| 363 | |
| 364 | def _main(self, client, bucket, key, upload_id, parts, extra_args): |
| 365 | """ |
| 366 | :param client: The client to use when calling CompleteMultipartUpload |
| 367 | :param bucket: The name of the bucket to upload to |
| 368 | :param key: The name of the key to upload to |
| 369 | :param upload_id: The id of the upload |
| 370 | :param parts: A list of parts to use to complete the multipart upload:: |
| 371 | |
| 372 | [{'Etag': etag_value, 'PartNumber': part_number}, ...] |
| 373 | |
| 374 | Each element in the list consists of a return value from |
| 375 | ``UploadPartTask.main()``. |
| 376 | :param extra_args: A dictionary of any extra arguments that may be |
| 377 | used in completing the multipart transfer. |
| 378 | """ |
| 379 | return client.complete_multipart_upload( |
| 380 | Bucket=bucket, |
| 381 | Key=key, |
| 382 | UploadId=upload_id, |
| 383 | MultipartUpload={'Parts': parts}, |
| 384 | **extra_args, |
| 385 | ) |
no outgoing calls
no test coverage detected