Yandex Cloud
  • Сервисы
  • Решения
  • Почему Yandex Cloud
  • Сообщество
  • Тарифы
  • Документация
  • Связаться с нами
Подключиться
Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
Yandex Container Registry
  • Начало работы
  • Пошаговые инструкции
    • Все инструкции
    • Аутентифицироваться в Container Registry
    • Управление Docker-образом
      • Получить информацию об имеющихся Docker-образах
      • Создать Docker-образ
      • Загрузить Docker-образ в реестр
      • Скачать Docker-образ из реестра
      • Удалить Docker-образ из реестра
    • Управление Helm-чартом
      • Получить информацию об имеющихся Helm-чартах
      • Загрузить Helm-чарт в реестр
      • Скачать Helm-чарт из реестра
      • Удалить Helm-чарт из реестра
    • Управление реестром
      • Получить информацию об имеющихся реестрах
      • Создать реестр
      • Настроить доступ к реестру
      • Изменить реестр
      • Удалить реестр
    • Управление репозиторием
      • Получить информацию об имеющихся репозиториях
      • Создать репозиторий
    • Управление политиками автоматического удаления Docker-образов
      • Получить информацию об имеющихся политиках удаления
      • Создать политику удаления
      • Изменить политику удаления
      • Сделать тестовый запуск политики удаления
      • Удалить политику удаления
    • Сканирование Docker-образа на наличие уязвимостей
    • Работа с ролями
      • Назначить роль
      • Просмотреть назначенные роли
      • Отозвать роль
  • Yandex Container Solution
  • Практические руководства
    • Все руководства
    • Запуск Docker-образа на виртуальной машине
    • Создание триггера с помощью Cloud Functions
    • Настройка автоматического сканирования Docker-образа
    • Подпись и проверка Docker-образов в Managed Service for Kubernetes
    • Сканирование уязвимостей при непрерывном развертывании приложений Managed Service for Kubernetes с помощью GitLab
  • Концепции
    • Обзор
    • Docker-образ
    • Том Docker
    • Реестр
    • Репозиторий
    • Политика автоматического удаления Docker-образов
    • Сканер уязвимостей
    • Триггер Cloud Functions
    • Резервное копирование
    • Квоты и лимиты
  • Управление доступом
  • Правила тарификации
  • Справочник API
    • Аутентификация в API
    • gRPC (англ.)
      • Overview
      • ImageService
      • LifecyclePolicyService
      • RegistryService
      • RepositoryService
      • ScannerService
      • OperationService
    • REST (англ.)
      • Overview
      • Image
        • Overview
        • delete
        • get
        • list
      • LifecyclePolicy
        • Overview
        • create
        • delete
        • dryRun
        • get
        • getDryRunResult
        • list
        • listDryRunResultAffectedImages
        • listDryRunResults
        • update
      • Registry
        • Overview
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listIpPermission
        • setAccessBindings
        • setIpPermission
        • update
        • updateAccessBindings
        • updateIpPermission
      • Repository
        • Overview
        • delete
        • get
        • getByName
        • list
        • listAccessBindings
        • setAccessBindings
        • updateAccessBindings
        • upsert
      • Scanner
        • Overview
        • get
        • getLast
        • list
        • listVulnerabilities
        • scan
  • Решение проблем
  • Вопросы и ответы
  1. Справочник API
  2. REST (англ.)
  3. LifecyclePolicy
  4. Overview

Container Registry API, REST: LifecyclePolicy methods

Статья создана
Yandex Cloud
  • JSON Representation
  • Methods

A set of methods for managing Lifecycle policy resources.

JSON Representation

{
  "id": "string",
  "name": "string",
  "repositoryId": "string",
  "description": "string",
  "status": "string",
  "createdAt": "string",
  "rules": [
    {
      "description": "string",
      "expirePeriod": "string",
      "tagRegexp": "string",
      "untagged": true,
      "retainedTop": "string"
    }
  ]
}
Field Description
id string

ID of the lifecycle policy.

name string

Name of the lifecycle policy.

repositoryId string

ID of the repository that the lifecycle policy belongs to. Required. The maximum string length in characters is 50.

description string

Description of the lifecycle policy. The maximum string length in characters is 256.

status string

Status of lifecycle policy.

  • ACTIVE: Policy is active and regularly deletes Docker images according to the established rules.
  • DISABLED: Policy is disabled and does not delete Docker images in the repository. Policies in this status can be used for preparing and testing rules.
createdAt string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

rules[] object

The rules of lifecycle policy.

rules[].
description
string

Description of the lifecycle policy rule.

The maximum string length in characters is 256.

rules[].
expirePeriod
string

Period of time for automatic deletion. Period must be a multiple of 24 hours.

The minimum value is 86400 seconds.

rules[].
tagRegexp
string

Tag for specifying a filter in the form of a regular expression.

The maximum string length in characters is 256.

rules[].
untagged
boolean (boolean)

Tag for applying the rule to Docker images without tags.

rules[].
retainedTop
string (int64)

Number of Docker images (falling under the specified filter by tags) that must be left, even if the expire_period has already expired.

The minimum value is 0.

Methods

Method Description
create Creates a lifecycle policy in the specified repository.
delete Deletes the specified lifecycle policy.
dryRun Creates a request of a dry run of the lifecycle policy.
get Returns the specified lifecycle policy.
getDryRunResult Returns the dry run result of the specified lifecycle policy.
list Retrieves the list of lifecycle policies in the specified repository.
listDryRunResultAffectedImages Retrieves the list of the affected images.
listDryRunResults Retrieves the list of the dry run results.
update Updates the specified lifecycle policy.

Была ли статья полезна?

Language / Region
Проект Яндекса
© 2023 ООО «Яндекс.Облако»
В этой статье:
  • JSON Representation
  • Methods