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 of
inherited
to indicate the inheritance status of the effective tag.
Generated from protobuf message google.cloud.resourcemanager.v3.EffectiveTag
Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ tag_value |
string
Resource name for TagValue in the format |
↳ namespaced_tag_value |
string
The namespaced name of the TagValue. Can be in the form |
↳ tag_key |
string
The name of the TagKey, in the format |
↳ namespaced_tag_key |
string
The namespaced name of the TagKey. Can be in the form |
↳ tag_key_parent_name |
string
The parent name of the tag key. Must be in the format |
↳ 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 format tagValues/456
.
Returns | |
---|---|
Type | Description |
string |
setTagValue
Resource name for TagValue in the format tagValues/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 format tagKeys/{id}
, such as
tagKeys/123
.
Returns | |
---|---|
Type | Description |
string |
setTagKey
The name of the TagKey, in the format tagKeys/{id}
, such as
tagKeys/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 format organizations/{organization_id}
or
projects/{project_number}
Returns | |
---|---|
Type | Description |
string |
setTagKeyParentName
The parent name of the tag key.
Must be in the format organizations/{organization_id}
or
projects/{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.
Parameter | |
---|---|
Name | Description |
var |
bool
|
Returns | |
---|---|
Type | Description |
$this |