Copies an object to a new destination

gcs_copy_object(
  source_object,
  destination_object,
  source_bucket = gcs_get_global_bucket(),
  destination_bucket = gcs_get_global_bucket(),
  rewriteToken = NULL,
  destinationPredefinedAcl = NULL
)

Arguments

source_object

The name of the object to copy, or a gs:// URL

destination_object

The name of where to copy the object to, or a gs:// URL

source_bucket

The bucket of the source object

destination_bucket

The bucket of the destination

rewriteToken

Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true.

destinationPredefinedAcl

Apply a predefined set of access controls to the destination object. If not NULL must be one of the predefined access controls such as "bucketOwnerFullControl"

Value

If successful, a rewrite object.

See also