sincecutoff.com
← all changes

gcloud storage batch-operations jobs create adds storage-class rewriting

Introduced 2026-03-24 · score 0.94

HOW TO USE IT

When creating a batch job to rewrite object storage classes, use `--rewrite-object=storage-class=<STORAGE_CLASS>` with the job’s bucket and object-selection arguments.

gcloud storage batch-operations jobs create <JOB_ID> --bucket=<BUCKET> --included-object-prefixes=<PREFIX> --rewrite-object=storage-class=<STORAGE_CLASS>
gcloud storage batch-operations jobs create <JOB_ID> --bucket=<BUCKET> --manifest-location=<MANIFEST_URI> --rewrite-object=storage-class=<STORAGE_CLASS>

WHY THIS HELPS

Rewrite object storage classes in a batch-operations job.

REQUIREMENTS AND LIMITATIONS

  • --rewrite-object=storage-class=<STORAGE_CLASS> (required): Rewrites objects to the specified class. Supported values: STANDARD, NEARLINE, COLDLINE, ARCHIVE. A metadata field must be specified.
  • --bucket=<BUCKET> (required): Bucket containing the objects to process; use either this or `--bucket-list`.
  • --included-object-prefixes=<PREFIX> (required): Selects objects by prefix; use this or `--manifest-location`.
  • --manifest-location=<MANIFEST_URI> (required): Selects objects using a manifest; use this or `--included-object-prefixes`.
  • Prerequisite: Configure Storage Intelligence on the bucket where the job will run.
  • Prerequisite: For storage-class changes through rewrite, required permissions are `storage.objects.create`, `storage.objects.delete`, `storage.objects.get`, and `storage.objects.list`.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card