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 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.
Constructor Details
#initialize(**args) ⇒ ResourceCommitment
Returns a new instance of ResourceCommitment.
31543 31544 31545 |
# File 'lib/google/apis/compute_v1/classes.rb', line 31543 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
31527 31528 31529 |
# File 'lib/google/apis/compute_v1/classes.rb', line 31527 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
31535 31536 31537 |
# File 'lib/google/apis/compute_v1/classes.rb', line 31535 def amount @amount end |
#type ⇒ String
Type of resource for which this commitment applies. Possible values are VCPU,
MEMORY, LOCAL_SSD, and ACCELERATOR.
Corresponds to the JSON property type
31541 31542 31543 |
# File 'lib/google/apis/compute_v1/classes.rb', line 31541 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
31548 31549 31550 31551 31552 |
# File 'lib/google/apis/compute_v1/classes.rb', line 31548 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 |