Reference documentation and code samples for the Google Cloud Resource Manager V3 Client class TagValue.
A TagValue is a child of a particular TagKey. This is used to group
cloud resources for the purpose of controlling them using policies.
Generated from protobuf messagegoogle.cloud.resourcemanager.v3.TagValue
Namespace
Google \ Cloud \ ResourceManager \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Immutable. Resource name for TagValue in the formattagValues/456.
↳ parent
string
Immutable. The resource name of the new TagValue's parent TagKey. Must be of the formtagKeys/{tag_key_id}.
↳ short_name
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.
↳ namespaced_name
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}.
↳ description
string
Optional. User-assigned description of the TagValue. Must not exceed 256 characters. Read-write.
Optional. Entity tag which users can pass to prevent race conditions. This field is always set in server responses. See UpdateTagValueRequest for details.
getName
Immutable. Resource name for TagValue in the formattagValues/456.
Returns
Type
Description
string
setName
Immutable. Resource name for TagValue in the formattagValues/456.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getParent
Immutable. The resource name of the new TagValue's parent TagKey.
Must be of the formtagKeys/{tag_key_id}.
Returns
Type
Description
string
setParent
Immutable. The resource name of the new TagValue's parent TagKey.
Must be of the formtagKeys/{tag_key_id}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getShortName
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.
Returns
Type
Description
string
setShortName
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNamespacedName
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}.
Returns
Type
Description
string
setNamespacedName
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}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDescription
Optional. User-assigned description of the TagValue.
Must not exceed 256 characters.
Read-write.
Returns
Type
Description
string
setDescription
Optional. User-assigned description of the TagValue.
Optional. Entity tag which users can pass to prevent race conditions. This
field is always set in server responses. See UpdateTagValueRequest for
details.
Returns
Type
Description
string
setEtag
Optional. Entity tag which users can pass to prevent race conditions. This
field is always set in server responses. See UpdateTagValueRequest for
details.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Resource Manager V3 Client - Class TagValue (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-resource-manager/latest/V3.TagValue)\n- [1.0.3](/php/docs/reference/cloud-resource-manager/1.0.3/V3.TagValue)\n- [0.8.5](/php/docs/reference/cloud-resource-manager/0.8.5/V3.TagValue)\n- [0.7.2](/php/docs/reference/cloud-resource-manager/0.7.2/V3.TagValue)\n- [0.6.1](/php/docs/reference/cloud-resource-manager/0.6.1/V3.TagValue)\n- [0.5.0](/php/docs/reference/cloud-resource-manager/0.5.0/V3.TagValue)\n- [0.4.1](/php/docs/reference/cloud-resource-manager/0.4.1/V3.TagValue)\n- [0.3.9](/php/docs/reference/cloud-resource-manager/0.3.9/V3.TagValue) \nReference documentation and code samples for the Google Cloud Resource Manager V3 Client class TagValue.\n\nA TagValue is a child of a particular TagKey. This is used to group\ncloud resources for the purpose of controlling them using policies.\n\nGenerated from protobuf message `google.cloud.resourcemanager.v3.TagValue`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ResourceManager \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nImmutable. Resource name for TagValue in the format `tagValues/456`.\n\n### setName\n\nImmutable. Resource name for TagValue in the format `tagValues/456`.\n\n### getParent\n\nImmutable. The resource name of the new TagValue's parent TagKey.\n\nMust be of the form `tagKeys/{tag_key_id}`.\n\n### setParent\n\nImmutable. The resource name of the new TagValue's parent TagKey.\n\nMust be of the form `tagKeys/{tag_key_id}`.\n\n### getShortName\n\nRequired. Immutable. User-assigned short name for TagValue. The short name\nshould be unique for TagValues within the same parent TagKey.\n\nThe short name must be 63 characters or less, beginning and ending with\nan alphanumeric character (\\[a-z0-9A-Z\\]) with dashes (-), underscores (_),\ndots (.), and alphanumerics between.\n\n### setShortName\n\nRequired. Immutable. User-assigned short name for TagValue. The short name\nshould be unique for TagValues within the same parent TagKey.\n\nThe short name must be 63 characters or less, beginning and ending with\nan alphanumeric character (\\[a-z0-9A-Z\\]) with dashes (-), underscores (_),\ndots (.), and alphanumerics between.\n\n### getNamespacedName\n\nOutput only. The namespaced name of the TagValue. Can be in the form\n`{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or\n`{project_id}/{tag_key_short_name}/{tag_value_short_name}` or\n`{project_number}/{tag_key_short_name}/{tag_value_short_name}`.\n\n### setNamespacedName\n\nOutput only. The namespaced name of the TagValue. Can be in the form\n`{organization_id}/{tag_key_short_name}/{tag_value_short_name}` or\n`{project_id}/{tag_key_short_name}/{tag_value_short_name}` or\n`{project_number}/{tag_key_short_name}/{tag_value_short_name}`.\n\n### getDescription\n\nOptional. User-assigned description of the TagValue.\n\nMust not exceed 256 characters.\nRead-write.\n\n### setDescription\n\nOptional. User-assigned description of the TagValue.\n\nMust not exceed 256 characters.\nRead-write.\n\n### getCreateTime\n\nOutput only. Creation time.\n\n### hasCreateTime\n\n### clearCreateTime\n\n### setCreateTime\n\nOutput only. Creation time.\n\n### getUpdateTime\n\nOutput only. Update time.\n\n### hasUpdateTime\n\n### clearUpdateTime\n\n### setUpdateTime\n\nOutput only. Update time.\n\n### getEtag\n\nOptional. Entity tag which users can pass to prevent race conditions. This\nfield is always set in server responses. See UpdateTagValueRequest for\ndetails.\n\n### setEtag\n\nOptional. Entity tag which users can pass to prevent race conditions. This\nfield is always set in server responses. See UpdateTagValueRequest for\ndetails."]]