Class: Google::Apis::ComputeBeta::LocationPolicy
- Inherits:
-
Object
- Object
- Google::Apis::ComputeBeta::LocationPolicy
- 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
Configuration for location policy among multiple possible locations (e.g. preferences for zone selection among zones in a single region).
Instance Attribute Summary collapse
-
#locations ⇒ Hash<String,Google::Apis::ComputeBeta::LocationPolicyLocation>
Location configurations mapped by location name.
-
#target_shape ⇒ String
Strategy for distributing VMs across zones in a region.
-
#zones ⇒ Array<Google::Apis::ComputeBeta::LocationPolicyZoneConfiguration>
The bulkInsert operation applies any preferences set in the locations field to the specific zones listed in the zones field if the same zones are specified in both fields.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LocationPolicy
constructor
A new instance of LocationPolicy.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LocationPolicy
Returns a new instance of LocationPolicy.
36007 36008 36009 |
# File 'lib/google/apis/compute_beta/classes.rb', line 36007 def initialize(**args) update!(**args) end |
Instance Attribute Details
#locations ⇒ Hash<String,Google::Apis::ComputeBeta::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.
The bulkInsert operation doesn't create instances in an AI zone, even if
an AI zone is available in the specified region. For example, if you set a
DENY preference for us-central1-a, Compute Engine will consider
us-central1-b and us-central1-c for instance creation, but not
us-central1-ai1a. Also, you can't use the locations[] configuration to
allow instance creation in an AI zone. To include an AI zone in bulkInsert
operations, use the locationPolicy.zones[] field.
Corresponds to the JSON property locations
35993 35994 35995 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35993 def locations @locations end |
#target_shape ⇒ String
Strategy for distributing VMs across zones in a region.
Corresponds to the JSON property targetShape
35998 35999 36000 |
# File 'lib/google/apis/compute_beta/classes.rb', line 35998 def target_shape @target_shape end |
#zones ⇒ Array<Google::Apis::ComputeBeta::LocationPolicyZoneConfiguration>
The bulkInsert operation applies any preferences set in the locations
field to the specific zones listed in the zones field if the same zones
are specified in both fields.
Corresponds to the JSON property zones
36005 36006 36007 |
# File 'lib/google/apis/compute_beta/classes.rb', line 36005 def zones @zones end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
36012 36013 36014 36015 36016 |
# File 'lib/google/apis/compute_beta/classes.rb', line 36012 def update!(**args) @locations = args[:locations] if args.key?(:locations) @target_shape = args[:target_shape] if args.key?(:target_shape) @zones = args[:zones] if args.key?(:zones) end |