Class: Google::Apis::ClouddeployV1::TargetAttribute

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

Overview

Contains criteria for selecting Targets. Attributes provided must match the target resource in order for policy restrictions to apply. E.g. if id "prod" and labels "foo: bar" are given the target resource must match both that id and have that label in order to be selected.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TargetAttribute

Returns a new instance of TargetAttribute.



4713
4714
4715
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 4713

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

Instance Attribute Details

#idString

ID of the Target. The value of this field could be one of the following: * The last segment of a target name. It only needs the ID to determine which target is being referred to * "*", all targets in a location. Corresponds to the JSON property id

Returns:

  • (String)


4706
4707
4708
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 4706

def id
  @id
end

#labelsHash<String,String>

Target labels. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


4711
4712
4713
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 4711

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4718
4719
4720
4721
# File 'lib/google/apis/clouddeploy_v1/classes.rb', line 4718

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @labels = args[:labels] if args.key?(:labels)
end