Class: Google::Apis::ComputeBeta::ResourceCommitment

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

Overview

Commitment for a particular resource (a Commitment is composed of one or more of these).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ResourceCommitment

Returns a new instance of ResourceCommitment.



26417
26418
26419
# File 'generated/google/apis/compute_beta/classes.rb', line 26417

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

Instance Attribute Details

#accelerator_typeString

Name of the accelerator type resource. Applicable only when the type is ACCELERATOR. Corresponds to the JSON property acceleratorType

Returns:

  • (String)


26401
26402
26403
# File 'generated/google/apis/compute_beta/classes.rb', line 26401

def accelerator_type
  @accelerator_type
end

#amountFixnum

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

Returns:

  • (Fixnum)


26409
26410
26411
# File 'generated/google/apis/compute_beta/classes.rb', line 26409

def amount
  @amount
end

#typeString

Type of resource for which this commitment applies. Possible values are VCPU and MEMORY Corresponds to the JSON property type

Returns:

  • (String)


26415
26416
26417
# File 'generated/google/apis/compute_beta/classes.rb', line 26415

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



26422
26423
26424
26425
26426
# File 'generated/google/apis/compute_beta/classes.rb', line 26422

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