Class: Google::Apis::ComputeV1::LocationPolicy

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

Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LocationPolicy

Returns a new instance of LocationPolicy.



21925
21926
21927
# File 'lib/google/apis/compute_v1/classes.rb', line 21925

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

Instance Attribute Details

#locationsHash<String,Google::Apis::ComputeV1::LocationPolicyLocation>

Location configurations mapped by location name. Currently only zone names are supported and must be represented as valid internal URLs, such as zones/us- central1-a. Corresponds to the JSON property locations



21918
21919
21920
# File 'lib/google/apis/compute_v1/classes.rb', line 21918

def locations
  @locations
end

#target_shapeString

Strategy for distributing VMs across zones in a region. Corresponds to the JSON property targetShape

Returns:

  • (String)


21923
21924
21925
# File 'lib/google/apis/compute_v1/classes.rb', line 21923

def target_shape
  @target_shape
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



21930
21931
21932
21933
# File 'lib/google/apis/compute_v1/classes.rb', line 21930

def update!(**args)
  @locations = args[:locations] if args.key?(:locations)
  @target_shape = args[:target_shape] if args.key?(:target_shape)
end