Class: Google::Apis::ComputeV1::Reservation

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

Overview

Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources. (== resource_for $api_version. reservations ==)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Reservation

Returns a new instance of Reservation.



21349
21350
21351
# File 'generated/google/apis/compute_v1/classes.rb', line 21349

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

Instance Attribute Details

#commitmentString

[Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment. Corresponds to the JSON property commitment

Returns:

  • (String)


21284
21285
21286
# File 'generated/google/apis/compute_v1/classes.rb', line 21284

def commitment
  @commitment
end

#creation_timestampString

[Output Only] Creation timestamp in RFC3339 text format. Corresponds to the JSON property creationTimestamp

Returns:

  • (String)


21289
21290
21291
# File 'generated/google/apis/compute_v1/classes.rb', line 21289

def creation_timestamp
  @creation_timestamp
end

#descriptionString

An optional description of this resource. Provide this property when you create the resource. Corresponds to the JSON property description

Returns:

  • (String)


21295
21296
21297
# File 'generated/google/apis/compute_v1/classes.rb', line 21295

def description
  @description
end

#idFixnum

[Output Only] The unique identifier for the resource. This identifier is defined by the server. Corresponds to the JSON property id

Returns:

  • (Fixnum)


21301
21302
21303
# File 'generated/google/apis/compute_v1/classes.rb', line 21301

def id
  @id
end

#kindString

[Output Only] Type of the resource. Always compute#reservations for reservations. Corresponds to the JSON property kind

Returns:

  • (String)


21307
21308
21309
# File 'generated/google/apis/compute_v1/classes.rb', line 21307

def kind
  @kind
end

#nameString

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. Corresponds to the JSON property name

Returns:

  • (String)


21318
21319
21320
# File 'generated/google/apis/compute_v1/classes.rb', line 21318

def name
  @name
end

[Output Only] Server-defined fully-qualified URL for this resource. Corresponds to the JSON property selfLink

Returns:

  • (String)


21323
21324
21325
# File 'generated/google/apis/compute_v1/classes.rb', line 21323

def self_link
  @self_link
end

#specific_reservationGoogle::Apis::ComputeV1::AllocationSpecificSkuReservation

This reservation type allows to pre allocate specific instance configuration. Corresponds to the JSON property specificReservation



21328
21329
21330
# File 'generated/google/apis/compute_v1/classes.rb', line 21328

def specific_reservation
  @specific_reservation
end

#specific_reservation_requiredBoolean Also known as: specific_reservation_required?

Indicates whether the reservation can be consumed by VMs with affinity for " any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation. Corresponds to the JSON property specificReservationRequired

Returns:

  • (Boolean)


21335
21336
21337
# File 'generated/google/apis/compute_v1/classes.rb', line 21335

def specific_reservation_required
  @specific_reservation_required
end

#statusString

[Output Only] The status of the reservation. Corresponds to the JSON property status

Returns:

  • (String)


21341
21342
21343
# File 'generated/google/apis/compute_v1/classes.rb', line 21341

def status
  @status
end

#zoneString

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment. Corresponds to the JSON property zone

Returns:

  • (String)


21347
21348
21349
# File 'generated/google/apis/compute_v1/classes.rb', line 21347

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
# File 'generated/google/apis/compute_v1/classes.rb', line 21354

def update!(**args)
  @commitment = args[:commitment] if args.key?(:commitment)
  @creation_timestamp = args[:creation_timestamp] if args.key?(:creation_timestamp)
  @description = args[:description] if args.key?(:description)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @self_link = args[:self_link] if args.key?(:self_link)
  @specific_reservation = args[:specific_reservation] if args.key?(:specific_reservation)
  @specific_reservation_required = args[:specific_reservation_required] if args.key?(:specific_reservation_required)
  @status = args[:status] if args.key?(:status)
  @zone = args[:zone] if args.key?(:zone)
end