Class: Google::Apis::ContainerV1::ResourceLimit

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

Overview

Contains information about amount of some resource in the cluster. For memory, value should be in GB.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceLimit

Returns a new instance of ResourceLimit.



5241
5242
5243
# File 'lib/google/apis/container_v1/classes.rb', line 5241

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

Instance Attribute Details

#maximumFixnum

Maximum amount of the resource in the cluster. Corresponds to the JSON property maximum

Returns:

  • (Fixnum)


5229
5230
5231
# File 'lib/google/apis/container_v1/classes.rb', line 5229

def maximum
  @maximum
end

#minimumFixnum

Minimum amount of the resource in the cluster. Corresponds to the JSON property minimum

Returns:

  • (Fixnum)


5234
5235
5236
# File 'lib/google/apis/container_v1/classes.rb', line 5234

def minimum
  @minimum
end

#resource_typeString

Resource name "cpu", "memory" or gpu-specific string. Corresponds to the JSON property resourceType

Returns:

  • (String)


5239
5240
5241
# File 'lib/google/apis/container_v1/classes.rb', line 5239

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5246
5247
5248
5249
5250
# File 'lib/google/apis/container_v1/classes.rb', line 5246

def update!(**args)
  @maximum = args[:maximum] if args.key?(:maximum)
  @minimum = args[:minimum] if args.key?(:minimum)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
end