Class: Google::Apis::ComputeBeta::AllocationSpecificSkuReservation

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

This reservation type allows to pre allocate specific instance configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AllocationSpecificSkuReservation

Returns a new instance of AllocationSpecificSkuReservation.



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

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

Instance Attribute Details

#assured_countFixnum

[Output Only] Indicates how many instances are actually usable currently. Corresponds to the JSON property assuredCount

Returns:

  • (Fixnum)


1430
1431
1432
# File 'lib/google/apis/compute_beta/classes.rb', line 1430

def assured_count
  @assured_count
end

#countFixnum

Specifies the number of resources that are allocated. Corresponds to the JSON property count

Returns:

  • (Fixnum)


1435
1436
1437
# File 'lib/google/apis/compute_beta/classes.rb', line 1435

def count
  @count
end

#in_use_countFixnum

[Output Only] Indicates how many instances are in use. Corresponds to the JSON property inUseCount

Returns:

  • (Fixnum)


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

def in_use_count
  @in_use_count
end

#instance_propertiesGoogle::Apis::ComputeBeta::AllocationSpecificSkuAllocationReservedInstanceProperties

Properties of the SKU instances being reserved. Next ID: 9 Corresponds to the JSON property instanceProperties



1445
1446
1447
# File 'lib/google/apis/compute_beta/classes.rb', line 1445

def instance_properties
  @instance_properties
end

#source_instance_templateString

Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field. This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template: - https://www.googleapis.com/compute/v1/projects/ project /global/instanceTemplates/instanceTemplate - projects/project/global/ instanceTemplates/instanceTemplate - global/instanceTemplates/instanceTemplate Corresponds to the JSON property sourceInstanceTemplate

Returns:

  • (String)


1455
1456
1457
# File 'lib/google/apis/compute_beta/classes.rb', line 1455

def source_instance_template
  @source_instance_template
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1462
1463
1464
1465
1466
1467
1468
# File 'lib/google/apis/compute_beta/classes.rb', line 1462

def update!(**args)
  @assured_count = args[:assured_count] if args.key?(:assured_count)
  @count = args[:count] if args.key?(:count)
  @in_use_count = args[:in_use_count] if args.key?(:in_use_count)
  @instance_properties = args[:instance_properties] if args.key?(:instance_properties)
  @source_instance_template = args[:source_instance_template] if args.key?(:source_instance_template)
end