-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
AutomaticOSUpgradePolicy.cs
95 lines (86 loc) · 4.22 KB
/
AutomaticOSUpgradePolicy.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
// <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>
/// The configuration parameters used for performing automatic OS upgrade.
/// </summary>
public partial class AutomaticOSUpgradePolicy
{
/// <summary>
/// Initializes a new instance of the AutomaticOSUpgradePolicy class.
/// </summary>
public AutomaticOSUpgradePolicy()
{
CustomInit();
}
/// <summary>
/// Initializes a new instance of the AutomaticOSUpgradePolicy class.
/// </summary>
/// <param name="disableAutomaticRollback">Whether OS image rollback
/// feature should be disabled.</param>
/// <param name="enableAutomaticOSUpgrade">Indicates whether OS
/// upgrades should automatically be applied to scale set instances in
/// a rolling fashion when a newer version of the OS image becomes
/// available. <br /><br /> If this is set to true for
/// Windows based pools,
/// [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration)
/// cannot be set to true.</param>
/// <param name="useRollingUpgradePolicy">Indicates whether rolling
/// upgrade policy should be used during Auto OS Upgrade. Auto OS
/// Upgrade will fallback to the default policy if no policy is defined
/// on the VMSS.</param>
/// <param name="osRollingUpgradeDeferral">Defer OS upgrades on the
/// TVMs if they are running tasks.</param>
public AutomaticOSUpgradePolicy(bool? disableAutomaticRollback = default(bool?), bool? enableAutomaticOSUpgrade = default(bool?), bool? useRollingUpgradePolicy = default(bool?), bool? osRollingUpgradeDeferral = default(bool?))
{
DisableAutomaticRollback = disableAutomaticRollback;
EnableAutomaticOSUpgrade = enableAutomaticOSUpgrade;
UseRollingUpgradePolicy = useRollingUpgradePolicy;
OsRollingUpgradeDeferral = osRollingUpgradeDeferral;
CustomInit();
}
/// <summary>
/// An initialization method that performs custom operations like setting defaults
/// </summary>
partial void CustomInit();
/// <summary>
/// Gets or sets whether OS image rollback feature should be disabled.
/// </summary>
[JsonProperty(PropertyName = "disableAutomaticRollback")]
public bool? DisableAutomaticRollback { get; set; }
/// <summary>
/// Gets or sets indicates whether OS upgrades should automatically be
/// applied to scale set instances in a rolling fashion when a newer
/// version of the OS image becomes available. &lt;br
/// /&gt;&lt;br /&gt; If this is set to true for Windows
/// based pools,
/// [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchservice/pool/add?tabs=HTTP#windowsconfiguration)
/// cannot be set to true.
/// </summary>
[JsonProperty(PropertyName = "enableAutomaticOSUpgrade")]
public bool? EnableAutomaticOSUpgrade { get; set; }
/// <summary>
/// Gets or sets indicates whether rolling upgrade policy should be
/// used during Auto OS Upgrade. Auto OS Upgrade will fallback to the
/// default policy if no policy is defined on the VMSS.
/// </summary>
[JsonProperty(PropertyName = "useRollingUpgradePolicy")]
public bool? UseRollingUpgradePolicy { get; set; }
/// <summary>
/// Gets or sets defer OS upgrades on the TVMs if they are running
/// tasks.
/// </summary>
[JsonProperty(PropertyName = "osRollingUpgradeDeferral")]
public bool? OsRollingUpgradeDeferral { get; set; }
}
}