Class: Google::Apis::ComputeAlpha::ResourceCommitment
- Inherits:
-
Object
- Object
- Google::Apis::ComputeAlpha::ResourceCommitment
- Defined in:
- generated/google/apis/compute_alpha/classes.rb,
generated/google/apis/compute_alpha/representations.rb,
generated/google/apis/compute_alpha/representations.rb
Overview
Commitment for a particular resource (a Commitment is composed of one or more of these).
Instance Attribute Summary collapse
-
#accelerator_type ⇒ String
Name of the accelerator type resource.
-
#amount ⇒ Fixnum
The amount of the resource purchased (in a type-dependent unit, such as bytes).
-
#type ⇒ String
Type of resource for which this commitment applies.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ResourceCommitment
constructor
A new instance of ResourceCommitment.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ ResourceCommitment
Returns a new instance of ResourceCommitment
22433 22434 22435 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22433 def initialize(**args) update!(**args) end |
Instance Attribute Details
#accelerator_type ⇒ String
Name of the accelerator type resource. Applicable only when the type is
ACCELERATOR.
Corresponds to the JSON property acceleratorType
22417 22418 22419 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22417 def accelerator_type @accelerator_type end |
#amount ⇒ Fixnum
The amount of the resource purchased (in a type-dependent unit, such as bytes).
For vCPUs, this can just be an integer. For memory, this must be provided in
MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every
vCPU.
Corresponds to the JSON property amount
22425 22426 22427 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22425 def amount @amount end |
#type ⇒ String
Type of resource for which this commitment applies. Possible values are VCPU
and MEMORY
Corresponds to the JSON property type
22431 22432 22433 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22431 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
22438 22439 22440 22441 22442 |
# File 'generated/google/apis/compute_alpha/classes.rb', line 22438 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 |