REST Resource: liens

Resource: Lien

A Lien represents an encumbrance on the actions that can be performed on a resource.

JSON representation
{
 "name": string,
 "parent": string,
 "restrictions": [
 string
 ],
 "reason": string,
 "origin": string,
 "createTime": string
}
Fields
name

string

A system-generated unique identifier for this Lien.

Example: liens/1234abcd

parent

string

A reference to the resource this Lien is attached to. The server will validate the parent against those for which Liens are supported.

Example: projects/1234

restrictions[]

string

The types of operations which should be blocked as a result of this Lien. Each value should correspond to an IAM permission. The server will validate the permissions against those for which Liens are supported.

An empty list is meaningless and will be rejected.

Example: ['resourcemanager.projects.delete']

reason

string

Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters.

Example: 'Holds production API key'

origin

string

A stable, user-visible/meaningful string identifying the origin of the Lien, intended to be inspected programmatically. Maximum length of 200 characters.

Example: 'compute.googleapis.com'

createTime

string (Timestamp format)

The creation time of this Lien.

Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014年10月02日T15:01:23Z", "2014年10月02日T15:01:23.045123456Z" or "2014年10月02日T15:01:23+05:30".

Methods

create

Create a Lien which applies to the resource denoted by the parent field.

delete

Delete a Lien by name.

get

Retrieve a Lien by name.

list

List all Liens applied to the parent resource.

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年06月11日 UTC.