MCPcopy Create free account
hub / github.com/aws/aws-cli / CopyObjectTask

Class CopyObjectTask

awscli/s3transfer/copies.py:317–339  ·  view source on GitHub ↗

Task to do a nonmultipart copy

Source from the content-addressed store, hash-verified

315
316
317class CopyObjectTask(Task):
318 """Task to do a nonmultipart copy"""
319
320 def _main(
321 self, client, copy_source, bucket, key, extra_args, callbacks, size
322 ):
323 """
324 :param client: The client to use when calling PutObject
325 :param copy_source: The CopySource parameter to use
326 :param bucket: The name of the bucket to copy to
327 :param key: The name of the key to copy to
328 :param extra_args: A dictionary of any extra arguments that may be
329 used in the upload.
330 :param callbacks: List of callbacks to call after copy
331 :param size: The size of the transfer. This value is passed into
332 the callbacks
333
334 """
335 client.copy_object(
336 CopySource=copy_source, Bucket=bucket, Key=key, **extra_args
337 )
338 for callback in callbacks:
339 callback(bytes_transferred=size)
340
341
342class CopyPartTask(Task):

Callers 1

_submit_copy_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected