Class: Google::Apis::ContainerV1::SetLabelsRequest

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

Overview

SetLabelsRequest sets the Google Cloud Platform labels on a Google Container Engine cluster, which will in turn set them for Google Compute Engine resources used by that cluster

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ SetLabelsRequest

Returns a new instance of SetLabelsRequest



983
984
985
# File 'generated/google/apis/container_v1/classes.rb', line 983

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 Container 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. Make a get() request to the resource to get the latest fingerprint. Corresponds to the JSON property labelFingerprint

Returns:

  • (String)


981
982
983
# File 'generated/google/apis/container_v1/classes.rb', line 981

def label_fingerprint
  @label_fingerprint
end

#resource_labelsHash<String,String>

The labels to set for that cluster. Corresponds to the JSON property resourceLabels

Returns:

  • (Hash<String,String>)


971
972
973
# File 'generated/google/apis/container_v1/classes.rb', line 971

def resource_labels
  @resource_labels
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



988
989
990
991
# File 'generated/google/apis/container_v1/classes.rb', line 988

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