Class: Google::Apis::RunV1::ResourceRequirements

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

Overview

ResourceRequirements describes the compute resource requirements.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ResourceRequirements

Returns a new instance of ResourceRequirements.



2322
2323
2324
# File 'generated/google/apis/run_v1/classes.rb', line 2322

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

Instance Attribute Details

#limitsHash<String,String>

(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'. Cloud Run for Anthos: supported Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/ apimachinery/pkg/api/resource/quantity.go Corresponds to the JSON property limits

Returns:

  • (Hash<String,String>)


2306
2307
2308
# File 'generated/google/apis/run_v1/classes.rb', line 2306

def limits
  @limits
end

#requestsHash<String,String>

(Optional) Cloud Run fully managed: Only memory and CPU are supported. Note: The only supported value for CPU is '1'. Cloud Run for Anthos: supported Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/ apimachinery/pkg/api/resource/quantity.go Corresponds to the JSON property requests

Returns:

  • (Hash<String,String>)


2320
2321
2322
# File 'generated/google/apis/run_v1/classes.rb', line 2320

def requests
  @requests
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2327
2328
2329
2330
# File 'generated/google/apis/run_v1/classes.rb', line 2327

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