Class: Google::Apis::ComputeAlpha::DistributionPolicy

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ DistributionPolicy

Returns a new instance of DistributionPolicy.



13221
13222
13223
# File 'lib/google/apis/compute_alpha/classes.rb', line 13221

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

Instance Attribute Details

#target_shapeString

The distribution shape to which the group converges either proactively or on resize events (depending on the value set inupdatePolicy. instanceRedistributionType). Corresponds to the JSON property targetShape

Returns:

  • (String)


13208
13209
13210
# File 'lib/google/apis/compute_alpha/classes.rb', line 13208

def target_shape
  @target_shape
end

#zonesArray<Google::Apis::ComputeAlpha::DistributionPolicyZoneConfiguration>

Zones where the regional managed instance group will create and manage its instances. By default, a regional MIG doesn't automatically select an AI zone to create instances, even if an AI zone is available in the specified region. To create instances in an AI zone in the selected region, you must explicitly specify it in the distribution policy together with the other preferred zones. Corresponds to the JSON property zones



13219
13220
13221
# File 'lib/google/apis/compute_alpha/classes.rb', line 13219

def zones
  @zones
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13226
13227
13228
13229
# File 'lib/google/apis/compute_alpha/classes.rb', line 13226

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