HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/396/help/man/man1/gcloud_storage_batch-operations_jobs_create.1
.TH "GCLOUD_STORAGE_BATCH\-OPERATIONS_JOBS_CREATE" 1



.SH "NAME"
.HP
gcloud storage batch\-operations jobs create \- create a new batch operation job



.SH "SYNOPSIS"
.HP
\f5gcloud storage batch\-operations jobs create\fR \fIBATCH_JOB\fR \fB\-\-bucket\fR=\fIBUCKET\fR (\fB\-\-included\-object\-prefixes\fR=[\fIPREFIXES\fR,...]\ |\ \fB\-\-manifest\-location\fR=\fIMANIFEST_LOCATION\fR) (\fB\-\-put\-metadata\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]\ |\ \fB\-\-rewrite\-object\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]\ |\ [\fB\-\-delete\-object\fR\ :\ \fB\-\-enable\-permanent\-object\-deletion\fR]\ |\ \fB\-\-[no\-]put\-object\-event\-based\-hold\fR\ \fB\-\-[no\-]put\-object\-temporary\-hold\fR) [\fB\-\-description\fR=\fIDESCRIPTION\fR] [\fB\-\-log\-actions\fR=[\fILOG_ACTIONS\fR,...]\ \fB\-\-log\-action\-states\fR=[\fILOG_ACTION_STATES\fR,...]] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

Create a batch operation job, allowing you to perform operations such as
deletion, updating metadata, and more on objects in a serverless manner.



.SH "EXAMPLES"

To create a batch job with the name \f5my\-job\fR to perform object deletion on
bucket \f5my\-bucket\fR and the manifest file \f5gs://my\-bucket/manifest.csv\fR
specifies the objects to be transformed:

.RS 2m
$ gcloud storage batch\-operations jobs create my\-job \e
  \-\-bucket=my\-bucket \e
  \-\-manifest\-location=gs://my\-bucket/manifest.csv \-\-delete\-object
.RE

To create a batch job with the name \f5my\-job\fR to update object metadata
\f5Content\-Disposition\fR to \f5inline\fR and \f5Content\-Language\fR to
\f5en\fR on bucket \f5my\-bucket\fR where you want to match objects with the
prefix \f5prefix1\fR or \f5prefix2\fR:

.RS 2m
$ gcloud storage batch\-operations jobs create my\-job \e
  \-\-bucket=my\-bucket \-\-included\-object\-prefixes=prefix1,prefix2 \e
  \-\-put\-metadata=Content\-Disposition=inline,Content\-Language=en
.RE

To create a batch job with the name \f5my\-job\fR to put object event based hold
on objects in bucket \f5my\-bucket\fR with logging config enabled for
corresponding transform action and succeeded and failed action states:

.RS 2m
$ gcloud storage batch\-operations jobs create my\-job \e
  \-\-bucket=my\-bucket \-\-put\-object\-event\-based\-hold \e
  \-\-put\-metadata=Content\-Disposition=inline,Content\-Language=en \e
  \-\-log\-actions=transform \-\-log\-action\-states=succeeded,failed
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m

Batch job resource \- The batch job to create. This represents a Cloud resource.
(NOTE) Some attributes are not given arguments in this group but can be set in
other ways.

To set the \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5batch_job\fR on the command line with a fully specified
name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp

To set the \f5location\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5batch_job\fR on the command line with a fully specified
name;
.IP "\(em" 2m
The default is \f5global\fR.
.RE
.sp

This must be specified.


.RS 2m
.TP 2m
\fIBATCH_JOB\fR

ID of the batch\-job or fully qualified identifier for the batch\-job.

To set the \f5batch\-job\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5batch_job\fR on the command line.
.RE
.sp


.RE
.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-bucket\fR=\fIBUCKET\fR

Bucket containing the objects that the batch job will operate on.

.TP 2m

Source specifying objects to perform batch operations on. Must be one of
\f5\-\-manifest\-location=``MANIFEST_LOCATION\fR or
\f5\-\-included\-object\-prefixes=``COMMA_SEPARATED_PREFIXES\fR

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-included\-object\-prefixes\fR=[\fIPREFIXES\fR,...]

A comma\-separated list of object prefixes to describe the objects being
transformed. An empty string means all objects in the bucket.

.TP 2m
\fB\-\-manifest\-location\fR=\fIMANIFEST_LOCATION\fR

An absolute path to the manifest source file in a Google Cloud Storage bucket.
The file must be a CSV file where each row specifies the object details i.e.
ProjectId, BucketId, and Name. Generation may optionally be specified. When
generation is not specified, the live object is acted upon. Format:
\f5\-\-manifest\-location=gs://bucket_name/path/manifest_name.csv\fR

