tag_bindings
Creates, updates, deletes, gets or lists a tag_bindings
resource.
Overview
Name | tag_bindings |
Type | Resource |
Id | google.cloudresourcemanager.tag_bindings |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Output only. The name of the TagBinding. This is a String of the form: tagBindings/{full-resource-name}/{tag-value-name} (e.g. tagBindings/%2F%2Fcloudresourcemanager.googleapis.com%2Fprojects%2F123/tagValues/456 ). |
parent | string | The full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123 |
tagValue | string | The TagValue of the TagBinding. Must be of the form tagValues/456 . |
tagValueNamespacedName | string | The namespaced name for the TagValue of the TagBinding. Must be in the format {parent_id}/{tag_key_short_name}/{short_name} . For methods that support TagValue namespaced name, only one of tag_value_namespaced_name or tag_value may be filled. Requests with both fields will be rejected. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | parent , pageSize , pageToken | Lists the TagBindings for the given Google Cloud resource, as specified with parent . NOTE: The parent field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name | |
create | insert | validateOnly | Creates a TagBinding between a TagValue and a Google Cloud resource. | |
delete | delete | tagBindingsId | Deletes a TagBinding. |
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 |
---|---|---|
tagBindingsId | string | |
pageSize | integer (int32) | |
pageToken | string | |
parent | string | |
validateOnly | boolean |
SELECT
examples
- list
Lists the TagBindings for the given Google Cloud resource, as specified with parent
. NOTE: The parent
field is expected to be a full resource name: https://cloud.google.com/apis/design/resource_names#full_resource_name
SELECT
name,
parent,
tagValue,
tagValueNamespacedName
FROM google.cloudresourcemanager.tag_bindings
WHERE parent = '{{ parent }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a TagBinding between a TagValue and a Google Cloud resource.
INSERT INTO google.cloudresourcemanager.tag_bindings (
data__parent,
data__tagValue,
data__tagValueNamespacedName,
validateOnly
)
SELECT
'{{ parent }}',
'{{ tagValue }}',
'{{ tagValueNamespacedName }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: tag_bindings
props:
- name: parent
value: string
description: >
The full resource name of the resource the TagValue is bound to. E.g. `//cloudresourcemanager.googleapis.com/projects/123`
- name: tagValue
value: string
description: >
The TagValue of the TagBinding. Must be of the form `tagValues/456`.
- name: tagValueNamespacedName
value: string
description: >
The namespaced name for the TagValue of the TagBinding. Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`. For methods that support TagValue namespaced name, only one of tag_value_namespaced_name or tag_value may be filled. Requests with both fields will be rejected.
- name: validateOnly
value: boolean
DELETE
examples
- delete
Deletes a TagBinding.
DELETE FROM google.cloudresourcemanager.tag_bindings
WHERE tagBindingsId = '{{ tagBindingsId }}' --required;