Class: Google::Apis::DatabasecenterV1beta::Tag
- Inherits:
-
Object
- Object
- Google::Apis::DatabasecenterV1beta::Tag
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/databasecenter_v1beta/classes.rb,
lib/google/apis/databasecenter_v1beta/representations.rb,
lib/google/apis/databasecenter_v1beta/representations.rb
Overview
Tag is a key value pair attached to a resource.
Instance Attribute Summary collapse
-
#inherited ⇒ Boolean
(also: #inherited?)
Indicates the inheritance status of a tag value attached to the given resource.
-
#key ⇒ String
Corresponds to the JSON property
key. -
#source ⇒ String
The source of the tag.
-
#value ⇒ String
The value part of the tag.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Tag
constructor
A new instance of Tag.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Tag
Returns a new instance of Tag.
2456 2457 2458 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2456 def initialize(**args) update!(**args) end |
Instance Attribute Details
#inherited ⇒ Boolean 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.
Corresponds to the JSON property inherited
2433 2434 2435 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2433 def inherited @inherited end |
#key ⇒ String
Corresponds to the JSON property key
2439 2440 2441 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2439 def key @key end |
#source ⇒ String
The source of the tag. According to https://cloud.google.com/resource-manager/
docs/tags/tags-overview#tags_and_labels, tags can be created only at the
project or organization level. Tags can be inherited from different project as
well not just the current project where the database resource is present.
Format: "projects/PROJECT_ID", "projects/PROJECT_NUMBER", "organizations/
ORGANIZATION_ID"
Corresponds to the JSON property source
2449 2450 2451 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2449 def source @source end |
#value ⇒ String
The value part of the tag.
Corresponds to the JSON property value
2454 2455 2456 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2454 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2461 2462 2463 2464 2465 2466 |
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 2461 def update!(**args) @inherited = args[:inherited] if args.key?(:inherited) @key = args[:key] if args.key?(:key) @source = args[:source] if args.key?(:source) @value = args[:value] if args.key?(:value) end |