Reference documentation and code samples for the Google Cloud Resource Manager V3 Client class EffectiveTag.
An EffectiveTag represents a tag that applies to a resource during policy
evaluation. Tags can be either directly bound to a resource or inherited from
its ancestor. EffectiveTag contains the name and
namespaced_name of the tag value and tag key, with additional fields ofinheritedto indicate the inheritance status of the effective tag.
Generated from protobuf messagegoogle.cloud.resourcemanager.v3.EffectiveTag
Namespace
Google \ Cloud \ ResourceManager \ V3
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ tag_value
string
Resource name for TagValue in the formattagValues/456.
↳ namespaced_tag_value
string
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}.
↳ tag_key
string
The name of the TagKey, in the formattagKeys/{id}, such astagKeys/123.
↳ namespaced_tag_key
string
The namespaced name of the TagKey. Can be in the form{organization_id}/{tag_key_short_name}or{project_id}/{tag_key_short_name}or{project_number}/{tag_key_short_name}.
↳ tag_key_parent_name
string
The parent name of the tag key. Must be in the formatorganizations/{organization_id}orprojects/{project_number}
↳ inherited
bool
Indicates the inheritance status of a tag value attached to the given resource. If the tag value is inherited from one of the resource's ancestors, inherited will be true. If false, then the tag value is directly attached to the resource, inherited will be false.
getTagValue
Resource name for TagValue in the formattagValues/456.
Returns
Type
Description
string
setTagValue
Resource name for TagValue in the formattagValues/456.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNamespacedTagValue
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
setNamespacedTagValue
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
getTagKey
The name of the TagKey, in the formattagKeys/{id}, such astagKeys/123.
Returns
Type
Description
string
setTagKey
The name of the TagKey, in the formattagKeys/{id}, such astagKeys/123.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getNamespacedTagKey
The namespaced name of the TagKey. Can be in the form{organization_id}/{tag_key_short_name}or{project_id}/{tag_key_short_name}or{project_number}/{tag_key_short_name}.
Returns
Type
Description
string
setNamespacedTagKey
The namespaced name of the TagKey. Can be in the form{organization_id}/{tag_key_short_name}or{project_id}/{tag_key_short_name}or{project_number}/{tag_key_short_name}.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getTagKeyParentName
The parent name of the tag key.
Must be in the formatorganizations/{organization_id}orprojects/{project_number}
Returns
Type
Description
string
setTagKeyParentName
The parent name of the tag key.
Must be in the formatorganizations/{organization_id}orprojects/{project_number}
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getInherited
Indicates the inheritance status of a tag value
attached to the given resource. If the tag value is inherited from one of
the resource's ancestors, inherited will be true. If false, then the tag
value is directly attached to the resource, inherited will be false.
Returns
Type
Description
bool
setInherited
Indicates the inheritance status of a tag value
attached to the given resource. If the tag value is inherited from one of
the resource's ancestors, inherited will be true. If false, then the tag
value is directly attached to the resource, inherited will be false.
[[["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 EffectiveTag (1.0.4)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.4 (latest)](/php/docs/reference/cloud-resource-manager/latest/V3.EffectiveTag)\n- [1.0.3](/php/docs/reference/cloud-resource-manager/1.0.3/V3.EffectiveTag)\n- [0.8.5](/php/docs/reference/cloud-resource-manager/0.8.5/V3.EffectiveTag)\n- [0.7.2](/php/docs/reference/cloud-resource-manager/0.7.2/V3.EffectiveTag)\n- [0.6.1](/php/docs/reference/cloud-resource-manager/0.6.1/V3.EffectiveTag)\n- [0.5.0](/php/docs/reference/cloud-resource-manager/0.5.0/V3.EffectiveTag)\n- [0.4.1](/php/docs/reference/cloud-resource-manager/0.4.1/V3.EffectiveTag)\n- [0.3.9](/php/docs/reference/cloud-resource-manager/0.3.9/V3.EffectiveTag) \nReference documentation and code samples for the Google Cloud Resource Manager V3 Client class EffectiveTag.\n\nAn EffectiveTag represents a tag that applies to a resource during policy\nevaluation. Tags can be either directly bound to a resource or inherited from\nits ancestor. EffectiveTag contains the name and\nnamespaced_name of the tag value and tag key, with additional fields of\n`inherited` to indicate the inheritance status of the effective tag.\n\nGenerated from protobuf message `google.cloud.resourcemanager.v3.EffectiveTag`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ResourceManager \\\\ V3\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getTagValue\n\nResource name for TagValue in the format `tagValues/456`.\n\n### setTagValue\n\nResource name for TagValue in the format `tagValues/456`.\n\n### getNamespacedTagValue\n\nThe 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### setNamespacedTagValue\n\nThe 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### getTagKey\n\nThe name of the TagKey, in the format `tagKeys/{id}`, such as\n`tagKeys/123`.\n\n### setTagKey\n\nThe name of the TagKey, in the format `tagKeys/{id}`, such as\n`tagKeys/123`.\n\n### getNamespacedTagKey\n\nThe namespaced name of the TagKey. Can be in the form\n`{organization_id}/{tag_key_short_name}` or\n`{project_id}/{tag_key_short_name}` or\n`{project_number}/{tag_key_short_name}`.\n\n### setNamespacedTagKey\n\nThe namespaced name of the TagKey. Can be in the form\n`{organization_id}/{tag_key_short_name}` or\n`{project_id}/{tag_key_short_name}` or\n`{project_number}/{tag_key_short_name}`.\n\n### getTagKeyParentName\n\nThe parent name of the tag key.\n\nMust be in the format `organizations/{organization_id}` or\n`projects/{project_number}`\n\n### setTagKeyParentName\n\nThe parent name of the tag key.\n\nMust be in the format `organizations/{organization_id}` or\n`projects/{project_number}`\n\n### getInherited\n\nIndicates the inheritance status of a tag value\nattached to the given resource. If the tag value is inherited from one of\nthe resource's ancestors, inherited will be true. If false, then the tag\nvalue is directly attached to the resource, inherited will be false.\n\n### setInherited\n\nIndicates the inheritance status of a tag value\nattached to the given resource. If the tag value is inherited from one of\nthe resource's ancestors, inherited will be true. If false, then the tag\nvalue is directly attached to the resource, inherited will be false."]]