A RetroSearch Logo

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

Search Query:

Showing content from https://cloud.google.com/resource-manager/docs/project-liens below:

Protecting projects with liens | Resource Manager

Protecting projects with liens

Stay organized with collections Save and categorize content based on your preferences.

This document is for Project owners and Organization administrators looking to add protections against project deletion.

You can place a lien upon a project to block the project's deletion until you remove the lien. This can be useful to protect projects of particular importance.

Liens can also be placed upon a project automatically. For example, if you allow Identity and Access Management (IAM) service accounts from one project to be attached to resources in other projects, a lien is placed upon the project where the service accounts are located.

Before you begin

The gcloud CLI is the easiest way to interact with project liens. If you don't have it installed, you can use Google Cloud Shell.

Required roles

To get the permissions that you need to modify liens, ask your administrator to grant you the Project lien modifier (roles/resourcemanager.lienModifier) IAM role on projects. For more information about granting roles, see Manage access to projects, folders, and organizations.

This predefined role contains the permissions required to modify liens. To see the exact permissions that are required, expand the Required permissions section:

Required permissions

The following permissions are required to modify liens:

You might also be able to get these permissions with custom roles or other predefined roles.

Placing a lien on a project

To place a lien on a project, use the alpha resource-manager liens create command.

gcloud alpha resource-manager liens create \
    --project=PROJECT_ID \
    --restrictions=PERMISSION_RESTRICTION \
    --reason=LIEN_REASON \
    --origin=LIEN_ORIGIN

Replace the following:

Listing liens on a project

To list all liens applied to a project, use the alpha resource-manager liens list command.

gcloud alpha resource-manager liens list

The output is similar to the following:

gcloud alpha resource-manager liens list
NAME                                                  ORIGIN            REASON
p1061081023732-l3d8032b3-ea2c-4683-ad48-5ca23ddd00e7  user@example.com  testing
Removing liens from a project

To remove a lien from a project, use the alpha resource-manager liens delete command.

gcloud alpha resource-manager liens delete LIEN_NAME

Replace LIEN_NAME with the name of the lien to be deleted, such as p1061081023732-l3d8032b3-ea2c-4683-ad48-5ca23ddd00e7.

References

API Reference: REST Resource: liens

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-02 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-02 UTC."],[],[]]


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.5