Class: Google::Apis::ComputeV1::ResourceCommitment

Inherits:
Object
  • Object
show all
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 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.



43576
43577
43578
# File 'lib/google/apis/compute_v1/classes.rb', line 43576

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)


43547
43548
43549
# File 'lib/google/apis/compute_v1/classes.rb', line 43547

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)


43561
43562
43563
# File 'lib/google/apis/compute_v1/classes.rb', line 43561

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)


43574
43575
43576
# File 'lib/google/apis/compute_v1/classes.rb', line 43574

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



43581
43582
43583
43584
43585
# File 'lib/google/apis/compute_v1/classes.rb', line 43581

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