Skip to content

Commit ab79424

Browse files
committed
Batch managmenet 2024-02-01 generation
1 parent 36774f8 commit ab79424

File tree

18 files changed

+563
-56
lines changed

18 files changed

+563
-56
lines changed

src/Batch/Batch.Management.Sdk/Generated/BatchManagementClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private void Initialize()
345345
this.PrivateEndpointConnection = new PrivateEndpointConnectionOperations(this);
346346
this.Pool = new PoolOperations(this);
347347
this.BaseUri = new System.Uri("https://management.azure.com");
348-
this.ApiVersion = "2023-11-01";
348+
this.ApiVersion = "2024-02-01";
349349
this.AcceptLanguage = "en-US";
350350
this.LongRunningOperationRetryTimeout = 30;
351351
this.GenerateClientRequestId = true;
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
5+
6+
namespace Microsoft.Azure.Management.Batch.Models
7+
{
8+
using System.Linq;
9+
10+
/// <summary>
11+
/// The configuration parameters used for performing automatic OS upgrade.
12+
/// </summary>
13+
public partial class AutomaticOSUpgradePolicy
14+
{
15+
/// <summary>
16+
/// Initializes a new instance of the AutomaticOSUpgradePolicy class.
17+
/// </summary>
18+
public AutomaticOSUpgradePolicy()
19+
{
20+
CustomInit();
21+
}
22+
23+
/// <summary>
24+
/// Initializes a new instance of the AutomaticOSUpgradePolicy class.
25+
/// </summary>
26+
27+
/// <param name="disableAutomaticRollback">Whether OS image rollback feature should be disabled.
28+
/// </param>
29+
30+
/// <param name="enableAutomaticOSUpgrade">Indicates whether OS upgrades should automatically be applied to scale set
31+
/// instances in a rolling fashion when a newer version of the OS image becomes
32+
/// available. &lt;br /&gt;&lt;br /&gt; If this is set to true for Windows based pools,
33+
/// [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration)
34+
/// cannot be set to true.
35+
/// </param>
36+
37+
/// <param name="useRollingUpgradePolicy">Indicates whether rolling upgrade policy should be used during Auto OS
38+
/// Upgrade. Auto OS Upgrade will fallback to the default policy if no policy
39+
/// is defined on the VMSS.
40+
/// </param>
41+
42+
/// <param name="osRollingUpgradeDeferral">Defer OS upgrades on the TVMs if they are running tasks.
43+
/// </param>
44+
public AutomaticOSUpgradePolicy(bool? disableAutomaticRollback = default(bool?), bool? enableAutomaticOSUpgrade = default(bool?), bool? useRollingUpgradePolicy = default(bool?), bool? osRollingUpgradeDeferral = default(bool?))
45+
46+
{
47+
this.DisableAutomaticRollback = disableAutomaticRollback;
48+
this.EnableAutomaticOSUpgrade = enableAutomaticOSUpgrade;
49+
this.UseRollingUpgradePolicy = useRollingUpgradePolicy;
50+
this.OSRollingUpgradeDeferral = osRollingUpgradeDeferral;
51+
CustomInit();
52+
}
53+
54+
/// <summary>
55+
/// An initialization method that performs custom operations like setting defaults
56+
/// </summary>
57+
partial void CustomInit();
58+
59+
60+
/// <summary>
61+
/// Gets or sets whether OS image rollback feature should be disabled.
62+
/// </summary>
63+
[Newtonsoft.Json.JsonProperty(PropertyName = "disableAutomaticRollback")]
64+
public bool? DisableAutomaticRollback {get; set; }
65+
66+
/// <summary>
67+
/// Gets or sets indicates whether OS upgrades should automatically be applied
68+
/// to scale set instances in a rolling fashion when a newer version of the OS
69+
/// image becomes available. &lt;br /&gt;&lt;br /&gt; If this is set to true for Windows
70+
/// based pools,
71+
/// [WindowsConfiguration.enableAutomaticUpdates](https://learn.microsoft.com/en-us/rest/api/batchmanagement/pool/create?tabs=HTTP#windowsconfiguration)
72+
/// cannot be set to true.
73+
/// </summary>
74+
[Newtonsoft.Json.JsonProperty(PropertyName = "enableAutomaticOSUpgrade")]
75+
public bool? EnableAutomaticOSUpgrade {get; set; }
76+
77+
/// <summary>
78+
/// Gets or sets indicates whether rolling upgrade policy should be used during
79+
/// Auto OS Upgrade. Auto OS Upgrade will fallback to the default policy if no
80+
/// policy is defined on the VMSS.
81+
/// </summary>
82+
[Newtonsoft.Json.JsonProperty(PropertyName = "useRollingUpgradePolicy")]
83+
public bool? UseRollingUpgradePolicy {get; set; }
84+
85+
/// <summary>
86+
/// Gets or sets defer OS upgrades on the TVMs if they are running tasks.
87+
/// </summary>
88+
[Newtonsoft.Json.JsonProperty(PropertyName = "osRollingUpgradeDeferral")]
89+
public bool? OSRollingUpgradeDeferral {get; set; }
90+
}
91+
}

