Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Container Registry
  • Service shutdown
  • Getting started
    • All guides
    • Installing and configuring Docker
    • Authentication in Container Registry
    • Scanning Docker images for vulnerabilities
    • Creating a trigger for a registry
      • Assigning a role
      • Viewing assigned roles
      • Revoking a role
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Troubleshooting
  • FAQ
  1. Step-by-step guides
  2. Working with roles
  3. Revoking a role

Revoking a role for a resource

Written by
Yandex Cloud
Updated at October 9, 2026
View in Markdown

Warning

Starting October 13, 2026, Yandex Container Registry will be unavailable to new users.

The existing users can create resources until November 10, 2026. Afterwards, Yandex Container Registry will go read-only and cease to operate on December 14, 2026. For more information on how it will be handled, see this article on Yandex Container Registry sunset.

You can prevent a subject from accessing a resource. To do this, revoke the subject's roles for that resource and any resources from which permissions are inherited. For more information, see How access management works in Yandex Cloud.

Management console
CLI
Terraform
API
  1. In the management console, select the folder where you want to revoke a role for a resource.
  2. Navigate to Container Registry.
  3. Select a registry or repository in it.
  4. Navigate to the Access bindings tab.
  5. Select a user from the list and click next to the username.
  6. Click Edit roles.
  7. Click next to the role to revoke.
  8. Click Save.

If you do not have the Yandex Cloud CLI yet, install and initialize it.

The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also specify a different folder for any command using --folder-name or --folder-id.

If you access a resource by its name, the search will be limited to the default folder. If you access a resource by its ID, the search will be global, i.e., through all folders based on access permissions.

  1. View assigned roles:

    yc container <resource> list-access-bindings <resource_name_or_ID>
    

    Where:

    • <resource>: registry or repository resource type.
    • <resource_name_or_ID>: Name or ID of the resource the role is assigned for.
  2. Revoke a role:

    yc container <resource> remove-access-binding <resource_name_or_ID> \
      --role <role> \
      --subject <subject_type>:<subject_ID>
    

    Where:

    • <resource>: registry or repository resource type.

    • <resource_name_or_ID>: Name or ID of the resource you want to revoke the role for.

    • <role_ID>: Role you want to revoke.

    • --subject: Subject to revoke the role from.

      Subject designations

      To indicate a subject, use the --subject parameter in <subject_type>:<ID> format. For some subject types, the Yandex Cloud CLI provides separate parameters instead of --subject, where you only need to specify the subject name or ID without the type. Possible subject designations and matching CLI parameters:

      Subject type

      Subject designation

      Yandex Cloud CLI parameter

      userAccount

      userAccount:<user_ID>

      --user-account-id or --user-yandex-login

      serviceAccount

      serviceAccount:<service_account_ID>

      --service-account-id or --service-account-name

      federatedUser

      federatedUser:<user_ID>

      --user-account-id

      group

      group:<group_ID>

      --group-members

      system

      system:allAuthenticatedUsers

      (All authenticated users group)

      --all-authenticated-users

      system:allUsers

      (All users group)

      —

      system:group:organization:<organization_ID>:users

      (All users in organization X group)

      --organization-users

      system:group:federation:<federation_ID>:users

      (All users in federation N group)

      --federation-users

      system:group:userpool:<pool_ID>:users

      (All users in userpool P group)

      —

    Example

    The example below revokes the container-registry.admin role for my-first-registry from the user.

    yc container registry remove-access-binding my-first-registry \
      --role container-registry.admin \
      --subject userAccount:ajeugsk5ubk6********
    

    Result:

    done (9s)
    

If you do not have Terraform yet, install it and configure the Yandex Cloud provider.

To manage infrastructure using Terraform under a service account or user accounts (a Yandex account, a federated account, or a local user), authenticate using the appropriate method.

  1. Open the Terraform configuration file and delete the section describing the role assignment.

    Example of role assignment description in the Terraform configuration:

    resource "yandex_container_registry_iam_binding" "registry_name" {
      registry_id = "<registry_ID>"
      role        = "<role>"
    
      members = [
        "<subject_type>:<subject_ID>",
      ]
    }
    

    Where:

    • registry_id: ID of the registry for which the role was assigned.

    • role: Role you want to revoke.

    • members: List of designations for subjects to revoke the role from.

      Subject designations

      To indicate a subject, use a combination of its type and unique ID, i.e., <subject_type>:<ID>. Here is how you can designate a subject:

      Subject type

      Subject designation

      userAccount

      userAccount:<user_ID>

      serviceAccount

      serviceAccount:<service_account_ID>

      federatedUser

      federatedUser:<user_ID>

      group

      group:<group_ID>

      system

      system:allAuthenticatedUsers

      (All authenticated users group)

      system:allUsers

      (All users group)

      system:group:organization:<organization_ID>:users

      (All users in organization X group)

      system:group:federation:<federation_ID>:users

      (All users in federation N group)

      system:group:userpool:<pool_ID>:users

      (All users in userpool P group)

    For more on the properties of the yandex_container_registry_iam_binding resource, see this provider guide.

    1. In the terminal, navigate to the configuration file directory.

    2. Make sure the configuration is correct using this command:

      terraform validate
      

      If the configuration is valid, you will get this message:

      Success! The configuration is valid.
      
    3. Run this command:

      terraform plan
      

      You will see a list of resources and their properties. No changes will be made at this step. Terraform will show any errors in the configuration.

    4. Apply the configuration changes:

      terraform apply
      
    5. Type yes and press Enter to confirm the changes.

You can check whether the role has been revoked using the management console or this CLI command:

  • Registry:

    yc container registry list-access-bindings <registry_name_or_ID>
    
  • Repository:

    yc container repository list-access-bindings <repository_name_or_ID>
    

View the roles assigned for resources.

To revoke roles assigned for a registry, use the updateAccessBindings REST API method for the Registry resource or the RegistryService/UpdateAccessBindings gRPC API call.

To revoke roles assigned for a repository, use the updateAccessBindings REST API method for the Repository resource or the RepositoryService/UpdateAccessBindings gRPC API call.

In the request body, set the action property to REMOVE and specify subject type and ID in the subject property.

Subject designations

To indicate a subject, use a combination of its type and unique ID in the subject.type and subject.id fields of the request. Here are possible combinations:

subject.type

subject.id

userAccount

<user_ID>

serviceAccount

<service_account_ID>

federatedUser

<user_ID>

group

<group_ID>

system

allAuthenticatedUsers

(All authenticated users group)

allUsers

(All users group)

group:organization:<organization_ID>:users

(All users in organization X group)

group:federation:<federation_ID>:users

(All users in federation N group)

group:userpool:<pool_ID>:users

(All users in userpool P group)

For more information about managing roles, see this Yandex Identity and Access Management guide.

Was the article helpful?

Previous
Viewing assigned roles
Next
Yandex Container Solution
© 2026 Direct Cursus Technology L.L.C.