Class: Google::Apis::ComputeAlpha::AllocationAggregateReservation

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

This reservation type is specified by total resource amounts (e.g. total count of CPUs) and can account for multiple instance SKUs. In other words, one can create instances of varying shapes against this reservation.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AllocationAggregateReservation

Returns a new instance of AllocationAggregateReservation.



1475
1476
1477
# File 'lib/google/apis/compute_alpha/classes.rb', line 1475

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

Instance Attribute Details

#host_countFixnum

Count of reserved hosts of specified VM family. The host has fixed number of accelerators based on the accelerator/vm-family selected. Corresponds to the JSON property hostCount

Returns:

  • (Fixnum)


1440
1441
1442
# File 'lib/google/apis/compute_alpha/classes.rb', line 1440

def host_count
  @host_count
end

#in_use_host_countFixnum

Output only. Number of hosts currently in use. If there is one or more Instances running on the host, it is considered in use. Corresponds to the JSON property inUseHostCount

Returns:

  • (Fixnum)


1447
1448
1449
# File 'lib/google/apis/compute_alpha/classes.rb', line 1447

def in_use_host_count
  @in_use_host_count
end

#in_use_instance_countFixnum

Output only. Number of instances currently in use in this reservation. Corresponds to the JSON property inUseInstanceCount

Returns:

  • (Fixnum)


1452
1453
1454
# File 'lib/google/apis/compute_alpha/classes.rb', line 1452

def in_use_instance_count
  @in_use_instance_count
end

#in_use_resourcesArray<Google::Apis::ComputeAlpha::AllocationAggregateReservationReservedResourceInfo>

Output only. [Output only] List of resources currently in use. Corresponds to the JSON property inUseResources



1457
1458
1459
# File 'lib/google/apis/compute_alpha/classes.rb', line 1457

def in_use_resources
  @in_use_resources
end

#reserved_resourcesArray<Google::Apis::ComputeAlpha::AllocationAggregateReservationReservedResourceInfo>

List of reserved resources (CPUs, memory, accelerators). Corresponds to the JSON property reservedResources



1462
1463
1464
# File 'lib/google/apis/compute_alpha/classes.rb', line 1462

def reserved_resources
  @reserved_resources
end

#vm_familyString

The VM family that all instances scheduled against this reservation must belong to. Corresponds to the JSON property vmFamily

Returns:

  • (String)


1468
1469
1470
# File 'lib/google/apis/compute_alpha/classes.rb', line 1468

def vm_family
  @vm_family
end

#workload_typeString

The workload type of the instances that will target this reservation. Corresponds to the JSON property workloadType

Returns:

  • (String)


1473
1474
1475
# File 'lib/google/apis/compute_alpha/classes.rb', line 1473

def workload_type
  @workload_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1480
1481
1482
1483
1484
1485
1486
1487
1488
# File 'lib/google/apis/compute_alpha/classes.rb', line 1480

def update!(**args)
  @host_count = args[:host_count] if args.key?(:host_count)
  @in_use_host_count = args[:in_use_host_count] if args.key?(:in_use_host_count)
  @in_use_instance_count = args[:in_use_instance_count] if args.key?(:in_use_instance_count)
  @in_use_resources = args[:in_use_resources] if args.key?(:in_use_resources)
  @reserved_resources = args[:reserved_resources] if args.key?(:reserved_resources)
  @vm_family = args[:vm_family] if args.key?(:vm_family)
  @workload_type = args[:workload_type] if args.key?(:workload_type)
end