• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. API Reference (OBS)
  4. Operations on Buckets
  5. PUT Bucket storage class
  6. Requests

Requests

Syntax

PUT /?storagePolicy HTTP/1.1
User-Agent: agent
Host: bucketname.obs.example.com
Date: date
Accept: */*
Date: date
Authorization: authorization
Content-Length: length

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<StoragePolicy xmlns="http://obs.example.com/doc/2015-06-30/">
  <DefaultStorageClass>STANDARD</DefaultStorageClass>
</StoragePolicy>

Request Parameters

This request involves no parameters.

Request Headers

This request uses common headers. For details about common request headers, see Common Request Headers.

Request Elements

This request uses elements to specify the default bucket storage class. Table 1 describes the elements.

Table 1 Request elements

Element

Description

Remarks

DefaultStorageClass

Indicates the default bucket storage class.

It is a character string and can be STANDARD (OBS Standard), STANDARD_IA (OBS Warm), or GLACIER (OBS Cold). Note that the three storage class values are case-sensitive.

Mandatory