6.17.5. Red Hat Quay API を使用した組織のクォータの管理
クォータは、スーパーユーザー管理者権限を持つ Red Hat Quay API を使用して管理できます。これらのエンドポイントにより、スーパーユーザーはレジストリー内のすべての組織のクォータポリシーを管理できます。
手順
組織の割り当てポリシーを作成するには、
POST /api/v1/superuser/organization/{namespace}/quotaAPI エンドポイントを使用します。$ curl -X POST "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "limit_bytes": 10737418240 }'出力例
"Created"GET /api/v1/superuser/organization/{namespace}/quotaAPI エンドポイントを使用して、クォータ ID を含むポリシーに関する情報を取得します。$ curl -X GET "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota" \ -H "Authorization: Bearer <ACCESS_TOKEN>"出力例
[{"id": 2, "limit_bytes": 10737418240, "limit": "10.0 GiB", "default_config": false, "limits": [{"id": 1, "type": "Reject", "limit_percent": 90}], "default_config_exists": false}]PUT /api/v1/superuser/organization/{namespace}/quota/{quota_id}API エンドポイントを使用して、クォータポリシーを変更します。$ curl -X PUT "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "limit_bytes": <NEW_QUOTA_LIMIT> }'出力例
{"id": 2, "limit_bytes": 10737418240, "limit": "10.0 GiB", "default_config": false, "limits": [{"id": 1, "type": "Reject", "limit_percent": 90}], "default_config_exists": false}DELETE/api/v1/superuser/organization/{namespace}/quota/{quota_id}API エンドポイントを使用します。$ curl -X DELETE "https://quay-server.example.com/api/v1/superuser/organization/<namespace>/quota/<quota_id>" \ -H "Authorization: Bearer <ACCESS_TOKEN>"このコマンドは CLI に出力を返しません。