13.15. updateUserAutoPrunePolicy
为当前登录的用户更新自动修剪策略
PUT /api/v1/user/autoprunepolicy/{policy_uuid}
授权: oauth2_implicit (user:admin)
路径参数
类型 | Name | 描述 | 模式 |
---|---|---|---|
path |
policy_uuid | 策略的唯一 ID | string |
请求正文模式(application/json)
要应用到用户命名空间的策略配置
Name | 描述 | 模式 |
---|---|---|
所需 方法 | 用于修剪标签的方法(number_of_tags、create_date) | string |
需要 的值 | 用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天)) | |
tagPattern | 仅与此模式匹配的标签将被修剪 | string |
tagPatternMatches | 确定修剪的标签是否应该与 tagPattern 匹配 | 布尔值 |
响应
HTTP 代码 | 描述 | 模式 |
---|---|---|
204 | 成功调用 | |
400 | 错误请求 | |
401 | 需要会话 | |
403 | 未授权访问 | |
404 | 未找到 |
示例命令
$ curl -X PUT "https://quay-server.example.com/api/v1/user/autoprunepolicy/<policy_uuid>" \ -H "Authorization: Bearer <your_access_token>" \ -H "Content-Type: application/json" \ -d '{ "method": "number_of_tags", "value": "10", "tagPattern": ".*-old", "tagPatternMatches": true }'