TransferOptions define the actions to be performed on objects in a transfer.
JSON representation |
---|
{ "overwriteObjectsAlreadyExistingInSink": boolean, "deleteObjectsUniqueInSink": boolean, "deleteObjectsFromSourceAfterTransfer": boolean, "overwriteWhen": enum ( |
Fields | |
---|---|
overwriteObjectsAlreadyExistingInSink |
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. |
deleteObjectsUniqueInSink |
Whether objects that exist only in the sink should be deleted. Note: This option and |
deleteObjectsFromSourceAfterTransfer |
Whether objects should be deleted from the source after they are transferred to the sink. Note: This option and |
overwriteWhen |
When to overwrite objects that already exist in the sink. If not set, overwrite behavior is determined by |
metadataOptions |
Represents the selected metadata options for a transfer job. |
OverwriteWhen
Specifies when to overwrite an object in the sink when an object with matching name is found in the source.
Enums | |
---|---|
OVERWRITE_WHEN_UNSPECIFIED |
Overwrite behavior is unspecified. |
DIFFERENT |
Overwrites destination objects with the source objects, only if the objects have the same name but different HTTP ETags or checksum values. |
NEVER |
Never overwrites a destination object if a source object has the same name. In this case, the source object is not transferred. |
ALWAYS |
Always overwrite the destination object with the source object, even if the HTTP Etags or checksum values are the same. |
MetadataOptions
Specifies the metadata options for running a transfer.
JSON representation |
---|
{ "symlink": enum ( |
Fields | |
---|---|
symlink |
Specifies how symlinks should be handled by the transfer. By default, symlinks are not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers. |
mode |
Specifies how each file's mode attribute should be handled by the transfer. By default, mode is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers. |
gid |
Specifies how each file's POSIX group ID (GID) attribute should be handled by the transfer. By default, GID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers. |
uid |
Specifies how each file's POSIX user ID (UID) attribute should be handled by the transfer. By default, UID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers. |
acl |
Specifies how each object's ACLs should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as ACL_DESTINATION_BUCKET_DEFAULT. |
storageClass |
Specifies the storage class to set on objects being transferred to Google Cloud Storage buckets. If unspecified, the default behavior is the same as |
temporaryHold |
Specifies how each object's temporary hold status should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as |
kmsKey |
Specifies how each object's Cloud KMS customer-managed encryption key (CMEK) is preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as |
timeCreated |
Specifies how each object's |
Symlink
Whether symlinks should be skipped or preserved during a transfer job.
Enums | |
---|---|
SYMLINK_UNSPECIFIED |
Symlink behavior is unspecified. |
SYMLINK_SKIP |
Do not preserve symlinks during a transfer job. |
SYMLINK_PRESERVE |
Preserve symlinks during a transfer job. |
Mode
Options for handling file mode attribute.
Enums | |
---|---|
MODE_UNSPECIFIED |
Mode behavior is unspecified. |
MODE_SKIP |
Do not preserve mode during a transfer job. |
MODE_PRESERVE |
Preserve mode during a transfer job. |
GID
Options for handling file GID attribute.
Enums | |
---|---|
GID_UNSPECIFIED |
GID behavior is unspecified. |
GID_SKIP |
Do not preserve GID during a transfer job. |
GID_NUMBER |
Preserve GID during a transfer job. |
UID
Options for handling file UID attribute.
Enums | |
---|---|
UID_UNSPECIFIED |
UID behavior is unspecified. |
UID_SKIP |
Do not preserve UID during a transfer job. |
UID_NUMBER |
Preserve UID during a transfer job. |
Acl
Options for handling Cloud Storage object ACLs.
Enums | |
---|---|
ACL_UNSPECIFIED |
ACL behavior is unspecified. |
ACL_DESTINATION_BUCKET_DEFAULT |
Use the destination bucket's default object ACLS, if applicable. |
ACL_PRESERVE |
Preserve the object's original ACLs. This requires the service account to have storage.objects.getIamPolicy permission for the source object. Uniform bucket-level access must not be enabled on either the source or destination buckets. |
StorageClass
Options for handling Google Cloud Storage object storage class.
Enums | |
---|---|
STORAGE_CLASS_UNSPECIFIED |
Storage class behavior is unspecified. |
STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT |
Use the destination bucket's default storage class. |
STORAGE_CLASS_PRESERVE |
Preserve the object's original storage class. This is only supported for transfers from Google Cloud Storage buckets. REGIONAL and MULTI_REGIONAL storage classes will be mapped to STANDARD to ensure they can be written to the destination bucket. |
STORAGE_CLASS_STANDARD |
Set the storage class to STANDARD. |
STORAGE_CLASS_NEARLINE |
Set the storage class to NEARLINE. |
STORAGE_CLASS_COLDLINE |
Set the storage class to COLDLINE. |
STORAGE_CLASS_ARCHIVE |
Set the storage class to ARCHIVE. |
TemporaryHold
Options for handling temporary holds for Google Cloud Storage objects.
Enums | |
---|---|
TEMPORARY_HOLD_UNSPECIFIED |
Temporary hold behavior is unspecified. |
TEMPORARY_HOLD_SKIP |
Do not set a temporary hold on the destination object. |
TEMPORARY_HOLD_PRESERVE |
Preserve the object's original temporary hold status. |
KmsKey
Options for handling the KmsKey setting for Google Cloud Storage objects.
Enums | |
---|---|
KMS_KEY_UNSPECIFIED |
KmsKey behavior is unspecified. |
KMS_KEY_DESTINATION_BUCKET_DEFAULT |
Use the destination bucket's default encryption settings. |
KMS_KEY_PRESERVE |
Preserve the object's original Cloud KMS customer-managed encryption key (CMEK) if present. Objects that do not use a Cloud KMS encryption key will be encrypted using the destination bucket's encryption settings. |
TimeCreated
Options for handling timeCreated
metadata for Google Cloud Storage objects.
Enums | |
---|---|
TIME_CREATED_UNSPECIFIED |
TimeCreated behavior is unspecified. |
TIME_CREATED_SKIP |
Do not preserve the timeCreated metadata from the source object. |
TIME_CREATED_PRESERVE_AS_CUSTOM_TIME |
Preserves the source object's timeCreated or lastModified metadata in the customTime field in the destination object. Note that any value stored in the source object's customTime field will not be propagated to the destination object. |