src/Batch/Batch.Management.Sdk/Generated/Models/Pool.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public Pool()
6262
/// to remove the start task from the pool.
6363
/// </param>
6464

65+
/// <param name="upgradePolicy">Describes an upgrade policy - automatic, manual, or rolling.
66+
/// </param>
67+
6568
/// <param name="displayName">The display name need not be unique and can contain any Unicode characters
6669
/// up to a maximum length of 1024.
6770
/// </param>
@@ -173,7 +176,7 @@ public Pool()
173176
/// Batch account was created with the poolAllocationMode property set to
174177
/// &#39;UserSubscription&#39;.
175178
/// </param>
176-
public Pool(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), BatchPoolIdentity identity = default(BatchPoolIdentity), AllocationState? allocationState = default(AllocationState?), DeploymentConfiguration deploymentConfiguration = default(DeploymentConfiguration), ScaleSettings scaleSettings = default(ScaleSettings), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), string displayName = default(string), System.DateTime? lastModified = default(System.DateTime?), System.DateTime? creationTime = default(System.DateTime?), PoolProvisioningState? provisioningState = default(PoolProvisioningState?), System.DateTime? provisioningStateTransitionTime = default(System.DateTime?), System.DateTime? allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), AutoScaleRun autoScaleRun = default(AutoScaleRun), InterNodeCommunicationState? interNodeCommunication = default(InterNodeCommunicationState?), int? taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.Collections.Generic.IList<UserAccount> userAccounts = default(System.Collections.Generic.IList<UserAccount>), System.Collections.Generic.IList<MetadataItem> metadata = default(System.Collections.Generic.IList<MetadataItem>), System.Collections.Generic.IList<CertificateReference> certificates = default(System.Collections.Generic.IList<CertificateReference>), System.Collections.Generic.IList<ApplicationPackageReference> applicationPackages = default(System.Collections.Generic.IList<ApplicationPackageReference>), System.Collections.Generic.IList<string> applicationLicenses = default(System.Collections.Generic.IList<string>), ResizeOperationStatus resizeOperationStatus = default(ResizeOperationStatus), System.Collections.Generic.IList<MountConfiguration> mountConfiguration = default(System.Collections.Generic.IList<MountConfiguration>), NodeCommunicationMode? targetNodeCommunicationMode = default(NodeCommunicationMode?), NodeCommunicationMode? currentNodeCommunicationMode = default(NodeCommunicationMode?), System.Collections.Generic.IDictionary<string, string> resourceTags = default(System.Collections.Generic.IDictionary<string, string>))
179+
public Pool(string id = default(string), string name = default(string), string type = default(string), string etag = default(string), BatchPoolIdentity identity = default(BatchPoolIdentity), AllocationState? allocationState = default(AllocationState?), DeploymentConfiguration deploymentConfiguration = default(DeploymentConfiguration), ScaleSettings scaleSettings = default(ScaleSettings), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), StartTask startTask = default(StartTask), UpgradePolicy upgradePolicy = default(UpgradePolicy), string displayName = default(string), System.DateTime? lastModified = default(System.DateTime?), System.DateTime? creationTime = default(System.DateTime?), PoolProvisioningState? provisioningState = default(PoolProvisioningState?), System.DateTime? provisioningStateTransitionTime = default(System.DateTime?), System.DateTime? allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), AutoScaleRun autoScaleRun = default(AutoScaleRun), InterNodeCommunicationState? interNodeCommunication = default(InterNodeCommunicationState?), int? taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.Collections.Generic.IList<UserAccount> userAccounts = default(System.Collections.Generic.IList<UserAccount>), System.Collections.Generic.IList<MetadataItem> metadata = default(System.Collections.Generic.IList<MetadataItem>), System.Collections.Generic.IList<CertificateReference> certificates = default(System.Collections.Generic.IList<CertificateReference>), System.Collections.Generic.IList<ApplicationPackageReference> applicationPackages = default(System.Collections.Generic.IList<ApplicationPackageReference>), System.Collections.Generic.IList<string> applicationLicenses = default(System.Collections.Generic.IList<string>), ResizeOperationStatus resizeOperationStatus = default(ResizeOperationStatus), System.Collections.Generic.IList<MountConfiguration> mountConfiguration = default(System.Collections.Generic.IList<MountConfiguration>), NodeCommunicationMode? targetNodeCommunicationMode = default(NodeCommunicationMode?), NodeCommunicationMode? currentNodeCommunicationMode = default(NodeCommunicationMode?), System.Collections.Generic.IDictionary<string, string> resourceTags = default(System.Collections.Generic.IDictionary<string, string>))
177180

