6.17.6. Red Hat Quay API を使用したユーザークォータの管理
スーパーユーザーとして、指定された組織のユーザークォータを管理できます。
手順
POST /api/v1/superuser/users/{namespace}/quotaエンドポイントを使用して、組織内の特定のユーザーに対するクォータポリシーを作成します。$ curl -X POST "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "limit_bytes": <QUOTA_LIMIT> }'出力例
"Created"GET /api/v1/superuser/users/{namespace}/quotaエンドポイントを使用して、ユーザーに割り当てられたクォータのリストを返します。$ curl -X GET "https://quay-server.example.com/api/v1/superuser/users/<username>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"出力例
[{"id": 6, "limit_bytes": 10737418240, "limit": "10.0 GiB", "default_config": false, "limits": [], "default_config_exists": false}]PUT /api/v1/superuser/users/{namespace}/quota/{quota_id}エンドポイントを使用して、ユーザーのポリシーを調整します。$ curl -X PUT "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "limit_bytes": <NEW_QUOTA_LIMIT> }'出力例
{"id": 6, "limit_bytes": 10737418240, "limit": "10.0 GiB", "default_config": false, "limits": [], "default_config_exists": false}DELETE /api/v1/superuser/users/{namespace}/quota/{quota_id}エンドポイントを使用して、ユーザーのポリシーを削除します。$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/users/<username>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"このコマンドは CLI に出力を返しません。