.RE
.sp
.TP 2m

Transformation to be performed on the objects.

Exactly one of these must be specified:


.RS 2m
.TP 2m
\fB\-\-put\-metadata\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]

Sets object metadata. To set how content should be displayed, specify the the
key\-value pair \f5Content\-Disposition={VALUE}.\fR To set how content is
encoded (e.g. "gzip"), specify the key\-value pair
\f5Content\-Encoding={VALUE}\fR. To set content's language (e.g. "en" signifies
"English"), specify the key\-value pair \f5Content\-Language={VALUE}\fR. To set
the type of data contained in the object (e.g. "text/html"), specify the
key\-value pair \f5Content\-Type={VALUE}\fR. To set how caches should handle
requests and responses, specify the key\-value pair
\f5Cache\-Control={VALUE}\fR. To set custom time for Cloud Storage objects in
RFC 3339 format, specify the key\-value pair \f5Custom\-Time={VALUE}\fR. To set
custom metadata on objects, specify key\-value pairs
\f5{CUSTOM\-KEY}:{VALUE}\fR. Note that all predefined keys (e.g.
Content\-Disposition) are case\-insensitive. Any other key that is not specified
above will be treated as a custom key. Multiple key\-value pairs can be
specified by separating them with commas. For example,
\f5\-\-put\-metadata=Content\-Disposition=inline,Content\-Encoding=gzip\fR

.TP 2m
\fB\-\-rewrite\-object\fR=\fIKEY\fR=\fIVALUE\fR,[\fIKEY\fR=\fIVALUE\fR,...]

Rewrites object and the specified metadata. Currently only supports rewriting
kms\-key. A metadata field MUST be specified. For example,
\f5\-\-rewrite\-object=kms\-key=projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/CRYPTO_KEY\fR
will rewrite the Cloud KMS key that will be used to encrypt the object.

.TP 2m

Describes options to delete objects.


.RS 2m
.TP 2m
\fB\-\-delete\-object\fR

If this flag is set, objects specified in source will be deleted. When
versioning is enabled on the buckets, live objects in versioned buckets will
become noncurrent and objects that were already noncurrent will be skipped.

This flag argument must be specified if any of the other arguments in this group
are specified.

.TP 2m
\fB\-\-enable\-permanent\-object\-deletion\fR

If this flag is set and versioning is enabled on the buckets, both live and
noncurrent objects will be permanently deleted.

.RE
.sp
.TP 2m

Describes options to update object hold.


.RS 2m
.TP 2m
\fB\-\-[no\-]put\-object\-event\-based\-hold\fR

Sets or unsets object event based holds state. When object event based hold is
set, object cannot be deleted or replaced. Use
\fB\-\-put\-object\-event\-based\-hold\fR to enable and
\fB\-\-no\-put\-object\-event\-based\-hold\fR to disable.

.TP 2m
\fB\-\-[no\-]put\-object\-temporary\-hold\fR

Sets or unsets object temporary holds state. When object temporary hold is set,
object cannot be deleted or replaced. Use \fB\-\-put\-object\-temporary\-hold\fR
to enable and \fB\-\-no\-put\-object\-temporary\-hold\fR to disable.


.RE
.RE
.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-description\fR=\fIDESCRIPTION\fR

Description for the batch job.


.RE
.sp

.SH "LOGGING_CONFIG FLAGS"

.RS 2m
.TP 2m

LOGGING CONFIG

Configure which transfer actions and action states are reported when logs are
generated for this job. Logs can be viewed by running the following command:
gcloud logging read "resource.type=storagebatchoperations.googleapis.com/Job"


.RS 2m
.TP 2m
\fB\-\-log\-actions\fR=[\fILOG_ACTIONS\fR,...]

Define the batch job actions to report in logs. (e.g.,
\-\-log\-actions=transform). \fILOG_ACTIONS\fR must be (only one value is
supported): \fBtransform\fR.

.TP 2m
\fB\-\-log\-action\-states\fR=[\fILOG_ACTION_STATES\fR,...]

The states in which the actions specified in \-\-log\-actions are logged.
Separate multiple states with a comma, omitting the space after the comma (e.g.,
\-\-log\-action\-states=succeeded,failed). \fILOG_ACTION_STATES\fR must be one
of: \fBfailed\fR, \fBsucceeded\fR.


.RE
.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

This variant is also available:

.RS 2m
$ gcloud alpha storage batch\-operations jobs create
.RE