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
- https://docs.cloud.google.com/sdk/docs/release-notes#56200_2026-03-24
- https://docs.cloud.google.com/sdk/gcloud/reference/storage/batch-operations/jobs/create
- https://docs.cloud.google.com/storage/docs/batch-operations/create-manage-batch-operation-jobs
- https://docs.cloud.google.com/storage/docs/changing-storage-classes
Check the installed version and the source before using it. Entry JSON