CreateBucket

Prev Next

Available in Classic and VPC

Create a Ncloud Storage bucket.

Request

This section describes the request format. The method and URI are as follows:

Method URI
PUT -
Note

For more information on how to create the bucket name (Bucket) and Region code (regionCode), see Ncloud Storage API URL.

Request headers

For information about the headers common to all Ncloud Storage APIs, see Ncloud Storage request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
CreateBucketConfiguration Object Required Created bucket information
CreateBucketConfiguration.LocationConstraint String Optional Region code
  • If not entered, the regionCode included in the host is automatically applied.
CreateBucketConfiguration.Location Object Optional Region location information
CreateBucketConfiguration.Location.Name String Optional Region location name
CreateBucketConfiguration.Location.Type String Optional Region location type
  • Available if it is a directory bucket
  • SingleAvailabilityZone | SingleLocalZone
    • SingleAvailabilityZone: redundant storage in a single available zone
    • SingleLocalZone: redundant storage in a local zone
CreateBucketConfiguration.Bucket Object Optional Bucket information
CreateBucketConfiguration.Bucket.DataRedundancy String Optional Data redundancy method
  • Available if it is a directory bucket
  • SingleAvailabilityZone | SingleLocalZone
    • SingleAvailabilityZone: redundant storage in a single available zone
    • SingleLocalZone: redundant storage in a local zone
CreateBucketConfiguration.Bucket.Type String Required Bucket type
  • Directory (valid value)

Request example

The request example is as follows:

PUT / HTTP/1.1
Host: bucket.kr.ncloudstorage.com

<?xml version="1.0" encoding="UTF-8"?>
<CreateBucketConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
   <LocationConstraint>kr</LocationConstraint>
</CreateBucketConfiguration>

Response

This section describes the response format.

Response status codes

For information about the HTTP status codes common to all Ncloud Storage APIs, see Common Ncloud Storage response status codes.

Response example

The response example is as follows:

HTTP/1.1 200 OK
Location: "/bucket"