From fcbc5fa60765f8330744dd0e6e5aeaf6160d873f Mon Sep 17 00:00:00 2001 From: John Wilkins Date: Mon, 5 May 2014 12:33:58 -0700 Subject: [PATCH] doc: Quotas for Admin Ops API. Signed-off-by: John Wilkins --- doc/radosgw/adminops.rst | 61 ++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 21 deletions(-) diff --git a/doc/radosgw/adminops.rst b/doc/radosgw/adminops.rst index 99c5b23a929d8..fdb4d5e065095 100644 --- a/doc/radosgw/adminops.rst +++ b/doc/radosgw/adminops.rst @@ -1815,22 +1815,18 @@ None. Quotas ====== -.. todo:: Need clarification on syntax. - - -The Admin Operations API enables you to set quotas on users and buckets. -Quotas include the maximum number of objects in a bucket and the maximum -storage size in megabytes. +The Admin Operations API enables you to set quotas on users and on bucket owned +by users. See `Quota Management`_ for additional details. Quotas include the +maximum number of objects in a bucket and the maximum storage size in megabytes. To view quotas, the user must have a ``users=read`` capability. To set, modify or disable a quota, the user must have ``users=write`` capability. See the `Admin Guide`_ for details. - Valid parameters for quotas include: - **Bucket:** The ``bucket`` option allows you to specify a quota for - a particular bucket. + buckets owned by a user. - **Maximum Objects:** The ``max-objects`` setting allows you to specify the maximum number of objects. A negative value disables this setting. @@ -1843,26 +1839,48 @@ Valid parameters for quotas include: -Read User Quota -~~~~~~~~~~~~~~~ +Get User Quota +~~~~~~~~~~~~~~ -Read user quota setting +To get a quota, the user must have ``users`` capability set with ``read`` +permission. :: - - requires the 'users' read cap set. + GET /admin/user?quota&uid="a-type=user -GET /admin/user?quota&uid=["a-type=] +Set User Quota +~~~~~~~~~~~~~~ -Modify User Quota -~~~~~~~~~~~~~~~~~ +To set a quota, the user must have ``users`` capability set with ``write`` +permission. :: + + PUT /admin/user?quota&uid="a-type=user + + +The content must include a JSON representation of the quota settings +as encoded in the corresponding read operation. + + +Get Bucket Quota +~~~~~~~~~~~~~~~~ + +To get a quota, the user must have ``users`` capability set with ``read`` +permission. :: + + GET /admin/user?quota&uid="a-type=bucket + + +Set Bucket Quota +~~~~~~~~~~~~~~~~ + +To set a quota, the user must have ``users`` capability set with ``write`` +permission. :: -requires the 'users' write cap set + PUT /admin/user?quota&uid="a-type=bucket -PUT /admin/user?quota&uid=["a-type=] +The content must include a JSON representation of the quota settings +as encoded in the corresponding read operation. -Content should include a json representation of the quota settings -(either the user quota, or the bucket quota, or both) as encoded in -the corresponding read operation. @@ -1896,4 +1914,5 @@ Standard Error Responses -.. _Admin Guide: ../admin \ No newline at end of file +.. _Admin Guide: ../admin +.. _Quota Management: ../admin#quota-management \ No newline at end of file -- 2.39.5