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
    • Serverless Integrations
    • 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 Identity and Access Management
    • All guides
    • Handling secrets that are available in the public domain
    • Users
    • User groups
      • Overview
      • Assigning a role
      • Viewing assigned roles
      • Revoking a role
  • Secure use of Yandex Cloud
  • Access management
  • Pricing policy
  • Role reference
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. Roles
  3. Revoking a role

Revoke a role for a resource

Written by
Yandex Cloud
Improved by
ilya
Updated at August 31, 2026
View in Markdown

Note

Even if an operation with resources pertaining to Yandex Cloud services is allowed by a role, it may still be blocked if the organization, cloud, or folder is subject to an access policy prohibiting this operation.

If you want to prevent a subject from accessing a resource, revoke the relevant roles for this resource and for resources that grant inherited access rights. For more information, see How access management works in Yandex Cloud.

Revoking a roleRevoking a role

Management console
CLI
Terraform
API
  • To revoke a role in the folder and its child resources:

    1. In the management console, click or in the top panel and select the folder.
    2. Navigate to the Access bindings tab.
    3. Select a user from the list and click next to the username.
    4. Click Edit roles.
    5. Click next to the role to revoke.
    6. Click Save.
  • To revoke a role in the cloud:

    1. In the management console, click or in the top panel and select the cloud.
    2. Navigate to the Access bindings tab.
    3. Select a user from the list and click next to the username.
    4. Click Edit roles.
    5. Click next to the role to revoke.
    6. Click Save.
  • To revoke all the folder or cloud roles at once:

    1. In the management console, click or in the top panel and select a folder or cloud.
    2. Navigate to the Access bindings tab.
    3. Select a user from the list and click next to the username.
    4. If you want to revoke all of the user's roles in the cloud, click Revoke access and confirm the revocation.

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

To revoke a role from a subject, delete access permissions for the appropriate resource:

  1. View the roles assigned for a resource:

    yc <service_name> <resource_category> list-access-bindings <resource_name_or_ID>
    

    Where:

    • <service_name>: Name of the service the resource belongs to, e.g., resource-manager.
    • <resource_category>: Resource category, e.g., folder.
    • <resource_name_or_ID>: Resource name or ID. You can specify a resource by its name or ID.

    For example, you can view the roles and the assignees for the default folder:

    yc resource-manager folder list-access-bindings default
    

    Result:

    +---------------------+----------------+----------------------+
    |       ROLE ID       |  SUBJECT TYPE  |      SUBJECT ID      |
    +---------------------+----------------+----------------------+
    | editor              | serviceAccount | ajepg0mjas06******** |
    | viewer              | userAccount    | aje6o61dvog2******** |
    +---------------------+----------------+----------------------+
    
  2. To delete access permissions, run this command:

    yc <service_name> <resource_category> remove-access-binding \
        --id <resource_ID> \
        --role <role_ID> \
        --subject <subject_type>:<subject_ID>
    

    Where:

    • --id: ID of the resource to revoke the role from.

    • --role: ID of the role to revoke, e.g., resource-manager.clouds.owner.

    • --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 the corresponding 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)

      —

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. To revoke a resource role from a subject, find the resource description in the configuration file:

    resource "yandex_resourcemanager_cloud_iam_binding" "admin" {
        cloud_id    = "<cloud_ID>"
        role        = "<role>"
        members     = ["<subject_1>","<subject_2>,...,<subject_n>"]
    }
    
  2. Delete the record with information about the subject whose permissions you need to revoke from the list of subjects titled members.

    Subject designations

    To indicate a subject, use a combination of its type and unique ID, i.e., <subject_type>:<ID>. 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_resourcemanager_cloud_iam_binding resource, see this provider guide.

  3. Make sure the configuration files are correct.

    1. In the terminal, navigate to the directory where you created your configuration file.
    2. Run a check using this command:
    terraform plan
    

    If the configuration is correct, the terminal will display a list of the resources and their settings. Otherwise, Terraform will show any detected errors.

  4. Deploy the cloud resources.

    1. If the configuration is correct, run this command:

      terraform apply
      
    2. Confirm creating the resources by typing yes and pressing Enter.

    This will create all the resources you need in the specified folder. You can check the new resource using the management console or this CLI command:

    yc resource-manager cloud list-access-bindings <cloud_name_or_ID>
    

To revoke a resource role from a subject, delete the relevant access permissions:

  1. View the roles and assignees for the resource using the listAccessBindings REST API method. For example, to view the roles for the b1gvmob95yys******** folder:

    export FOLDER_ID=b1gvmob95yys********
    export IAM_TOKEN=CggaATEVAgA...
    curl \
      --header "Authorization: Bearer ${IAM_TOKEN}" \
      "https://resource-manager.api.cloud.yandex.net/resource-manager/v1/folders/${FOLDER_ID}:listAccessBindings"
    

    Result:

    {
      "accessBindings": [
      {
        "subject": {
          "id": "ajei8n54hmfh********",
          "type": "userAccount"
        },
        "roleId": "editor"
      }
      ]
    }
    
  2. Create the request body, e.g., in the body.json file. In the request body, specify access permissions to delete. For example, revoke the editor role from the ajei8n54hmfh******** user:

    body.json:

    {
        "accessBindingDeltas": [{
            "action": "REMOVE",
            "accessBinding": {
                "roleId": "editor",
                "subject": {
                    "id": "ajei8n54hmfh********",
                    "type": "userAccount"
                    }
                }
            }
        ]
    }
    
  3. Revoke a role by deleting the assigned permissions:

    export FOLDER_ID=b1gvmob95yys********
    export IAM_TOKEN=CggaAT********
    curl \
      --request POST \
      --header "Content-Type: application/json" \
      --header "Authorization: Bearer ${IAM_TOKEN}" \
      --data '@body.json' \
      "https://resource-manager.api.cloud.yandex.net/resource-manager/v1/folders/${FOLDER_ID}:updateAccessBindings"
    

Was the article helpful?

Previous
Viewing assigned roles
Next
Overview
© 2026 Direct Cursus Technology L.L.C.