## Resource: TransferOperation

A description of the execution of a transfer.

| JSON representation |
|---|
| ``` { "name": string, "projectId": string, "transferSpec": { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec`) }, "notificationConfig": { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/NotificationConfig`) }, "loggingConfig": { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/LoggingConfig`) }, "startTime": string, "endTime": string, "status": enum (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Status`), "counters": { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#TransferCounters`) }, "errorBreakdowns": [ { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#ErrorSummary`) } ], "transferJobName": string } ``` |

| Fields ||
|---|---|
| `name` | `string` A globally unique ID assigned by the system. |
| `projectId` | `string` The ID of the Google Cloud project that owns the operation. |
| `transferSpec` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/TransferSpec`)`` Transfer specification. |
| `notificationConfig` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/NotificationConfig`)`` Notification configuration. |
| `loggingConfig` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/LoggingConfig`)`` Cloud Logging configuration. |
| `startTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Start time of this transfer execution. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `endTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` End time of this transfer execution. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `status` | ``enum (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Status`)`` Status of the transfer operation. |
| `counters` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#TransferCounters`)`` Information about the progress of the transfer operation. |
| `errorBreakdowns[]` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#ErrorSummary`)`` Summarizes errors encountered with sample error log entries. |
| `transferJobName` | `string` The name of the transfer job that triggers this transfer operation. |

## Status

The status of a TransferOperation.

| Enums ||
|---|---|
| `STATUS_UNSPECIFIED` | Zero is an illegal value. |
| `IN_PROGRESS` | In progress. |
| `PAUSED` | Paused. |
| `SUCCESS` | Completed successfully. |
| `FAILED` | Terminated due to an unrecoverable failure. |
| `ABORTED` | Aborted by the user. |
| `QUEUED` | Temporarily delayed by the system. No user action is required. |
| `SUSPENDING` | The operation is suspending and draining the ongoing work to completion. |

## TransferCounters

A collection of counters that report the progress of a transfer operation.

| JSON representation |
|---|
| ``` { "objectsFoundFromSource": string, "bytesFoundFromSource": string, "objectsFoundOnlyFromSink": string, "bytesFoundOnlyFromSink": string, "objectsFromSourceSkippedBySync": string, "bytesFromSourceSkippedBySync": string, "objectsCopiedToSink": string, "bytesCopiedToSink": string, "objectsDeletedFromSource": string, "bytesDeletedFromSource": string, "objectsDeletedFromSink": string, "bytesDeletedFromSink": string, "objectsFromSourceFailed": string, "bytesFromSourceFailed": string, "objectsFailedToDeleteFromSink": string, "bytesFailedToDeleteFromSink": string, "directoriesFoundFromSource": string, "directoriesFailedToListFromSource": string, "directoriesSuccessfullyListedFromSource": string, "intermediateObjectsCleanedUp": string, "intermediateObjectsFailedCleanedUp": string, "unrestoredDeepArchiveObjectsSkippedCount": string, "unsupportedS3GlacierObjectsSkippedCount": string } ``` |

| Fields ||
|---|---|
| `objectsFoundFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects found in the data source that are scheduled to be transferred, excluding any that are filtered based on object conditions or skipped due to sync. |
| `bytesFoundFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes found in the data source that are scheduled to be transferred, excluding any that are filtered based on object conditions or skipped due to sync. |
| `objectsFoundOnlyFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects found only in the data sink that are scheduled to be deleted. |
| `bytesFoundOnlyFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes found only in the data sink that are scheduled to be deleted. |
| `objectsFromSourceSkippedBySync` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects in the data source that are not transferred because they already exist in the data sink. |
| `bytesFromSourceSkippedBySync` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes in the data source that are not transferred because they already exist in the data sink. |
| `objectsCopiedToSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects that are copied to the data sink. |
| `bytesCopiedToSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes that are copied to the data sink. |
| `objectsDeletedFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects that are deleted from the data source. |
| `bytesDeletedFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes that are deleted from the data source. |
| `objectsDeletedFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects that are deleted from the data sink. |
| `bytesDeletedFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes that are deleted from the data sink. |
| `objectsFromSourceFailed` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects in the data source that failed to be transferred or that failed to be deleted after being transferred. |
| `bytesFromSourceFailed` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes in the data source that failed to be transferred or that failed to be deleted after being transferred. |
| `objectsFailedToDeleteFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Objects that failed to be deleted from the data sink. |
| `bytesFailedToDeleteFromSink` | `string (https://developers.google.com/discovery/v1/type-format format)` Bytes that failed to be deleted from the data sink. |
| `directoriesFoundFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` For transfers involving PosixFilesystem only. Number of directories found while listing. For example, if the root directory of the transfer is `base/` and there are two other directories, `a/` and `b/` under this directory, the count after listing `base/`, `base/a/` and `base/b/` is 3. |
| `directoriesFailedToListFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` For transfers involving PosixFilesystem only. Number of listing failures for each directory found at the source. Potential failures when listing a directory include permission failure or block failure. If listing a directory fails, no files in the directory are transferred. |
| `directoriesSuccessfullyListedFromSource` | `string (https://developers.google.com/discovery/v1/type-format format)` For transfers involving PosixFilesystem only. Number of successful listings for each directory found at the source. |
| `intermediateObjectsCleanedUp` | `string (https://developers.google.com/discovery/v1/type-format format)` Number of successfully cleaned up intermediate objects. |
| `intermediateObjectsFailedCleanedUp` | `string (https://developers.google.com/discovery/v1/type-format format)` Number of intermediate objects failed cleaned up. |
| `unrestoredDeepArchiveObjectsSkippedCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Number of unrestored deep archive objects skipped. |
| `unsupportedS3GlacierObjectsSkippedCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Number of glacier objects skipped, glacier objects are unsupported by default regardless of the restore status. Allowlist the project to copy glacier objects if needed. |

## ErrorSummary

A summary of errors by error code, plus a count and sample error log entries.

| JSON representation |
|---|
| ``` { "errorCode": enum (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Code`), "errorCount": string, "errorLogEntries": [ { object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#ErrorLogEntry`) } ] } ``` |

| Fields ||
|---|---|
| `errorCode` | ``enum (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#Code`)`` Required. |
| `errorCount` | `string (https://developers.google.com/discovery/v1/type-format format)` Required. Count of this type of error. |
| `errorLogEntries[]` | ``object (`https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations#ErrorLogEntry`)`` Error samples. At most 5 error log entries are recorded for a given error code for a single transfer operation. |

## Code

The canonical error codes for Google APIs.

| Enums ||
|---|---|
| `OK` | Not an error; returned on success. HTTP Mapping: 200 OK |
| `CANCELLED` | The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request |
| `UNKNOWN` | Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error |
| `INVALID_ARGUMENT` | The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request |
| `DEADLINE_EXCEEDED` | The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout |
| `NOT_FOUND` | Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found |
| `ALREADY_EXISTS` | The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict |
| `PERMISSION_DENIED` | The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden |
| `UNAUTHENTICATED` | The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized |
| `RESOURCE_EXHAUSTED` | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests |
| `FAILED_PRECONDITION` | The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an "rmdir" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request |
| `ABORTED` | The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict |
| `OUT_OF_RANGE` | The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range \[0,2\^32-1\], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request |
| `UNIMPLEMENTED` | The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented |
| `INTERNAL` | Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error |
| `UNAVAILABLE` | The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable |
| `DATA_LOSS` | Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error |

## ErrorLogEntry

An entry describing an error that has occurred.

| JSON representation |
|---|
| ``` { "url": string, "errorDetails": [ string ] } ``` |

| Fields ||
|---|---|
| `url` | `string` Output only. A URL that refers to the target (a data source, a data sink, or an object) with which the error is associated. |
| `errorDetails[]` | `string` Optional. A list of messages that carry the error details. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations/cancel` | Cancels a transfer. |
| ### `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations/get` | Gets the latest state of a long-running operation. |
| ### `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations/list` | Lists transfer operations. |
| ### `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations/pause` | Pauses a transfer operation. |
| ### `https://docs.cloud.google.com/storage-transfer/docs/reference/rest/v1/transferOperations/resume` | Resumes a transfer operation that is paused. |