Class: Google::Apis::ComputeAlpha::ResourceCommitment

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/compute_alpha/classes.rb,
lib/google/apis/compute_alpha/representations.rb,
lib/google/apis/compute_alpha/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.



51595
51596
51597
# File 'lib/google/apis/compute_alpha/classes.rb', line 51595

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)


51576
51577
51578
# File 'lib/google/apis/compute_alpha/classes.rb', line 51576

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)


51586
51587
51588
# File 'lib/google/apis/compute_alpha/classes.rb', line 51586

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)


51593
51594
51595
# File 'lib/google/apis/compute_alpha/classes.rb', line 51593

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



51600
51601
51602
51603
51604
# File 'lib/google/apis/compute_alpha/classes.rb', line 51600

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