-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
UpgradePolicy.cs
99 lines (91 loc) · 4.16 KB
/
UpgradePolicy.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.Batch.Protocol.Models
{
using Newtonsoft.Json;
using System.Linq;
/// <summary>
/// Describes an upgrade policy - automatic, manual, or rolling.
/// </summary>
public partial class UpgradePolicy
{
/// <summary>
/// Initializes a new instance of the UpgradePolicy class.
/// </summary>
public UpgradePolicy()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the UpgradePolicy class.
/// </summary>
/// <param name="mode">Specifies the mode of an upgrade to virtual
/// 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.<br /><br />
/// **Rolling** - Scale set performs updates in batches with an
/// optional pause time in between.</param>
/// <param name="automaticOSUpgradePolicy">Configuration parameters
/// used for performing automatic OS Upgrade.</param>
/// <param name="rollingUpgradePolicy">The configuration parameters
/// used while performing a rolling upgrade.</param>
public UpgradePolicy(UpgradeMode mode, AutomaticOSUpgradePolicy automaticOSUpgradePolicy = default(AutomaticOSUpgradePolicy), RollingUpgradePolicy rollingUpgradePolicy = default(RollingUpgradePolicy))
{
Mode = mode;
AutomaticOSUpgradePolicy = automaticOSUpgradePolicy;
RollingUpgradePolicy = rollingUpgradePolicy;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets specifies the mode of an upgrade to virtual machines
/// in the scale set.&lt;br /&gt;&lt;br /&gt; Possible
/// values are:&lt;br /&gt;&lt;br /&gt; **Manual** -
/// You control the application of updates to virtual machines in the
/// scale set. You do this by using the manualUpgrade action.&lt;br
/// /&gt;&lt;br /&gt; **Automatic** - All virtual machines
/// in the scale set are automatically updated at the same
/// time.&lt;br /&gt;&lt;br /&gt; **Rolling** - Scale
/// set performs updates in batches with an optional pause time in
/// between.
/// </summary>
/// <remarks>
/// Possible values include: 'automatic', 'manual', 'rolling'
/// </remarks>
[JsonProperty(PropertyName = "mode")]
public UpgradeMode Mode { get; set; }
/// <summary>
/// Gets or sets configuration parameters used for performing automatic
/// OS Upgrade.
/// </summary>
/// <remarks>
/// The configuration parameters used for performing automatic OS
/// upgrade.
/// </remarks>
[JsonProperty(PropertyName = "automaticOSUpgradePolicy")]
public AutomaticOSUpgradePolicy AutomaticOSUpgradePolicy { get; set; }
/// <summary>
/// Gets or sets the configuration parameters used while performing a
/// rolling upgrade.
/// </summary>
/// <remarks>
/// This property is only supported on Pools with the
/// virtualMachineConfiguration property.
/// </remarks>
[JsonProperty(PropertyName = "rollingUpgradePolicy")]
public RollingUpgradePolicy RollingUpgradePolicy { get; set; }
}
}