mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
Add API's for managing bucket quota (#9379)
This PR allows setting a "hard" or "fifo" quota restriction at the bucket level. Buckets that have reached the FIFO quota configured, will automatically be cleaned up in FIFO manner until bucket usage drops to configured quota. If a bucket is configured with a "hard" quota ceiling, all further writes are disallowed.
This commit is contained in:
@@ -101,6 +101,14 @@ const (
|
||||
AttachPolicyAdminAction = "admin:AttachUserOrGroupPolicy"
|
||||
// ListUserPoliciesAdminAction - allows listing user policies
|
||||
ListUserPoliciesAdminAction = "admin:ListUserPolicies"
|
||||
|
||||
// Bucket quota Actions
|
||||
|
||||
// SetBucketQuotaAdminAction - allow setting bucket quota
|
||||
SetBucketQuotaAdminAction = "admin:SetBucketQuota"
|
||||
// GetBucketQuotaAdminAction - allow getting bucket quota
|
||||
GetBucketQuotaAdminAction = "admin:GetBucketQuota"
|
||||
|
||||
// AllAdminActions - provides all admin permissions
|
||||
AllAdminActions = "admin:*"
|
||||
)
|
||||
@@ -135,6 +143,8 @@ var supportedAdminActions = map[AdminAction]struct{}{
|
||||
DeletePolicyAdminAction: {},
|
||||
GetPolicyAdminAction: {},
|
||||
AttachPolicyAdminAction: {},
|
||||
SetBucketQuotaAdminAction: {},
|
||||
GetBucketQuotaAdminAction: {},
|
||||
ListUserPoliciesAdminAction: {},
|
||||
}
|
||||
|
||||
@@ -184,4 +194,6 @@ var adminActionConditionKeyMap = map[Action]condition.KeySet{
|
||||
GetPolicyAdminAction: condition.NewKeySet(condition.AllSupportedAdminKeys...),
|
||||
AttachPolicyAdminAction: condition.NewKeySet(condition.AllSupportedAdminKeys...),
|
||||
ListUserPoliciesAdminAction: condition.NewKeySet(condition.AllSupportedAdminKeys...),
|
||||
SetBucketQuotaAdminAction: condition.NewKeySet(condition.AllSupportedAdminKeys...),
|
||||
GetBucketQuotaAdminAction: condition.NewKeySet(condition.AllSupportedAdminKeys...),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user