Class: Azure::Compute::Mgmt::V2019_07_01::Models::ScaleInPolicy

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2019-07-01/generated/azure_mgmt_compute/models/scale_in_policy.rb

Overview

Describes a scale-in policy for a virtual machine scale set.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#rulesArray<VirtualMachineScaleSetScaleInRules>

followed when scaling-in a virtual machine scale set.
Possible values are:
*Default* When a virtual machine scale set is scaled in, the scale set will first be balanced across zones if it is a zonal scale set. Then, it will be balanced across Fault Domains as far as possible. Within each Fault Domain, the virtual machines chosen for removal will be the newest ones that are not protected from scale-in.
*OldestVM* When a virtual machine scale set is being scaled-in, the oldest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the oldest virtual machines that are not protected will be chosen for removal.
*NewestVM* When a virtual machine scale set is being scaled-in, the newest virtual machines that are not protected from scale-in will be chosen for removal. For zonal virtual machine scale sets, the scale set will first be balanced across zones. Within each zone, the newest virtual machines that are not protected will be chosen for removal.

Returns:



33
34
35
# File 'lib/2019-07-01/generated/azure_mgmt_compute/models/scale_in_policy.rb', line 33

def rules
  @rules
end

Class Method Details

.mapperObject

Mapper for ScaleInPolicy class as Ruby Hash. This will be used for serialization/deserialization.



40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/2019-07-01/generated/azure_mgmt_compute/models/scale_in_policy.rb', line 40

def self.mapper()
  {
    client_side_validation: true,
    required: false,
    serialized_name: 'ScaleInPolicy',
    type: {
      name: 'Composite',
      class_name: 'ScaleInPolicy',
      model_properties: {
        rules: {
          client_side_validation: true,
          required: false,
          serialized_name: 'rules',
          type: {
            name: 'Sequence',
            element: {
                client_side_validation: true,
                required: false,
                serialized_name: 'VirtualMachineScaleSetScaleInRulesElementType',
                type: {
                  name: 'String'
                }
            }
          }
        }
      }
    }
  }
end