Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion google/cloud/storage/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ def copy_blob(
to the ``client`` stored on the current bucket.

:type preserve_acl: bool
:param preserve_acl: (Optional) Copies ACL from old blob to new blob.
:param preserve_acl: DEPRECATED. This argument is not functional!
(Optional) Copies ACL from old blob to new blob.
Default: True.

:type source_generation: long
Expand All @@ -1288,6 +1289,20 @@ def copy_blob(

:rtype: :class:`google.cloud.storage.blob.Blob`
:returns: The new Blob.

Example:
Copy a blob including ACL.

>>> from google.cloud import storage

>>> client = storage.Client(project="project")

>>> bucket = client.bucket("bucket")
>>> dst_bucket = client.bucket("destination-bucket")

>>> blob = bucket.blob("file.ext")
>>> new_blob = bucket.copy_blob(blob, dst_bucket)
>>> new_blob.acl.save(blob.acl)
"""
client = self._require_client(client)
query_params = {}
Expand Down