第 13 章 policy


13.1. createOrganizationAutoPrunePolicy

为机构创建一个自动修剪策略

POST /api/v1/organization/{orgname}/autoprunepolicy/

授权: oauth2_implicit (org:admin)

路径参数

类型Name描述模式

path

需要OrgName

机构名称

字符串

请求正文模式(application/json)

要应用到用户命名空间的策略配置

Name描述模式

所需 方法

用于修剪标签的方法(number_of_tags、create_date)

string

需要 的值

用于修剪方法的值(标签数量(如 10 个,时间 delta,如 7d (7 天))

 

tagPattern
optional

仅与此模式匹配的标签将被修剪

string

tagPatternMatches
optional

确定修剪的标签是否应该与 tagPattern 匹配

布尔值

响应

HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令

$ curl -X POST -H "Authorization: Bearer <access_token>" -H "Content-Type: application/json" -d '{"method": "number_of_tags", "value": 10}' http://<quay-server.example.com>/api/v1/organization/<organization_name>/autoprunepolicy/
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.