Create an S3 bucket configuration for an SVM
POST /protocols/s3/services/{svm.uuid}/buckets
Creates the S3 bucket configuration of an SVM.
Important notes
-
Each SVM can have one or more bucket configurations.
-
Aggregate lists should be specified explicitly. If not specified, then the bucket is auto-provisioned as a FlexGroup.
-
Constituents per aggregate specifies the number of components (or FlexVols) per aggregate. Is specified only when an aggregate list is explicitly defined.
Required properties
-
svm.uuid
- Existing SVM in which to create the bucket configuration. -
name
- Bucket name that is to be created.
Recommended optional properties
-
aggregates
- List of aggregates for the FlexGroup on which the bucket is hosted on. -
constituents_per_aggregate
- Number of constituents per aggregate. -
size
- Specifying the bucket size is recommended.
Default property values
-
size
- 800MB -
comment
- "" -
aggregates
- No default value. -
constituents_per_aggregate
- 4 , if an aggregates list is specified. Otherwise, no default value.
Related ONTAP commands
-
vserver object-store-server bucket create
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. |
return_records |
boolean |
query |
False |
The default is false. If set to true, the records are returned. |
svm.uuid |
string |
path |
True |
UUID of the SVM to which this object belongs. |
Request Body
Name | Type | Description |
---|---|---|
aggregates |
array[aggregates] |
A list of aggregates for FlexGroup volume constituents where the bucket is hosted. If this option is not specified, the bucket is auto-provisioned as a FlexGroup volume. |
comment |
string |
Can contain any additional information about the bucket being created or modified. |
constituents_per_aggregate |
integer |
Specifies the number of constituents or FlexVol volumes per aggregate. A FlexGroup volume consisting of all such constituents across all specified aggregates is created. This option is used along with the aggregates option and cannot be used independently. |
encryption |
||
logical_used_size |
integer |
Specifies the bucket logical used size up to this point. |
name |
string |
Specifies the name of the bucket. Bucket name is a string that can only contain the following combination of ASCII-range alphanumeric characters 0-9, a-z, ".", and "-". |
size |
integer |
Specifies the bucket size in bytes; ranges from 80MB to 64TB. |
svm |
||
uuid |
string |
Specifies the unique identifier of the bucket. |
volume |
Specifies the FlexGroup volume name and UUID where the bucket is hosted. |
Example request
{
"aggregates": [
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "aggr1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
}
],
"comment": "S3 bucket.",
"constituents_per_aggregate": 4,
"logical_used_size": 0,
"name": "bucket-1",
"size": 1677721600,
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"uuid": "414b29a1-3b26-11e9-bd58-0050568ea055",
"volume": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
}
Response
Status: 202, Accepted
Name | Type | Description |
---|---|---|
job |
Example response
{
"job": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"uuid": "string"
}
}
Error
Status: Default
ONTAP Error Response Codes
Error code | Message |
---|---|
92405777 |
"Failed to create bucket "{bucket name}" for SVM "{svm.name}". Reason: {Reason of failure}. "; |
92405785 |
"Bucket name "{bucket name}" contains invalid characters. Valid characters for a bucket name are 0-9, a-z, ".", and "-". "; |
92405786 |
"Bucket name "{bucket name}" is not valid. Bucket names must have between 3 and 63 characters. "; |
92405811 |
"Failed to create bucket "{bucket name}" for SVM "{svm.name}". Wait a few minutes and try the operation again."; |
92405812 |
"Failed to create the object store volume. Reason: {Reason for failure}."; |
92405819 |
"Cannot provision an object store server volume for bucket "{bucket name}" in SVM "{svm.name}" on the following aggregates because they are SnapLock aggregates: {List of aggregates.name}."; |
92405820 |
"Failed to check whether the aggregate "{aggregates.name}" is a FabricPool. Reason: {Reason for failure}."; |
92405821 |
"Cannot provision an object store server volume for bucket "{bucket name}" in SVM "{svm.name}" on the following aggregates because they are FabricPool: {List of aggregates.name}."; |
92405827 |
"Internal Error. Unable to generate object store volume name."; |
92405857 |
"One or more aggregates must be specified if "constituents_per_aggregate" is specified."; |
92405858 |
"Failed to "create" the "bucket" because the operation is only supported on data SVMs."; |
92405859 |
"The specified "aggregates.uuid" "{aggregates.uuid}" does not exist."; |
92405860 |
"The specified "aggregates.name" "{aggregates.name}" and "aggregates.uuid" "{aggregates.uuid}" refer to different aggregates."; |
92405861 |
"The specified SVM UUID or bucket UUID does not exist."; |
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
aggregates
Aggregate
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
|
uuid |
string |
encryption
Name | Type | Description |
---|---|---|
enabled |
boolean |
Specifies whether encryption is enabled on the bucket. By default, encryption is disabled on a bucket. |
svm
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
volume
Specifies the FlexGroup volume name and UUID where the bucket is hosted.
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the volume. |
uuid |
string |
Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.
|
s3_bucket_svm
A bucket is a container of objects. Each bucket defines an object namespace. S3 requests specify objects using a bucket-name and object-name pair. An object resides within a bucket.
Name | Type | Description |
---|---|---|
aggregates |
array[aggregates] |
A list of aggregates for FlexGroup volume constituents where the bucket is hosted. If this option is not specified, the bucket is auto-provisioned as a FlexGroup volume. |
comment |
string |
Can contain any additional information about the bucket being created or modified. |
constituents_per_aggregate |
integer |
Specifies the number of constituents or FlexVol volumes per aggregate. A FlexGroup volume consisting of all such constituents across all specified aggregates is created. This option is used along with the aggregates option and cannot be used independently. |
encryption |
||
logical_used_size |
integer |
Specifies the bucket logical used size up to this point. |
name |
string |
Specifies the name of the bucket. Bucket name is a string that can only contain the following combination of ASCII-range alphanumeric characters 0-9, a-z, ".", and "-". |
size |
integer |
Specifies the bucket size in bytes; ranges from 80MB to 64TB. |
svm |
||
uuid |
string |
Specifies the unique identifier of the bucket. |
volume |
Specifies the FlexGroup volume name and UUID where the bucket is hosted. |
job_link
Name | Type | Description |
---|---|---|
_links |
||
uuid |
string |
The UUID of the asynchronous job that is triggered by a POST, PATCH, or DELETE operation. |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |