Class: Google::Apis::CloudresourcemanagerV3::EffectiveTag

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudresourcemanager_v3/classes.rb,
lib/google/apis/cloudresourcemanager_v3/representations.rb,
lib/google/apis/cloudresourcemanager_v3/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ EffectiveTag

Returns a new instance of EffectiveTag.



473
474
475
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 473

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#inheritedBoolean Also known as: inherited?

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. Corresponds to the JSON property inherited

Returns:

  • (Boolean)


446
447
448
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 446

def inherited
  @inherited
end

#namespaced_tag_keyString

The namespaced_name of the TagKey. Now only supported in the format of organization_id`/`tag_key_short_name. Other formats will be supported when we add non-org parented tags. Corresponds to the JSON property namespacedTagKey

Returns:

  • (String)


454
455
456
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 454

def namespaced_tag_key
  @namespaced_tag_key
end

#namespaced_tag_valueString

Namespaced name of the TagValue. Now only supported in the format organization_id`/`tag_key_short_name`/`tag_value_short_name. Other formats will be supported when we add non-org parented tags. Corresponds to the JSON property namespacedTagValue

Returns:

  • (String)


461
462
463
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 461

def namespaced_tag_value
  @namespaced_tag_value
end

#tag_keyString

The name of the TagKey, in the format tagKeys/id`, such astagKeys/123. Corresponds to the JSON propertytagKey`

Returns:

  • (String)


466
467
468
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 466

def tag_key
  @tag_key
end

#tag_valueString

Resource name for TagValue in the format tagValues/456. Corresponds to the JSON property tagValue

Returns:

  • (String)


471
472
473
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 471

def tag_value
  @tag_value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



478
479
480
481
482
483
484
# File 'lib/google/apis/cloudresourcemanager_v3/classes.rb', line 478

def update!(**args)
  @inherited = args[:inherited] if args.key?(:inherited)
  @namespaced_tag_key = args[:namespaced_tag_key] if args.key?(:namespaced_tag_key)
  @namespaced_tag_value = args[:namespaced_tag_value] if args.key?(:namespaced_tag_value)
  @tag_key = args[:tag_key] if args.key?(:tag_key)
  @tag_value = args[:tag_value] if args.key?(:tag_value)
end