tag_values
Creates, updates, deletes, gets or lists a tag_values resource.
Overview
| Name | tag_values |
| Type | Resource |
| Id | google.cloudresourcemanager.tag_values |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Resource name for TagValue in the format tagValues/456. |
createTime | string (google-datetime) | Output only. Creation time. |
description | string | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
etag | string | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
namespacedName | string | Output only. The namespaced name of the TagValue. Can be in the form {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. |
parent | string | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form tagKeys/{tag_key_id}. |
shortName | string | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. |
updateTime | string (google-datetime) | Output only. Update time. |
| Name | Datatype | Description |
|---|---|---|
name | string | Immutable. Resource name for TagValue in the format tagValues/456. |
createTime | string (google-datetime) | Output only. Creation time. |
description | string | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
etag | string | Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details. |
namespacedName | string | Output only. The namespaced name of the TagValue. Can be in the form {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. |
parent | string | Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form tagKeys/{tag_key_id}. |
shortName | string | Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. |
updateTime | string (google-datetime) | Output only. Update time. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | tagValuesId | Retrieves a TagValue. This method will return PERMISSION_DENIED if the value does not exist or the user does not have permission to view it. | |
list | select | pageSize, pageToken, parent | Lists all TagValues for a specific TagKey. | |
create | insert | validateOnly | Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error. A maximum of 1000 TagValues can exist under a TagKey at any given time. | |
patch | update | tagValuesId | validateOnly, updateMask | Updates the attributes of the TagValue resource. |
delete | delete | tagValuesId | etag, validateOnly | Deletes a TagValue. The TagValue cannot have any bindings when it is deleted. |
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 |
|---|---|---|
tagValuesId | string | |
etag | string | |
pageSize | integer (int32) | |
pageToken | string | |
parent | string | |
updateMask | string (google-fieldmask) | |
validateOnly | boolean |
SELECT examples
- get
- list
Retrieves a TagValue. This method will return PERMISSION_DENIED if the value does not exist or the user does not have permission to view it.
SELECT
name,
createTime,
description,
etag,
namespacedName,
parent,
shortName,
updateTime
FROM google.cloudresourcemanager.tag_values
WHERE tagValuesId = '{{ tagValuesId }}' -- required
;
Lists all TagValues for a specific TagKey.
SELECT
name,
createTime,
description,
etag,
namespacedName,
parent,
shortName,
updateTime
FROM google.cloudresourcemanager.tag_values
WHERE pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND parent = '{{ parent }}'
;
INSERT examples
- create
- Manifest
Creates a TagValue as a child of the specified TagKey. If a another request with the same parameters is sent while the original request is in process the second request will receive an error. A maximum of 1000 TagValues can exist under a TagKey at any given time.
INSERT INTO google.cloudresourcemanager.tag_values (
data__description,
data__shortName,
data__parent,
data__etag,
data__name,
validateOnly
)
SELECT
'{{ description }}',
'{{ shortName }}',
'{{ parent }}',
'{{ etag }}',
'{{ name }}',
'{{ validateOnly }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: tag_values
props:
- name: description
value: "{{ description }}"
description: |
Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write.
- name: shortName
value: "{{ shortName }}"
description: |
Required. Immutable. User-assigned short name for TagValue. The short name should be unique for TagValues within the same parent TagKey. The short name must be 256 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between.
- name: parent
value: "{{ parent }}"
description: |
Immutable. The resource name of the new TagValue's parent TagKey. Must be of the form `tagKeys/{tag_key_id}`.
- name: etag
value: "{{ etag }}"
description: |
Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details.
- name: name
value: "{{ name }}"
description: |
Immutable. Resource name for TagValue in the format `tagValues/456`.
- name: validateOnly
value: {{ validateOnly }}
UPDATE examples
- patch
Updates the attributes of the TagValue resource.
UPDATE google.cloudresourcemanager.tag_values
SET
data__description = '{{ description }}',
data__shortName = '{{ shortName }}',
data__parent = '{{ parent }}',
data__etag = '{{ etag }}',
data__name = '{{ name }}'
WHERE
tagValuesId = '{{ tagValuesId }}' --required
AND validateOnly = {{ validateOnly}}
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a TagValue. The TagValue cannot have any bindings when it is deleted.
DELETE FROM google.cloudresourcemanager.tag_values
WHERE tagValuesId = '{{ tagValuesId }}' --required
AND etag = '{{ etag }}'
AND validateOnly = '{{ validateOnly }}'
;