A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://python-gitlab.readthedocs.org/en/stable/gl_objects/protected_container_repositories.html below:

Protected container repositories - python-gitlab v6.2.0

Toggle table of contents sidebar

Protected container repositories

You can list and manage container registry protection rules in a project.

References Examples

List the container registry protection rules for a project:

registry_rules = project.registry_protection_repository_rules.list(get_all=True)

Create a container registry protection rule:

registry_rule = project.registry_protection_repository_rules.create(
    {
        'repository_path_pattern': 'test/image',
        'minimum_access_level_for_push': 'maintainer',
        'minimum_access_level_for_delete': 'maintainer',
    }
)

Update a container registry protection rule:

registry_rule.minimum_access_level_for_push = 'owner'
registry_rule.save()

Delete a container registry protection rule:

registry_rule = project.registry_protection_repository_rules.delete(registry_rule.id)
# or
registry_rule.delete()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4