Object Storage API, REST: Bucket.Create
Creates a bucket in the specified folder.
HTTP request
POST https://storage.api.cloud.yandex.net/storage/v1/buckets
Body parameters
{
"name": "string",
"folderId": "string",
"defaultStorageClass": "string",
"maxSize": "string",
"anonymousAccessFlags": {
"read": "boolean",
"list": "boolean",
"configRead": "boolean"
},
"acl": {
"grants": [
{
"permission": "string",
"grantType": "string",
"granteeId": "string"
}
]
},
"tags": [
{
"key": "string",
"value": "string"
}
],
"encryption": {
"rules": [
{
"kmsMasterKeyId": "string",
"sseAlgorithm": "string"
}
]
},
"versioning": "string",
"allowedPrivateEndpoints": {
"enabled": "boolean",
"privateEndpoints": [
"string"
],
"forceCloudConsoleAccess": "boolean"
},
"disabledStatickeyAuth": "boolean"
}
|
Field |
Description |
|
name |
string Required field. Name of the bucket. |
|
folderId |
string Required field. ID of the folder to create a bucket in. The maximum string length in characters is 50. |
|
defaultStorageClass |
string Default storage class for objects in the bucket. Supported classes are standard storage ( |
|
maxSize |
string (int64) Maximum size of the bucket. |
|
anonymousAccessFlags |
Flags for configuring public (anonymous) access to the bucket's content and settings. |
|
acl |
Access control list (ACL) of the bucket. |
|
tags[] |
List of tags for the bucket. |
|
encryption |
Configuration for bucket's encryption. |
|
versioning |
enum (Versioning) Bucket versioning status.
|
|
allowedPrivateEndpoints |
Configuration for bucket's allowed private endpoints. |
|
disabledStatickeyAuth |
boolean An option to disable static key auth for a bucket. |
AnonymousAccessFlags
|
Field |
Description |
|
read |
boolean Specifies whether public (anonymous) access to read objects in the bucket is enabled. |
|
list |
boolean Specifies whether public (anonymous) access to the list of objects in the bucket is enabled. |
|
configRead |
boolean Specifies whether public (anonymous) access to read CORS, |
ACL
|
Field |
Description |
|
grants[] |
List of permissions granted and the grantees. |
Grant
A grant resource, used to specify the permission granted and the grantee.
|
Field |
Description |
|
permission |
enum (Permission) Required field. Permission granted by the grant.
|
|
grantType |
enum (GrantType) Required field. The grantee type for the grant.
|
|
granteeId |
string ID of the account who is a grantee. Required when the The maximum string length in characters is 50. |
Tag
|
Field |
Description |
|
key |
string Key of the bucket tag. |
|
value |
string Value of the bucket tag. |
Encryption
|
Field |
Description |
|
rules[] |
Rules |
EncryptionRule
|
Field |
Description |
|
kmsMasterKeyId |
string KMS master key ID |
|
sseAlgorithm |
string SSE algorithm |
BucketAllowedPrivateEndpoints
|
Field |
Description |
|
enabled |
boolean if true, private endpoints white list check is enabled |
|
privateEndpoints[] |
string white list of private endpoints bucket accessible from |
|
forceCloudConsoleAccess |
boolean if true, cloud console will be able to access a bucket |
Response
HTTP Code: 200 - OK
{
"id": "string",
"description": "string",
"createdAt": "string",
"createdBy": "string",
"modifiedAt": "string",
"done": "boolean",
"metadata": "object",
// Includes only one of the fields `error`, `response`
"error": {
"code": "integer",
"message": "string",
"details": [
"object"
]
},
"response": "object"
// end of the list of possible fields
}
An Operation resource. For more information, see Operation.
|
Field |
Description |
|
id |
string ID of the operation. |
|
description |
string Description of the operation. 0-256 characters long. |
|
createdAt |
string (date-time) Creation timestamp. String in RFC3339 To work with values in this field, use the APIs described in the |
|
createdBy |
string ID of the user or service account who initiated the operation. |
|
modifiedAt |
string (date-time) The time when the Operation resource was last modified. String in RFC3339 To work with values in this field, use the APIs described in the |
|
done |
boolean If the value is |
|
metadata |
object Service-specific metadata associated with the operation. |
|
error |
The error result of the operation in case of failure or cancellation. Includes only one of the fields The operation result. |
|
response |
object The normal response of the operation in case of success. Includes only one of the fields The operation result. |
Status
The error result of the operation in case of failure or cancellation.
|
Field |
Description |
|
code |
integer (int32) Error code. An enum value of google.rpc.Code |
|
message |
string An error message. |
|
details[] |
object A list of messages that carry the error details. |