Resource: Job
The storage batch operations job description.
JSON representation |
---|
{ "name": string, "description": string, "loggingConfig": { object ( |
Fields | |
---|---|
name |
Identifier. The resource name of the job. Format: For example:
|
description |
Optional. A user-provided description for the job. Maximum length: 1024 bytes when unicode-encoded. |
loggingConfig |
Optional. Logging configuration. |
createTime |
Output only. The time that the job was created. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
scheduleTime |
Output only. The time that the job was scheduled. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
completeTime |
Output only. The time that the job was completed. Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
counters |
Output only. Information about the progress of the job. |
errorSummaries[] |
Output only. Summarizes errors encountered with sample error log entries. |
state |
Output only. State of the job. |
Union field source . Specifies objects to be transformed. source can be only one of the following: |
|
bucketList |
Specifies a list of buckets and their objects to be transformed. |
Union field transformation . Operation to be performed on the objects. transformation can be only one of the following: |
|
putObjectHold |
Changes object hold status. |
deleteObject |
Delete objects. |
putMetadata |
Updates object metadata. Allows updating fixed-key and custom metadata and fixed-key metadata. For example, |
rewriteObject |
Rewrites the object and updates metadata like KMS key. |
BucketList
Describes list of buckets and their objects to be transformed.
JSON representation |
---|
{
"buckets": [
{
object ( |
Fields | |
---|---|
buckets[] |
Required. List of buckets and their objects to be transformed. You can specify only one bucket per job. If multiple buckets are specified, an error occurs. |
Bucket
Describes configuration of a single bucket and its objects to be transformed.
JSON representation |
---|
{ "bucket": string, // Union field |
Fields | |
---|---|
bucket |
Required. Bucket name for the objects to be transformed. |
Union field object_configuration . Specifies objects to be transformed. object_configuration can be only one of the following: |
|
prefixList |
Specifies objects matching a prefix set. |
manifest |
Specifies objects in a manifest file. |
PrefixList
Describes prefixes of objects to be transformed.
JSON representation |
---|
{ "includedObjectPrefixes": [ string ] } |
Fields | |
---|---|
includedObjectPrefixes[] |
Optional. Specify one or more object prefixes. For example:
|
Manifest
Describes list of objects to be transformed.
JSON representation |
---|
{ "manifestLocation": string } |
Fields | |
---|---|
manifestLocation |
Required. Specify the manifest file location, for example, The file must include a header row with the following format:
Note: The manifest file must specify only objects within the bucket provided to the job. Rows referencing objects in other buckets are ignored. |
PutObjectHold
Describes options to update object hold.
JSON representation |
---|
{ "temporaryHold": enum ( |
Fields | |
---|---|
temporaryHold |
Required. Updates object temporary hold state. When object temporary hold is set, object cannot be deleted or replaced. |
eventBasedHold |
Required. Updates object event based holds state. When object event based hold is set, object cannot be deleted or replaced. Resets object's time in the bucket for the purposes of the retention period. |
HoldStatus
Describes the status of the hold.
Enums | |
---|---|
HOLD_STATUS_UNSPECIFIED |
Default value. Object hold status is not changed. |
SET |
Places the hold. |
UNSET |
Releases the hold. |
DeleteObject
Describes options to delete an object.
JSON representation |
---|
{ "permanentObjectDeletionEnabled": boolean } |
Fields | |
---|---|
permanentObjectDeletionEnabled |
Required. Controls deletion behavior when versioning is enabled for the object's bucket. If true, both live and noncurrent objects will be permanently deleted. Otherwise live objects in versioned buckets will become noncurrent and objects that were already noncurrent will be skipped. This setting doesn't have any impact on the Soft Delete feature. All objects deleted by this service can be be restored for the duration of the Soft Delete retention duration if enabled. If enabled and the manifest doesn't specify an object's generation, a |
PutMetadata
Describes options to update object metadata.
JSON representation |
---|
{ "customMetadata": { string: string, ... }, "contentDisposition": string, "contentEncoding": string, "contentLanguage": string, "contentType": string, "cacheControl": string, "customTime": string } |
Fields | |
---|---|
customMetadata |
Optional. Updates the object's custom metadata. This operation adds or sets individual custom metadata key-value pairs. Keys specified with empty values will have their values cleared. Existing custom metadata keys not included in the request remain unchanged. For details, see Custom-Metadata. An object containing a list of |
contentDisposition |
Optional. Updates objects |
contentEncoding |
Optional. Updates the objects |
contentLanguage |
Optional. Updates the objects fixed content language metadata. Metadata values must use ISO 639-1 language codes. The maximum length for metadata values is 100 characters. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see Content-Language. |
contentType |
Optional. Updates objects |
cacheControl |
Optional. Updates the objects |
customTime |
Optional. Updates the object's fixed custom time metadata. Unset values in the request are ignored. To clear the metadata, set an empty value. For details, see Custom-Time. |
RewriteObject
Describes options for object rewrite.
JSON representation |
---|
{ "kmsKey": string } |
Fields | |
---|---|
kmsKey |
Required. Resource name of the Cloud KMS key that is used to encrypt the object. The Cloud KMS key must be located in same location as the object. For details, see Encrypt an object with a Cloud KMS key Format: For example: |
LoggingConfig
Specifies the Cloud Logging behavior.
JSON representation |
---|
{ "logActions": [ enum ( |
Fields | |
---|---|
logActions[] |
Required. Specifies the actions to be logged. |
logActionStates[] |
Required. States in which actions are logged. If empty, no logs are generated. |
LoggableAction
Loggable actions types.
Enums | |
---|---|
LOGGABLE_ACTION_UNSPECIFIED |
Illegal value, to avoid allowing a default. |
TRANSFORM |
The corresponding transform action in this job. |
LoggableActionState
Loggable action states filter.
Enums | |
---|---|
LOGGABLE_ACTION_STATE_UNSPECIFIED |
Illegal value, to avoid allowing a default. |
SUCCEEDED |
LoggableAction completed successfully. SUCCEEDED actions are logged as [INFO][google.logging.type.LogSeverity.INFO]. |
FAILED |
LoggableAction terminated in an error state. FAILED actions are logged as [ERROR][google.logging.type.LogSeverity.ERROR]. |
Counters
Describes details about the progress of the job.
JSON representation |
---|
{ "totalObjectCount": string, "succeededObjectCount": string, "failedObjectCount": string } |
Fields | |
---|---|
totalObjectCount |
Output only. Number of objects listed. |
succeededObjectCount |
Output only. Number of objects completed. |
failedObjectCount |
Output only. Number of objects failed. |
ErrorSummary
A summary of errors by error code, plus a count and sample error log entries.
JSON representation |
---|
{ "errorCode": enum ( |
Fields | |
---|---|
errorCode |
Required. The canonical error code. |
errorCount |
Required. Number of errors encountered per |
errorLogEntries[] |
Required. Sample error logs. |
Code
Defines error codes used for handling gRPC API responses.
When multiple error codes apply, return the most specific error code. For example, prefer OUT_OF_RANGE
over FAILED_PRECONDITION
if both codes apply. Similarly prefer NOT_FOUND
or ALREADY_EXISTS
over FAILED_PRECONDITION
.
Enums | |
---|---|
OK |
Returned when the operation completes successfully. 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 HTTP Mapping: 500 Internal Server Error |
INVALID_ARGUMENT |
The client specified an invalid argument. Note that this differs from 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 (For example, 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, HTTP Mapping: 404 Not Found |
ALREADY_EXISTS |
The entity that a client attempted to create (For example, file or directory) already exists. HTTP Mapping: 409 Conflict |
PERMISSION_DENIED |
The caller does not have permission to execute the specified operation. 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
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 HTTP Mapping: 409 Conflict |
OUT_OF_RANGE |
The operation was attempted past the valid range. For example, seeking or reading past end-of-file. Unlike There is a fair bit of overlap between 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 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 |
---|
{ "objectUri": string, "errorDetails": [ string ] } |
Fields | |
---|---|
objectUri |
Required. Output only. Object URL. For example, |
errorDetails[] |
Optional. Output only. A maximum of 5 error log entries are recorded per error code for each job. |
State
Describes state of a job.
Enums | |
---|---|
STATE_UNSPECIFIED |
Default value. This value is unused. |
RUNNING |
In progress. |
SUCCEEDED |
Completed successfully. |
CANCELED |
Cancelled by the user. |
FAILED |
Terminated due to an unrecoverable failure. |
Methods |
|
---|---|
|
Cancels a batch job in a given project for a given location. |
|
Creates a batch job in a given project for a given location. |
|
Deletes a batch job in a given project for a given location. |
|
Gets a batch job in a given project for a given location. |
|
Lists all the batch jobs in a given project for a given location. |