gcloud alpha storage batch-operations jobs create

NAME
gcloud alpha storage batch-operations jobs create - create a new batch operation job
SYNOPSIS
gcloud alpha storage batch-operations jobs create (BATCH_JOB : --location=LOCATION) (--manifest-location=MANIFEST_LOCATION     | --prefix-list-file=PREFIX_LIST_FILE) (--put-kms-key=PUT_KMS_KEY     | --put-metadata=KEY=VALUE,[KEY=VALUE,…]     | [--delete-object : --enable-permanent-object-deletion]     | --[no-]put-object-event-based-hold --[no-]put-object-temporary-hold) [--description=DESCRIPTION] [GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) Create a batch operation job, allowing you to perform operations such as deletion, updating metadata, and more on objects in a serverless manner.
EXAMPLES
To create a batch job with the name my-job in location us-central1 to perform object deletion where the manifest file gs://my-bucket/manifest.csv specifies the objects to be transformed:
gcloud alpha storage batch-operations jobs create my-job --location=us-central1 --manifest-location=gs://my-bucket/manifest.csv --delete-object

To create a batch job with the name my-job in location us-central1 to update object metadata Content-Disposition to inline and Content-Language to en where the prefix list file my-path/my-prefix-list.json specifies the objects to be transformed:

gcloud alpha storage batch-operations jobs create my-job --location=us-central1 --prefix-list-file=my-path/my-prefix-list.json --put-metadata=Content-Disposition=inline,Content-Language=en
POSITIONAL ARGUMENTS
Batch job resource - The batch job to create. The arguments in this group can be used to specify the attributes of this resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.

To set the project attribute:

  • provide the argument batch_job on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

This must be specified.

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

To set the batch-job attribute:

  • provide the argument batch_job on the command line.

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

--location=LOCATION
Batch-operations supported Google Cloud location for the batch-job.

To set the location attribute:

  • provide the argument batch_job on the command line with a fully specified name;
  • provide the argument --location on the command line.
REQUIRED FLAGS
Source specifying objects to perform batch operations on. Must be one of --manifest-location=``MANIFEST_LOCATION or --prefix-list-file=``PREFIX_LIST_FILE

Exactly one of these must be specified:

--manifest-location=MANIFEST_LOCATION
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: --manifest-location=gs://bucket_name/path/manifest_name.csv
--prefix-list-file=PREFIX_LIST_FILE
A path to a local JSON or YAML file containing a list of prefixes. prefix is specified in the format of {"bucket": BUCKET_NAME, "objectPrefix": OBJECT_PREFIX} where bucket is the name of the bucket on which batch operation is being performed and objectPrefix is the prefix of objects in the bucket that will be acted upon.
Transformation to be performed on the objects.

Exactly one of these must be specified:

--put-kms-key=PUT_KMS_KEY
Sets the resource name of the Cloud KMS key that will be used to encrypt the object. The Cloud KMS key must be located in same location as the object. Format: --put-kms-key=projects/PROJECT_ID/locations/LOCATION/keyRings/KEY_RING/cryptoKeys/CRYPTO_KEY
--put-metadata=KEY=VALUE,[KEY=VALUE,…]
Sets object metadata. To set how content should be displayed, specify the the key-value pair Content-Disposition={VALUE}. To set how content is encoded (e.g. "gzip"), specify the key-value pair Content-Encoding={VALUE}. To set content's language (e.g. "en" signifies "English"), specify the key-value pair Content-Language={VALUE}. To set the type of data contained in the object (e.g. "text/html"), specify the key-value pair Content-Type={VALUE}. To set how caches should handle requests and responses, specify the key-value pair Cache-Control={VALUE}. To set custom time for Cloud Storage objects in RFC 3339 format, specify the key-value pair Custom-Time={VALUE}. To set custom metadata on objects, specify key-value pairs {CUSTOM-KEY}:{VALUE}. Note that all predefined keys are case-insensitive. Multiple key-value pairs can be specified by separating them with commas. For example, --put-metadata=Content-Disposition=inline,Content-Encoding=gzip
Describes options to delete objects.
--delete-object
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.

--enable-permanent-object-deletion
If this flag is set and versioning is enabled on the buckets, both live and noncurrent objects will be permanently deleted.
Describes options to update object hold.
--[no-]put-object-event-based-hold
Sets or unsets object event based holds state. When object event based hold is set, object cannot be deleted or replaced. Use --put-object-event-based-hold to enable and --no-put-object-event-based-hold to disable.
--[no-]put-object-temporary-hold
Sets or unsets object temporary holds state. When object temporary hold is set, object cannot be deleted or replaced. Use --put-object-temporary-hold to enable and --no-put-object-temporary-hold to disable.
OPTIONAL FLAGS
--description=DESCRIPTION
Description for the batch job.
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 $ gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.