Class: Google::Apis::ComputeAlpha::Allocation

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

Overview

Allocation resource

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) ⇒ Allocation

Returns a new instance of Allocation



1118
1119
1120
# File 'generated/google/apis/compute_alpha/classes.rb', line 1118

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

Instance Attribute Details

#commitmentString

Full or partial url for commitment in which this allocation is to be created. This field is ignored when allocations are created during committment creation. Corresponds to the JSON property commitment

Returns:

  • (String)


1061
1062
1063
# File 'generated/google/apis/compute_alpha/classes.rb', line 1061

def commitment
  @commitment
end

#creation_timestampString

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

Returns:

  • (String)


1066
1067
1068
# File 'generated/google/apis/compute_alpha/classes.rb', line 1066

def creation_timestamp
  @creation_timestamp
end

#descriptionString

Corresponds to the JSON property description

Returns:

  • (String)


1071
1072
1073
# File 'generated/google/apis/compute_alpha/classes.rb', line 1071

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)


1077
1078
1079
# File 'generated/google/apis/compute_alpha/classes.rb', line 1077

def id
  @id
end

#kindString

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

Returns:

  • (String)


1082
1083
1084
# File 'generated/google/apis/compute_alpha/classes.rb', line 1082

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)


1093
1094
1095
# File 'generated/google/apis/compute_alpha/classes.rb', line 1093

def name
  @name
end

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

Returns:

  • (String)


1098
1099
1100
# File 'generated/google/apis/compute_alpha/classes.rb', line 1098

def self_link
  @self_link
end

#specific_allocationGoogle::Apis::ComputeAlpha::AllocationSpecificSkuAllocation

This allocation type allows to pre allocate specific instance configuration. Corresponds to the JSON property specificAllocation



1103
1104
1105
# File 'generated/google/apis/compute_alpha/classes.rb', line 1103

def specific_allocation
  @specific_allocation
end

#specific_allocation_requiredBoolean Also known as: specific_allocation_required?

Indicates whether the allocation can be consumed by VMs with ?any allocation? defined. If the field is set, then only VMs that target the allocation by name using --allocation-affinity can consume this allocation. Corresponds to the JSON property specificAllocationRequired

Returns:

  • (Boolean)


1110
1111
1112
# File 'generated/google/apis/compute_alpha/classes.rb', line 1110

def specific_allocation_required
  @specific_allocation_required
end

#zoneString

Corresponds to the JSON property zone

Returns:

  • (String)


1116
1117
1118
# File 'generated/google/apis/compute_alpha/classes.rb', line 1116

def zone
  @zone
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
# File 'generated/google/apis/compute_alpha/classes.rb', line 1123

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_allocation = args[:specific_allocation] if args.key?(:specific_allocation)
  @specific_allocation_required = args[:specific_allocation_required] if args.key?(:specific_allocation_required)
  @zone = args[:zone] if args.key?(:zone)
end