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

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ResourceCommitment

Returns a new instance of ResourceCommitment



14908
14909
14910
# File 'generated/google/apis/compute_beta/classes.rb', line 14908

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

Instance Attribute Details

#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)


14900
14901
14902
# File 'generated/google/apis/compute_beta/classes.rb', line 14900

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)


14906
14907
14908
# File 'generated/google/apis/compute_beta/classes.rb', line 14906

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



14913
14914
14915
14916
# File 'generated/google/apis/compute_beta/classes.rb', line 14913

def update!(**args)
  @amount = args[:amount] if args.key?(:amount)
  @type = args[:type] if args.key?(:type)
end