liens
Creates, updates, deletes, gets or lists a liens resource.
Overview
| Name | liens |
| Type | Resource |
| Id | google.cloudresourcemanager.liens |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | A system-generated unique identifier for this Lien. Example: liens/1234abcd |
createTime | string (google-datetime) | The creation time of this Lien. |
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' |
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 |
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' |
restrictions | array | 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'] |
| Name | Datatype | Description |
|---|---|---|
name | string | A system-generated unique identifier for this Lien. Example: liens/1234abcd |
createTime | string (google-datetime) | The creation time of this Lien. |
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' |
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 |
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' |
restrictions | array | 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'] |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | liensId | Retrieve a Lien by name. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.get | |
list | select | parent, pageSize, pageToken | List all Liens applied to the parent resource. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.get. | |
create | insert | Create a Lien which applies to the resource denoted by the parent field. Callers of this method will require permission on the parent resource. For example, applying to projects/1234 requires permission resourcemanager.projects.updateLiens. NOTE: Some resources may limit the number of Liens which may be applied. | ||
delete | delete | liensId | Delete a Lien by name. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.updateLiens. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
liensId | string | |
pageSize | integer (int32) | |
pageToken | string | |
parent | string |
SELECT examples
- get
- list
Retrieve a Lien by name. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.get
SELECT
name,
createTime,
origin,
parent,
reason,
restrictions
FROM google.cloudresourcemanager.liens
WHERE liensId = '{{ liensId }}' -- required
;
List all Liens applied to the parent resource. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.get.
SELECT
name,
createTime,
origin,
parent,
reason,
restrictions
FROM google.cloudresourcemanager.liens
WHERE parent = '{{ parent }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Create a Lien which applies to the resource denoted by the parent field. Callers of this method will require permission on the parent resource. For example, applying to projects/1234 requires permission resourcemanager.projects.updateLiens. NOTE: Some resources may limit the number of Liens which may be applied.
INSERT INTO google.cloudresourcemanager.liens (
data__restrictions,
data__reason,
data__name,
data__origin,
data__parent,
data__createTime
)
SELECT
'{{ restrictions }}',
'{{ reason }}',
'{{ name }}',
'{{ origin }}',
'{{ parent }}',
'{{ createTime }}'
RETURNING
name,
createTime,
origin,
parent,
reason,
restrictions
;
# Description fields are for documentation purposes
- name: liens
props:
- name: restrictions
value:
- "{{ restrictions }}"
description: |
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']
- name: reason
value: "{{ reason }}"
description: |
Concise user-visible strings indicating why an action cannot be performed on a resource. Maximum length of 200 characters. Example: 'Holds production API key'
- name: name
value: "{{ name }}"
description: |
A system-generated unique identifier for this Lien. Example: `liens/1234abcd`
- name: origin
value: "{{ origin }}"
description: |
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'
- name: parent
value: "{{ parent }}"
description: |
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`
- name: createTime
value: "{{ createTime }}"
description: |
The creation time of this Lien.
DELETE examples
- delete
Delete a Lien by name. Callers of this method will require permission on the parent resource. For example, a Lien with a parent of projects/1234 requires permission resourcemanager.projects.updateLiens.
DELETE FROM google.cloudresourcemanager.liens
WHERE liensId = '{{ liensId }}' --required
;