Changing object storage classes

This page describes how to change the storage class of objects
within a bucket through overwriting the object. To learn how to change object
storage classes without overwriting an object, see the
Object Lifecycle Management feature.

Console

Individual object storage classes cannot be set through the Console. Instead
use gsutil.

[BUCKET_NAME] is the name of the bucket containing the original object.
For example, my-bucket.

[OBJECT_NAME] is the name of the object. For example, pets/dog.png.

XML API

Caution: Metadata that you want to retain from the original object,
such as custom metadata, must be included in the headers that you
provide in the request. Additionally, any ACLs for the object that
differ from the containing bucket's default object ACLs must be
reapplied after the object is uploaded.

Get an authorization access token from the
OAuth 2.0 Playground. Configure the playground to use your own OAuth credentials.

[OBJECT] is the local path to the object whose storage class you
want to change (you must re-upload the object when changing storage class
with the XML API). For example, Desktop/dog.png.

[OAUTH2_TOKEN] is the access token you generated in Step 1.

[OBJECT_CONTENT_TYPE] is the content type of the object. For example, image/png.

[STORAGE_CLASS] is the new storage class for your object. For example,
nearline.

[BUCKET_NAME] is the name of the bucket containing the object you
are overwriting. For example, my-bucket.

[OBJECT_NAME] is the name of the object you are overwriting. For
example, pets/dog.png.

Note: This guide involves overwriting data. Retrieval and early deletion
charges may apply if the data was originally stored as Nearline Storage or
Coldline Storage. Also note that if you have enabled Object Versioning
for your bucket, the original object remains in your bucket until it is
explicitly deleted.