• Object Storage Service

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

Requests

Syntax

PUT / HTTP/1.1 
 User-Agent: agent
 Host: Host Server
 Accept: */*
 Date: date 
 Authorization: authorization
 Content-Length: 0 
 <Optional Additional Header> 

 <CreateBucketConfiguration xmlns="http://obs.example.com/doc/2015-06-30/"> 
 <LocationConstraint>location</LocationConstraint> 
 </CreateBucketConfiguration>

Request Parameters

This request involves no parameters.

Request Headers

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

You can add optional headers to this request. Table 1 describes the optional headers.

Table 1 Optional request headers

Header

Description

Remarks

x-amz-acl

Indicates the ACL of a bucket. Possible values are privatepublic-readpublic-read-writeauthenticated-readbucket-owner-read, and bucket-owner-full-control. For details, see Table 4.

Type: String

Optional

x-default-storage-class

When creating a bucket, you can add this header in the request to set the bucket's default storage class, which can be STANDARD (OBS Standard), STANDARD_IA (OBS Warm), and GLACIER (OBS Cold). If this header is not specified in the request, the storage class of the bucket created is OBS Standard.

Type: String

Optional

x-amz-security-token

Header field used to identify the request of a federated user. When the federal authentication function is enabled, users sending such requests are identified as federated users.

Type: string

Optional. This parameter must be carried in the request sent by federated users.

Request Elements

This request contains one element, as described in Table 2

Table 2 Request element

Element

Description

Remarks

LocationConstraint

Indicates the Region where a bucket will be created. This element is contained in CreateBucketConfiguration.

Type: String

Optional