Class: Google::Apis::ComputeAlpha::GlobalSetLabelsRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GlobalSetLabelsRequest

Returns a new instance of GlobalSetLabelsRequest.



12163
12164
12165
# File 'lib/google/apis/compute_alpha/classes.rb', line 12163

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

Instance Attribute Details

#label_fingerprintString

The fingerprint of the previous set of labels for this resource, used to detect conflicts. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash when updating or changing labels, otherwise the request will fail with error 412 conditionNotMet. Make a get() request to the resource to get the latest fingerprint. Corresponds to the JSON property labelFingerprint NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


12154
12155
12156
# File 'lib/google/apis/compute_alpha/classes.rb', line 12154

def label_fingerprint
  @label_fingerprint
end

#labelsHash<String,String>

A list of labels to apply for this resource. Each label must comply with the requirements for labels. For example, "webserver-frontend": "images". A label value can also be empty (e.g. "my-label": ""). Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


12161
12162
12163
# File 'lib/google/apis/compute_alpha/classes.rb', line 12161

def labels
  @labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



12168
12169
12170
12171
# File 'lib/google/apis/compute_alpha/classes.rb', line 12168

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