tag_values
Creates, updates, deletes, gets or lists a tag_values
resource.
Overview
Name | tag_values |
Type | Resource |
Id | google.cloudresourcemanager.tag_values |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Resource name for TagValue in the format tagValues/456 . |
description | string | Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write. |
createTime | string | Output only. Creation time. |
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 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. |
updateTime | string | Output only. Update time. |
Methods
Name | Accessible by | Required 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 |
| Lists all TagValues for a specific TagKey. |
create | INSERT |
| 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. |
delete | DELETE | tagValuesId | Deletes a TagValue. The TagValue cannot have any bindings when it is deleted. |
patch | UPDATE | tagValuesId | Updates the attributes of the TagValue resource. |
SELECT
examples
Lists all TagValues for a specific TagKey.
SELECT
name,
description,
createTime,
etag,
namespacedName,
parent,
shortName,
updateTime
FROM google.cloudresourcemanager.tag_values
;
INSERT
example
Use the following StackQL query and manifest file to create a new tag_values
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.cloudresourcemanager.tag_values (
name,
parent,
shortName,
description,
etag
)
SELECT
'{{ name }}',
'{{ parent }}',
'{{ shortName }}',
'{{ description }}',
'{{ etag }}'
;
- name: your_resource_model_name
props:
- name: name
value: string
- name: parent
value: string
- name: shortName
value: string
- name: namespacedName
value: string
- name: description
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: etag
value: string
UPDATE
example
Updates a tag_values
resource.
/*+ update */
UPDATE google.cloudresourcemanager.tag_values
SET
name = '{{ name }}',
parent = '{{ parent }}',
shortName = '{{ shortName }}',
description = '{{ description }}',
etag = '{{ etag }}'
WHERE
tagValuesId = '{{ tagValuesId }}';
DELETE
example
Deletes the specified tag_values
resource.
/*+ delete */
DELETE FROM google.cloudresourcemanager.tag_values
WHERE tagValuesId = '{{ tagValuesId }}';