Class: Google::Apis::RunV2::GoogleCloudRunV2ResourceRequirements

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

Overview

ResourceRequirements describes the compute resource requirements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRunV2ResourceRequirements

Returns a new instance of GoogleCloudRunV2ResourceRequirements.



1211
1212
1213
# File 'lib/google/apis/run_v2/classes.rb', line 1211

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

Instance Attribute Details

#cpu_idleBoolean Also known as: cpu_idle?

Determines whether CPU should be throttled or not outside of requests. Corresponds to the JSON property cpuIdle

Returns:

  • (Boolean)


1191
1192
1193
# File 'lib/google/apis/run_v2/classes.rb', line 1191

def cpu_idle
  @cpu_idle
end

#limitsHash<String,String>

Only ´memory´ and 'cpu' are supported. Notes: * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu.

  • For supported 'memory' values and syntax, go to https://cloud.google.com/run/ docs/configuring/memory-limits Corresponds to the JSON property limits

Returns:

  • (Hash<String,String>)


1201
1202
1203
# File 'lib/google/apis/run_v2/classes.rb', line 1201

def limits
  @limits
end

#startup_cpu_boostBoolean Also known as: startup_cpu_boost?

Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency. Corresponds to the JSON property startupCpuBoost

Returns:

  • (Boolean)


1208
1209
1210
# File 'lib/google/apis/run_v2/classes.rb', line 1208

def startup_cpu_boost
  @startup_cpu_boost
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1216
1217
1218
1219
1220
# File 'lib/google/apis/run_v2/classes.rb', line 1216

def update!(**args)
  @cpu_idle = args[:cpu_idle] if args.key?(:cpu_idle)
  @limits = args[:limits] if args.key?(:limits)
  @startup_cpu_boost = args[:startup_cpu_boost] if args.key?(:startup_cpu_boost)
end