Class: Google::Apis::ComputeV1::ResourceCommitment
- Inherits:
-
Object
- Object
- Google::Apis::ComputeV1::ResourceCommitment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_v1/classes.rb,
lib/google/apis/compute_v1/representations.rb,
lib/google/apis/compute_v1/representations.rb
Overview
Commitment for a particular hardware resource (a commitment is composed of one or more of these).
Instance Attribute Summary collapse
-
#accelerator_type ⇒ String
Name of the accelerator type or GPU resource.
-
#amount ⇒ Fixnum
The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit).
-
#type ⇒ String
The type of hardware resource that you want to specify.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ResourceCommitment
constructor
A new instance of ResourceCommitment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ResourceCommitment
Returns a new instance of ResourceCommitment.
44749 44750 44751 |
# File 'lib/google/apis/compute_v1/classes.rb', line 44749 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator_type ⇒ String
Name of the accelerator type or GPU resource. Specify this field only when
the type of hardware resource is ACCELERATOR.
Corresponds to the JSON property acceleratorType
44720 44721 44722 |
# File 'lib/google/apis/compute_v1/classes.rb', line 44720 def accelerator_type @accelerator_type end |
#amount ⇒ Fixnum
The quantity of the hardware resource that you want to commit to purchasing (in a type-dependent unit).
- For vCPUs, you must specify an integer value.
- For memory, you specify the amount of MB that you want. The value you specify must be a multiple of 256 MB, with up to 6.5 GB of memory per every vCPU.
- For GPUs, you must specify an integer value.
- For Local SSD disks, you must specify the amount in GB. The size of a
single Local SSD disk is 375 GB.
Corresponds to the JSON property
amount
44734 44735 44736 |
# File 'lib/google/apis/compute_v1/classes.rb', line 44734 def amount @amount end |
#type ⇒ String
The type of hardware resource that you want to specify. You can specify any of the following values:
- VCPU
- MEMORY
- LOCAL_SSD
- ACCELERATOR
Specify as a separate entry in the list for each
individual resource type.
Corresponds to the JSON property
type
44747 44748 44749 |
# File 'lib/google/apis/compute_v1/classes.rb', line 44747 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
44754 44755 44756 44757 44758 |
# File 'lib/google/apis/compute_v1/classes.rb', line 44754 def update!(**args) @accelerator_type = args[:accelerator_type] if args.key?(:accelerator_type) @amount = args[:amount] if args.key?(:amount) @type = args[:type] if args.key?(:type) end |