Class: Google::Apis::ComputeAlpha::ResourceCommitment
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::ResourceCommitment
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/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.
58765 58766 58767 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 58765 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
58736 58737 58738 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 58736 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
58750 58751 58752 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 58750 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
58763 58764 58765 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 58763 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
58770 58771 58772 58773 58774 |
# File 'lib/google/apis/compute_alpha/classes.rb', line 58770 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 |