Skip to main content

tag_bindings

Creates, updates, deletes, gets or lists a tag_bindings resource.

Overview

Nametag_bindings
TypeResource
Idgoogle.cloudresourcemanager.tag_bindings

Fields

NameDatatypeDescription
namestringOutput 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).
parentstringThe full resource name of the resource the TagValue is bound to. E.g. //cloudresourcemanager.googleapis.com/projects/123
tagValuestringThe TagValue of the TagBinding. Must be of the form tagValues/456.
tagValueNamespacedNamestringThe 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

NameAccessible byRequired ParamsDescription
listSELECTLists 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
createINSERTCreates a TagBinding between a TagValue and a Google Cloud resource.
deleteDELETEtagBindingsIdDeletes a TagBinding.

SELECT examples

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
;

INSERT example

Use the following StackQL query and manifest file to create a new tag_bindings resource.

/*+ create */
INSERT INTO google.cloudresourcemanager.tag_bindings (
parent,
tagValue,
tagValueNamespacedName
)
SELECT
'{{ parent }}',
'{{ tagValue }}',
'{{ tagValueNamespacedName }}'
;

DELETE example

Deletes the specified tag_bindings resource.

/*+ delete */
DELETE FROM google.cloudresourcemanager.tag_bindings
WHERE tagBindingsId = '{{ tagBindingsId }}';