Available in Classic and VPC
Create a Ncloud Storage bucket.
For a Sub Account user to execute this command, they must have the Change/CreateBucket action permission.
Syntax
The create-bucket syntax is as follows:
aws s3api create-bucket \
--bucket <bucket> \
[--create-bucket-configuration <create-bucket-configuration>] \
[--object-lock-enabled-for-bucket | --no-object-lock-enabled-for-bucket] \
--endpoint-url <endpoint-url>
Options
This section describes the options available when running create-bucket.
Required options
The following options are required for create-bucket.
| Options | Type | Required | Description |
|---|---|---|---|
--bucket |
String | Required | Bucket name
|
Optional options
These are the optional options for create-bucket. Options that are not specified will use their default values.
| Options | Type | Required | Description |
|---|---|---|---|
--create-bucket-configuration |
String | Optional | Bucket configuration information |
--object-lock-enabled-for-bucket |
Boolean | Optional | Enables object lock when creating the bucket.
|
--no-object-lock-enabled-for-bucket |
Boolean | Optional | Disables object lock when creating the bucket. |
Common options
For information about the options common to all aws subcommands, see Ncloud Storage options.
Examples
If the bucket creation request is successful, the location information for the created bucket is returned.
Command
The command example is as follows:
aws s3api create-bucket --bucket my-temp-bucket \
--region kr \
--endpoint-url=https://kr.ncloudstorage.com
Output
The output example is as follows:
{
"Location": "/my-temp-bucket"
}
Related commands
Related commands are as follows: