Added lifecycle rules to multiple buckets at once support (#1566)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
@@ -698,6 +698,39 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/multi-lifecycle": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Add Multi Bucket Lifecycle",
|
||||
"operationId": "AddMultiBucketLifecycle",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/addMultiBucketLifecycle"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/multiLifecycleResult"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{bucket_name}/delete-objects": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -3850,10 +3883,6 @@ func init() {
|
||||
"description": "Non required, toggle to disable or enable rule",
|
||||
"type": "boolean"
|
||||
},
|
||||
"expiry_date": {
|
||||
"description": "Required in case of expiry_days or transition fields are not set. it defines an expiry date for ILM",
|
||||
"type": "string"
|
||||
},
|
||||
"expiry_days": {
|
||||
"description": "Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM",
|
||||
"type": "integer",
|
||||
@@ -3888,10 +3917,6 @@ func init() {
|
||||
"description": "Non required field, tags to match ILM files",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_date": {
|
||||
"description": "Required in case of transition_days or expiry fields are not set. it defines a transition date for ILM",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_days": {
|
||||
"description": "Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM",
|
||||
"type": "integer",
|
||||
@@ -3937,6 +3962,73 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"addMultiBucketLifecycle": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"buckets",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"buckets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"expired_object_delete_marker": {
|
||||
"description": "Non required, toggle to disable or enable rule",
|
||||
"type": "boolean"
|
||||
},
|
||||
"expiry_days": {
|
||||
"description": "Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_expiration_days": {
|
||||
"description": "Non required, can be set in case of expiration is enabled",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_transition_days": {
|
||||
"description": "Non required, can be set in case of transition is enabled",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_transition_storage_class": {
|
||||
"description": "Non required, can be set in case of transition is enabled",
|
||||
"type": "string"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "Non required field, it matches a prefix to perform ILM operations on it",
|
||||
"type": "string"
|
||||
},
|
||||
"storage_class": {
|
||||
"description": "Required only in case of transition is set. it refers to a tier",
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"description": "Non required field, tags to match ILM files",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_days": {
|
||||
"description": "Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"type": {
|
||||
"description": "ILM Rule type (Expiry or transition)",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"expiry",
|
||||
"transition"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"addPolicyRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -5043,6 +5135,27 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"multiLifecycleResult": {
|
||||
"properties": {
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/multicycleResultItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"multicycleResultItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bucketName": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nofiticationService": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -6956,6 +7069,39 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/multi-lifecycle": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"UserAPI"
|
||||
],
|
||||
"summary": "Add Multi Bucket Lifecycle",
|
||||
"operationId": "AddMultiBucketLifecycle",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/addMultiBucketLifecycle"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/multiLifecycleResult"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "Generic error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/error"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/buckets/{bucket_name}/delete-objects": {
|
||||
"post": {
|
||||
"tags": [
|
||||
@@ -10226,10 +10372,6 @@ func init() {
|
||||
"description": "Non required, toggle to disable or enable rule",
|
||||
"type": "boolean"
|
||||
},
|
||||
"expiry_date": {
|
||||
"description": "Required in case of expiry_days or transition fields are not set. it defines an expiry date for ILM",
|
||||
"type": "string"
|
||||
},
|
||||
"expiry_days": {
|
||||
"description": "Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM",
|
||||
"type": "integer",
|
||||
@@ -10264,10 +10406,6 @@ func init() {
|
||||
"description": "Non required field, tags to match ILM files",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_date": {
|
||||
"description": "Required in case of transition_days or expiry fields are not set. it defines a transition date for ILM",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_days": {
|
||||
"description": "Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM",
|
||||
"type": "integer",
|
||||
@@ -10313,6 +10451,73 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"addMultiBucketLifecycle": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"buckets",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"buckets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"expired_object_delete_marker": {
|
||||
"description": "Non required, toggle to disable or enable rule",
|
||||
"type": "boolean"
|
||||
},
|
||||
"expiry_days": {
|
||||
"description": "Required in case of expiry_date or transition fields are not set. it defines an expiry days for ILM",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_expiration_days": {
|
||||
"description": "Non required, can be set in case of expiration is enabled",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_transition_days": {
|
||||
"description": "Non required, can be set in case of transition is enabled",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"noncurrentversion_transition_storage_class": {
|
||||
"description": "Non required, can be set in case of transition is enabled",
|
||||
"type": "string"
|
||||
},
|
||||
"prefix": {
|
||||
"description": "Non required field, it matches a prefix to perform ILM operations on it",
|
||||
"type": "string"
|
||||
},
|
||||
"storage_class": {
|
||||
"description": "Required only in case of transition is set. it refers to a tier",
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"description": "Non required field, tags to match ILM files",
|
||||
"type": "string"
|
||||
},
|
||||
"transition_days": {
|
||||
"description": "Required in case of transition_date or expiry fields are not set. it defines a transition days for ILM",
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"default": 0
|
||||
},
|
||||
"type": {
|
||||
"description": "ILM Rule type (Expiry or transition)",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"expiry",
|
||||
"transition"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"addPolicyRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -11419,6 +11624,27 @@ func init() {
|
||||
}
|
||||
}
|
||||
},
|
||||
"multiLifecycleResult": {
|
||||
"properties": {
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/multicycleResultItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"multicycleResultItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"bucketName": {
|
||||
"type": "string"
|
||||
},
|
||||
"error": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nofiticationService": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
||||
Reference in New Issue
Block a user