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

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

Overview

Commitment for a particular hardware 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.



49111
49112
49113
# File 'lib/google/apis/compute_beta/classes.rb', line 49111

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

Instance Attribute Details

#accelerator_typeString

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

Returns:

  • (String)


49082
49083
49084
# File 'lib/google/apis/compute_beta/classes.rb', line 49082

def accelerator_type
  @accelerator_type
end

#amountFixnum

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

Returns:

  • (Fixnum)


49096
49097
49098
# File 'lib/google/apis/compute_beta/classes.rb', line 49096

def amount
  @amount
end

#typeString

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

Returns:

  • (String)


49109
49110
49111
# File 'lib/google/apis/compute_beta/classes.rb', line 49109

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



49116
49117
49118
49119
49120
# File 'lib/google/apis/compute_beta/classes.rb', line 49116

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