Class TransferOptions (1.11.2)

TransferOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)

TransferOptions define the actions to be performed on objects in a transfer.

Attributes

NameDescription
overwrite_objects_already_existing_in_sink bool
When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.
delete_objects_unique_in_sink bool
Whether objects that exist only in the sink should be deleted. **Note:** This option and delete_objects_from_source_after_transfer][google.storagetransfer.v1.TransferOptions.delete_objects_from_source_after_transfer] are mutually exclusive.
delete_objects_from_source_after_transfer bool
Whether objects should be deleted from the source after they are transferred to the sink. **Note:** This option and delete_objects_unique_in_sink][google.storagetransfer.v1.TransferOptions.delete_objects_unique_in_sink] are mutually exclusive.
overwrite_when google.cloud.storage_transfer_v1.types.TransferOptions.OverwriteWhen
When to overwrite objects that already exist in the sink. If not set, overwrite behavior is determined by overwrite_objects_already_existing_in_sink][google.storagetransfer.v1.TransferOptions.overwrite_objects_already_existing_in_sink].
metadata_options google.cloud.storage_transfer_v1.types.MetadataOptions
Represents the selected metadata options for a transfer job.

Classes

OverwriteWhen

OverwriteWhen(value)

Specifies when to overwrite an object in the sink when an object with matching name is found in the source.

Values: OVERWRITE_WHEN_UNSPECIFIED (0): Overwrite behavior is unspecified. DIFFERENT (1): Overwrites destination objects with the source objects, only if the objects have the same name but different HTTP ETags or checksum values. NEVER (2): Never overwrites a destination object if a source object has the same name. In this case, the source object is not transferred. ALWAYS (3): Always overwrite the destination object with the source object, even if the HTTP Etags or checksum values are the same.