Class: Azure::Compute::Mgmt::V2017_03_30::Models::UpgradePolicy

Inherits:
Object
  • Object
show all
Includes:
MsRestAzure
Defined in:
lib/2017-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb

Overview

Describes an upgrade policy - automatic, manual, or rolling.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#automatic_osupgradeBoolean

to scale set instances in a rolling fashion when a newer version of the image becomes available.

Returns:

  • (Boolean)

    Whether OS upgrades should automatically be applied



31
32
33
# File 'lib/2017-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb', line 31

def automatic_osupgrade
  @automatic_osupgrade
end

#modeUpgradeMode

machines in the scale set.<br /><br /> Possible values are:<br /><br /> Manual - You control the application of updates to virtual machines in the scale set. You do this by using the manualUpgrade action.<br /><br /> Automatic - All virtual machines in the scale set are automatically updated at the same time. Possible values include: ‘Automatic’, ‘Manual’, ‘Rolling’

Returns:

  • (UpgradeMode)

    Specifies the mode of an upgrade to virtual



22
23
24
# File 'lib/2017-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb', line 22

def mode
  @mode
end

#rolling_upgrade_policyRollingUpgradePolicy

performing a rolling upgrade.

Returns:



26
27
28
# File 'lib/2017-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb', line 26

def rolling_upgrade_policy
  @rolling_upgrade_policy
end

Class Method Details

.mapperObject

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



38
39
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
69
70
71
72
# File 'lib/2017-03-30/generated/azure_mgmt_compute/models/upgrade_policy.rb', line 38

def self.mapper()
  {
    required: false,
    serialized_name: 'UpgradePolicy',
    type: {
      name: 'Composite',
      class_name: 'UpgradePolicy',
      model_properties: {
        mode: {
          required: false,
          serialized_name: 'mode',
          type: {
            name: 'Enum',
            module: 'UpgradeMode'
          }
        },
        rolling_upgrade_policy: {
          required: false,
          serialized_name: 'rollingUpgradePolicy',
          type: {
            name: 'Composite',
            class_name: 'RollingUpgradePolicy'
          }
        },
        automatic_osupgrade: {
          required: false,
          serialized_name: 'automaticOSUpgrade',
          type: {
            name: 'Boolean'
          }
        }
      }
    }
  }
end