REST Resource: projects.locations.jobs

Resource: Job

The storage batch operations job description.

JSON representation
{
  "name": string,
  "description": string,
  "loggingConfig": {
    object (LoggingConfig)
  },
  "createTime": string,
  "scheduleTime": string,
  "completeTime": string,
  "counters": {
    object (Counters)
  },
  "errorSummaries": [
    {
      object (ErrorSummary)
    }
  ],
  "state": enum (State),
  "dryRun": boolean,
  "isMultiBucketJob": boolean,

  // Union field source can be only one of the following:
  "bucketList": {
    object (BucketList)
  },
  "projectSource": {
    object (ProjectSource)
  }
  // End of list of possible types for union field source.

  // Union field transformation can be only one of the following:
  "putObjectHold": {
    object (PutObjectHold)
  },
  "deleteObject": {
    object (DeleteObject)
  },
  "putMetadata": {
    object (PutMetadata)
  },
  "rewriteObject": {
    object (RewriteObject)
  },
  "updateObjectCustomContext": {
    object (UpdateObjectCustomContext)
  },
  "setObjectAcls": {
    object (SetObjectAcls)
  }
  // End of list of possible types for union field transformation.
}
Fields
name

string

Identifier. The resource name of the job.

Format: projects/{projectId}/locations/global/jobs/{jobId}.

For example: projects/123456/locations/global/jobs/job01.

jobId is unique in a given project.

description

string

Optional. A user-provided description for the job.

Maximum length: 1024 bytes when unicode-encoded.

loggingConfig

object (LoggingConfig)

Optional. Logging configuration.

createTime

string (Timestamp format)

Output only. The time that the job was created.

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".

scheduleTime

string (Timestamp format)

Output only. The time that the job was scheduled.

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".

completeTime

string (Timestamp format)

Output only. The time that the job was completed.

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".

counters

object (Counters)

Output only. Information about the progress of the job.

errorSummaries[]

object (ErrorSummary)

Output only. Summarizes errors encountered with sample error log entries.

state

enum (State)

Output only. State of the job.

dryRun

boolean

Optional. If true, the job runs in dry run mode, returning the total object count and, if the object configuration is a prefix list, the bytes found from source. No transformations are performed.

isMultiBucketJob

boolean

Output only. If true, this job operates on multiple buckets. Multi-bucket jobs are subject to different quota limits than single-bucket jobs.

Union field source. Specifies objects to be transformed. source can be only one of the following:
bucketList

object (BucketList)

Specifies a list of buckets and their objects to be transformed.

projectSource

object (ProjectSource)

Specifies a project source and filters to identify objects to be transformed.

Union field transformation. Operation to be performed on the objects. transformation can be only one of the following:
putObjectHold

object (PutObjectHold)

Changes object hold status.

deleteObject

object (DeleteObject)

Delete objects.

putMetadata

object (PutMetadata)

Updates object metadata. Allows updating fixed-key and custom metadata. For example, Cache-Control, Content-Disposition, Content-Encoding, Content-Language, Content-Type, Custom-Time, and Retention configuration.

rewriteObject

object (RewriteObject)

Rewrite the object and updates metadata like KMS key.

updateObjectCustomContext

object (UpdateObjectCustomContext)

Update object custom context.

setObjectAcls

object (SetObjectAcls)

Updates object ACLs.

BucketList

Describes list of buckets and their objects to be transformed.

JSON representation
{
  "buckets": [
    {
      object (Bucket)
    }
  ]
}
Fields
buckets[]

object (Bucket)

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 object_configuration can be only one of the following:
  "prefixList": {
    object (PrefixList)
  },
  "manifest": {
    object (Manifest)
  }
  // End of list of possible types for union field object_configuration.
}
Fields
bucket

string

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

object (PrefixList)

Specifies objects matching a prefix set.

manifest

object (Manifest)

Specifies objects in a manifest file.

LoggingConfig

Specifies the Cloud Logging behavior.

JSON representation
{
  "logActions": [
    enum (LoggableAction)
  ],
  "logActionStates": [
    enum (LoggableActionState)
  ]
}
Fields
logActions[]

enum (LoggableAction)

Required. Specifies the actions to be logged.

logActionStates[]

enum (LoggableActionState)

Required. States in which Action 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].

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.
QUEUED Queued but not yet started.

Methods

cancel

Cancels a batch job.

create

Creates a batch job.

delete

Deletes a batch job.

get

Gets a batch job.

list

Lists Jobs in a given project.