178181
: base(id, name, type, etag)
179182
{
@@ -183,6 +186,7 @@ public Pool()
183186
this.ScaleSettings = scaleSettings;
184187
this.NetworkConfiguration = networkConfiguration;
185188
this.StartTask = startTask;
189+
this.UpgradePolicy = upgradePolicy;
186190
this.DisplayName = displayName;
187191
this.LastModified = lastModified;
188192
this.CreationTime = creationTime;
@@ -258,6 +262,12 @@ public Pool()
258262
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.startTask")]
259263
public StartTask StartTask {get; set; }
260264

265+
/// <summary>
266+
/// Gets or sets describes an upgrade policy - automatic, manual, or rolling.
267+
/// </summary>
268+
[Newtonsoft.Json.JsonProperty(PropertyName = "properties.upgradePolicy")]
269+
public UpgradePolicy UpgradePolicy {get; set; }
270+
261271
/// <summary>
262272
/// Gets or sets the display name need not be unique and can contain any
263273
/// Unicode characters up to a maximum length of 1024.
@@ -468,6 +478,10 @@ public virtual void Validate()
468478
{
469479
this.StartTask.Validate();
470480
}
481+
if (this.UpgradePolicy != null)
482+
{
483+
this.UpgradePolicy.Validate();
484+
}
471485

472486

473487

src/Batch/Batch.Management.Sdk/Generated/Models/PoolProperties.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,16 @@ public PoolProperties()
151151
/// <param name="currentNodeCommunicationMode">Determines how a pool communicates with the Batch service.
152152
/// Possible values include: &#39;Default&#39;, &#39;Classic&#39;, &#39;Simplified&#39;</param>
153153

154+
/// <param name="upgradePolicy">Describes an upgrade policy - automatic, manual, or rolling.
155+
/// </param>
156+
154157
/// <param name="resourceTags">The user-defined tags to be associated with the Azure Batch Pool. When
155158
/// specified, these tags are propagated to the backing Azure resources
156159
/// associated with the pool. This property can only be specified when the
157160
/// Batch account was created with the poolAllocationMode property set to
158161
/// &#39;UserSubscription&#39;.
159162
/// </param>
160-
public PoolProperties(string displayName = default(string), System.DateTime? lastModified = default(System.DateTime?), System.DateTime? creationTime = default(System.DateTime?), PoolProvisioningState? provisioningState = default(PoolProvisioningState?), System.DateTime? provisioningStateTransitionTime = default(System.DateTime?), AllocationState? allocationState = default(AllocationState?), System.DateTime? allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), DeploymentConfiguration deploymentConfiguration = default(DeploymentConfiguration), int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), ScaleSettings scaleSettings = default(ScaleSettings), AutoScaleRun autoScaleRun = default(AutoScaleRun), InterNodeCommunicationState? interNodeCommunication = default(InterNodeCommunicationState?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), int? taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.Collections.Generic.IList<UserAccount> userAccounts = default(System.Collections.Generic.IList<UserAccount>), System.Collections.Generic.IList<MetadataItem> metadata = default(System.Collections.Generic.IList<MetadataItem>), StartTask startTask = default(StartTask), System.Collections.Generic.IList<CertificateReference> certificates = default(System.Collections.Generic.IList<CertificateReference>), System.Collections.Generic.IList<ApplicationPackageReference> applicationPackages = default(System.Collections.Generic.IList<ApplicationPackageReference>), System.Collections.Generic.IList<string> applicationLicenses = default(System.Collections.Generic.IList<string>), ResizeOperationStatus resizeOperationStatus = default(ResizeOperationStatus), System.Collections.Generic.IList<MountConfiguration> mountConfiguration = default(System.Collections.Generic.IList<MountConfiguration>), NodeCommunicationMode? targetNodeCommunicationMode = default(NodeCommunicationMode?), NodeCommunicationMode? currentNodeCommunicationMode = default(NodeCommunicationMode?), System.Collections.Generic.IDictionary<string, string> resourceTags = default(System.Collections.Generic.IDictionary<string, string>))
163+
public PoolProperties(string displayName = default(string), System.DateTime? lastModified = default(System.DateTime?), System.DateTime? creationTime = default(System.DateTime?), PoolProvisioningState? provisioningState = default(PoolProvisioningState?), System.DateTime? provisioningStateTransitionTime = default(System.DateTime?), AllocationState? allocationState = default(AllocationState?), System.DateTime? allocationStateTransitionTime = default(System.DateTime?), string vmSize = default(string), DeploymentConfiguration deploymentConfiguration = default(DeploymentConfiguration), int? currentDedicatedNodes = default(int?), int? currentLowPriorityNodes = default(int?), ScaleSettings scaleSettings = default(ScaleSettings), AutoScaleRun autoScaleRun = default(AutoScaleRun), InterNodeCommunicationState? interNodeCommunication = default(InterNodeCommunicationState?), NetworkConfiguration networkConfiguration = default(NetworkConfiguration), int? taskSlotsPerNode = default(int?), TaskSchedulingPolicy taskSchedulingPolicy = default(TaskSchedulingPolicy), System.Collections.Generic.IList<UserAccount> userAccounts = default(System.Collections.Generic.IList<UserAccount>), System.Collections.Generic.IList<MetadataItem> metadata = default(System.Collections.Generic.IList<MetadataItem>), StartTask startTask = default(StartTask), System.Collections.Generic.IList<CertificateReference> certificates = default(System.Collections.Generic.IList<CertificateReference>), System.Collections.Generic.IList<ApplicationPackageReference> applicationPackages = default(System.Collections.Generic.IList<ApplicationPackageReference>), System.Collections.Generic.IList<string> applicationLicenses = default(System.Collections.Generic.IList<string>), ResizeOperationStatus resizeOperationStatus = default(ResizeOperationStatus), System.Collections.Generic.IList<MountConfiguration> mountConfiguration = default(System.Collections.Generic.IList<MountConfiguration>), NodeCommunicationMode? targetNodeCommunicationMode = default(NodeCommunicationMode?), NodeCommunicationMode? currentNodeCommunicationMode = default(NodeCommunicationMode?), UpgradePolicy upgradePolicy = default(UpgradePolicy), System.Collections.Generic.IDictionary<string, string> resourceTags = default(System.Collections.Generic.IDictionary<string, string>))
161164

