Set Bucket Quota on Creation (#308)
Introces the capability to set bucket quota on bucket creation and adds the API to set the bucket on it's own
This commit is contained in:
@@ -611,6 +611,74 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{name}/quota": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Get Bucket Quota",
|
||||
"operationId": "GetBucketQuota",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/listObjectsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Bucket Quota",
|
||||
"operationId": "SetBucketQuota",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/setBucketQuota"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/bucket"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{name}/set-policy": {
|
||||
"put": {
|
||||
"tags": [
|
||||
@@ -3233,6 +3301,9 @@ func init() {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"quota": {
|
||||
"$ref": "#/definitions/setBucketQuota"
|
||||
},
|
||||
"versioning": {
|
||||
"type": "boolean"
|
||||
}
|
||||
@@ -3712,6 +3783,27 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"setBucketQuota": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enabled"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"quota_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fifo",
|
||||
"hard"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"setBucketVersioning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -4893,6 +4985,74 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{name}/quota": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Get Bucket Quota",
|
||||
"operationId": "GetBucketQuota",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/listObjectsResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Bucket Quota",
|
||||
"operationId": "SetBucketQuota",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/setBucketQuota"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/bucket"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{name}/set-policy": {
|
||||
"put": {
|
||||
"tags": [
|
||||
@@ -8038,6 +8198,9 @@ func init() {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"quota": {
|
||||
"$ref": "#/definitions/setBucketQuota"
|
||||
},
|
||||
"versioning": {
|
||||
"type": "boolean"
|
||||
}
|
||||
@@ -8451,6 +8614,27 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"setBucketQuota": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"enabled"
|
||||
],
|
||||
"properties": {
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"quota_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fifo",
|
||||
"hard"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"setBucketVersioning": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user