162165
{
163166
this.DisplayName = displayName;
@@ -187,6 +190,7 @@ public PoolProperties()
187190
this.MountConfiguration = mountConfiguration;
188191
this.TargetNodeCommunicationMode = targetNodeCommunicationMode;
189192
this.CurrentNodeCommunicationMode = currentNodeCommunicationMode;
193+
this.UpgradePolicy = upgradePolicy;
190194
this.ResourceTags = resourceTags;
191195
CustomInit();
192196
}
@@ -406,6 +410,12 @@ public PoolProperties()
406410
[Newtonsoft.Json.JsonProperty(PropertyName = "currentNodeCommunicationMode")]
407411
public NodeCommunicationMode? CurrentNodeCommunicationMode {get; private set; }
408412

413+
/// <summary>
414+
/// Gets or sets describes an upgrade policy - automatic, manual, or rolling.
415+
/// </summary>
416+
[Newtonsoft.Json.JsonProperty(PropertyName = "upgradePolicy")]
417+
public UpgradePolicy UpgradePolicy {get; set; }
418+
409419
/// <summary>
410420
/// Gets or sets the user-defined tags to be associated with the Azure Batch
411421
/// Pool. When specified, these tags are propagated to the backing Azure
@@ -506,6 +516,10 @@ public virtual void Validate()
506516
}
507517

508518

519+
if (this.UpgradePolicy != null)
520+
{
521+
this.UpgradePolicy.Validate();
522+
}
509523

510524
}
511525
}

0 commit comments

Comments
 (0)