@azure/arm-batch 9.1.1-alpha.20240313.1 → 9.2.0-alpha.20240321.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/CHANGELOG.md +12 -10
  2. package/LICENSE +1 -1
  3. package/dist/index.js +1815 -1675
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/applicationCreateSample.js +3 -3
  8. package/dist-esm/samples-dev/applicationCreateSample.js.map +1 -1
  9. package/dist-esm/samples-dev/applicationDeleteSample.js +1 -1
  10. package/dist-esm/samples-dev/applicationGetSample.js +1 -1
  11. package/dist-esm/samples-dev/applicationListSample.js +1 -1
  12. package/dist-esm/samples-dev/applicationPackageActivateSample.js +2 -2
  13. package/dist-esm/samples-dev/applicationPackageActivateSample.js.map +1 -1
  14. package/dist-esm/samples-dev/applicationPackageCreateSample.js +1 -1
  15. package/dist-esm/samples-dev/applicationPackageDeleteSample.js +1 -1
  16. package/dist-esm/samples-dev/applicationPackageGetSample.js +1 -1
  17. package/dist-esm/samples-dev/applicationPackageListSample.js +1 -1
  18. package/dist-esm/samples-dev/applicationUpdateSample.js +2 -2
  19. package/dist-esm/samples-dev/batchAccountCreateSample.js +20 -20
  20. package/dist-esm/samples-dev/batchAccountCreateSample.js.map +1 -1
  21. package/dist-esm/samples-dev/batchAccountDeleteSample.js +1 -1
  22. package/dist-esm/samples-dev/batchAccountGetDetectorSample.js +1 -1
  23. package/dist-esm/samples-dev/batchAccountGetKeysSample.js +1 -1
  24. package/dist-esm/samples-dev/batchAccountGetSample.js +2 -2
  25. package/dist-esm/samples-dev/batchAccountListByResourceGroupSample.js +1 -1
  26. package/dist-esm/samples-dev/batchAccountListDetectorsSample.js +1 -1
  27. package/dist-esm/samples-dev/batchAccountListOutboundNetworkDependenciesEndpointsSample.js +3 -3
  28. package/dist-esm/samples-dev/batchAccountListSample.js +1 -1
  29. package/dist-esm/samples-dev/batchAccountRegenerateKeySample.js +3 -3
  30. package/dist-esm/samples-dev/batchAccountRegenerateKeySample.js.map +1 -1
  31. package/dist-esm/samples-dev/batchAccountSynchronizeAutoStorageKeysSample.js +1 -1
  32. package/dist-esm/samples-dev/batchAccountUpdateSample.js +4 -4
  33. package/dist-esm/samples-dev/batchAccountUpdateSample.js.map +1 -1
  34. package/dist-esm/samples-dev/certificateCancelDeletionSample.js +1 -1
  35. package/dist-esm/samples-dev/certificateCreateSample.js +7 -7
  36. package/dist-esm/samples-dev/certificateCreateSample.js.map +1 -1
  37. package/dist-esm/samples-dev/certificateDeleteSample.js +1 -1
  38. package/dist-esm/samples-dev/certificateGetSample.js +2 -2
  39. package/dist-esm/samples-dev/certificateListByBatchAccountSample.js +4 -4
  40. package/dist-esm/samples-dev/certificateListByBatchAccountSample.js.map +1 -1
  41. package/dist-esm/samples-dev/certificateUpdateSample.js +3 -3
  42. package/dist-esm/samples-dev/certificateUpdateSample.js.map +1 -1
  43. package/dist-esm/samples-dev/locationCheckNameAvailabilitySample.js +5 -5
  44. package/dist-esm/samples-dev/locationCheckNameAvailabilitySample.js.map +1 -1
  45. package/dist-esm/samples-dev/locationGetQuotasSample.js +1 -1
  46. package/dist-esm/samples-dev/locationListSupportedCloudServiceSkusSample.js +1 -1
  47. package/dist-esm/samples-dev/locationListSupportedVirtualMachineSkusSample.js +1 -1
  48. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  49. package/dist-esm/samples-dev/poolCreateSample.js +178 -118
  50. package/dist-esm/samples-dev/poolCreateSample.js.map +1 -1
  51. package/dist-esm/samples-dev/poolDeleteSample.js +1 -1
  52. package/dist-esm/samples-dev/poolDisableAutoScaleSample.js +1 -1
  53. package/dist-esm/samples-dev/poolGetSample.js +25 -6
  54. package/dist-esm/samples-dev/poolGetSample.js.map +1 -1
  55. package/dist-esm/samples-dev/poolListByBatchAccountSample.js +3 -3
  56. package/dist-esm/samples-dev/poolListByBatchAccountSample.js.map +1 -1
  57. package/dist-esm/samples-dev/poolStopResizeSample.js +1 -1
  58. package/dist-esm/samples-dev/poolUpdateSample.js +14 -14
  59. package/dist-esm/samples-dev/poolUpdateSample.js.map +1 -1
  60. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +1 -1
  61. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js.map +1 -1
  62. package/dist-esm/samples-dev/privateEndpointConnectionGetSample.js +1 -1
  63. package/dist-esm/samples-dev/privateEndpointConnectionListByBatchAccountSample.js +1 -1
  64. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js +4 -4
  65. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js.map +1 -1
  66. package/dist-esm/samples-dev/privateLinkResourceGetSample.js +1 -1
  67. package/dist-esm/samples-dev/privateLinkResourceListByBatchAccountSample.js +1 -1
  68. package/dist-esm/src/batchManagementClient.js +11 -10
  69. package/dist-esm/src/batchManagementClient.js.map +1 -1
  70. package/dist-esm/src/lroImpl.js +1 -1
  71. package/dist-esm/src/models/index.d.ts +46 -0
  72. package/dist-esm/src/models/index.d.ts.map +1 -1
  73. package/dist-esm/src/models/index.js.map +1 -1
  74. package/dist-esm/src/models/mappers.d.ts +3 -0
  75. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  76. package/dist-esm/src/models/mappers.js +1367 -1231
  77. package/dist-esm/src/models/mappers.js.map +1 -1
  78. package/dist-esm/src/models/parameters.js +87 -87
  79. package/dist-esm/src/models/parameters.js.map +1 -1
  80. package/dist-esm/src/operations/applicationOperations.js +30 -30
  81. package/dist-esm/src/operations/applicationOperations.js.map +1 -1
  82. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -1
  83. package/dist-esm/src/operations/applicationPackageOperations.js +31 -31
  84. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -1
  85. package/dist-esm/src/operations/batchAccountOperations.d.ts +2 -2
  86. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -1
  87. package/dist-esm/src/operations/batchAccountOperations.js +95 -95
  88. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -1
  89. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -1
  90. package/dist-esm/src/operations/certificateOperations.js +43 -43
  91. package/dist-esm/src/operations/certificateOperations.js.map +1 -1
  92. package/dist-esm/src/operations/location.js +34 -34
  93. package/dist-esm/src/operations/location.js.map +1 -1
  94. package/dist-esm/src/operations/operations.js +9 -9
  95. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -1
  96. package/dist-esm/src/operations/poolOperations.js +48 -48
  97. package/dist-esm/src/operations/poolOperations.js.map +1 -1
  98. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -1
  99. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +45 -45
  100. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -1
  101. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -1
  102. package/dist-esm/src/operations/privateLinkResourceOperations.js +16 -16
  103. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -1
  104. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +1 -1
  105. package/dist-esm/test/batch_examples.js +1 -1
  106. package/dist-esm/test/batch_examples.js.map +1 -1
  107. package/package.json +3 -4
  108. package/review/arm-batch.api.md +31 -0
  109. package/src/batchManagementClient.ts +22 -22
  110. package/src/lroImpl.ts +3 -3
  111. package/src/models/index.ts +74 -14
  112. package/src/models/mappers.ts +1459 -1314
  113. package/src/models/parameters.ts +88 -88
  114. package/src/operations/applicationOperations.ts +54 -59
  115. package/src/operations/applicationPackageOperations.ts +59 -63
  116. package/src/operations/batchAccountOperations.ts +211 -223
  117. package/src/operations/certificateOperations.ts +80 -87
  118. package/src/operations/location.ts +96 -98
  119. package/src/operations/operations.ts +16 -16
  120. package/src/operations/poolOperations.ts +88 -96
  121. package/src/operations/privateEndpointConnectionOperations.ts +86 -91
  122. package/src/operations/privateLinkResourceOperations.ts +35 -36
  123. package/src/operationsInterfaces/applicationOperations.ts +6 -6
  124. package/src/operationsInterfaces/applicationPackageOperations.ts +6 -6
  125. package/src/operationsInterfaces/batchAccountOperations.ts +16 -16
  126. package/src/operationsInterfaces/certificateOperations.ts +8 -8
  127. package/src/operationsInterfaces/location.ts +5 -5
  128. package/src/operationsInterfaces/operations.ts +1 -1
  129. package/src/operationsInterfaces/poolOperations.ts +9 -9
  130. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +7 -7
  131. package/src/operationsInterfaces/privateLinkResourceOperations.ts +3 -3
  132. package/src/pagingHelper.ts +1 -1
  133. package/types/arm-batch.d.ts +51 -1
  134. package/types/tsdoc-metadata.json +1 -1
@@ -16,7 +16,7 @@ dotenv.config();
16
16
  * This sample demonstrates how to Creates a new pool inside the specified account.
17
17
  *
18
18
  * @summary Creates a new pool inside the specified account.
19
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SharedImageGallery.json
19
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SharedImageGallery.json
20
20
  */
21
21
  function createPoolCustomImage() {
22
22
  return __awaiter(this, void 0, void 0, function* () {
@@ -28,12 +28,12 @@ function createPoolCustomImage() {
28
28
  deploymentConfiguration: {
29
29
  virtualMachineConfiguration: {
30
30
  imageReference: {
31
- id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
31
+ id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
32
32
  },
33
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
34
- }
33
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
34
+ },
35
35
  },
36
- vmSize: "STANDARD_D4"
36
+ vmSize: "STANDARD_D4",
37
37
  };
38
38
  const credential = new DefaultAzureCredential();
39
39
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -45,7 +45,7 @@ function createPoolCustomImage() {
45
45
  * This sample demonstrates how to Creates a new pool inside the specified account.
46
46
  *
47
47
  * @summary Creates a new pool inside the specified account.
48
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_CloudServiceConfiguration.json
48
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_CloudServiceConfiguration.json
49
49
  */
50
50
  function createPoolFullCloudServiceConfiguration() {
51
51
  return __awaiter(this, void 0, void 0, function* () {
@@ -58,46 +58,46 @@ function createPoolFullCloudServiceConfiguration() {
58
58
  applicationPackages: [
59
59
  {
60
60
  id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/applications/app_1234",
61
- version: "asdf"
62
- }
61
+ version: "asdf",
62
+ },
63
63
  ],
64
64
  certificates: [
65
65
  {
66
66
  id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Batch/batchAccounts/sampleacct/pools/testpool/certificates/sha1-1234567",
67
67
  storeLocation: "LocalMachine",
68
68
  storeName: "MY",
69
- visibility: ["RemoteUser"]
70
- }
69
+ visibility: ["RemoteUser"],
70
+ },
71
71
  ],
72
72
  deploymentConfiguration: {
73
73
  cloudServiceConfiguration: {
74
74
  osFamily: "4",
75
- osVersion: "WA-GUEST-OS-4.45_201708-01"
76
- }
75
+ osVersion: "WA-GUEST-OS-4.45_201708-01",
76
+ },
77
77
  },
78
78
  displayName: "my-pool-name",
79
79
  interNodeCommunication: "Enabled",
80
80
  metadata: [
81
81
  { name: "metadata-1", value: "value-1" },
82
- { name: "metadata-2", value: "value-2" }
82
+ { name: "metadata-2", value: "value-2" },
83
83
  ],
84
84
  networkConfiguration: {
85
85
  publicIPAddressConfiguration: {
86
86
  ipAddressIds: [
87
87
  "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135",
88
- "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268"
88
+ "/subscriptions/subid2/resourceGroups/rg24/providers/Microsoft.Network/publicIPAddresses/ip268",
89
89
  ],
90
- provision: "UserManaged"
90
+ provision: "UserManaged",
91
91
  },
92
- subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
92
+ subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
93
93
  },
94
94
  scaleSettings: {
95
95
  fixedScale: {
96
96
  nodeDeallocationOption: "TaskCompletion",
97
97
  resizeTimeout: "PT8M",
98
98
  targetDedicatedNodes: 6,
99
- targetLowPriorityNodes: 28
100
- }
99
+ targetLowPriorityNodes: 28,
100
+ },
101
101
  },
102
102
  startTask: {
103
103
  commandLine: "cmd /c SET",
@@ -107,11 +107,11 @@ function createPoolFullCloudServiceConfiguration() {
107
107
  {
108
108
  fileMode: "777",
109
109
  filePath: "c:\\temp\\gohere",
110
- httpUrl: "https://testaccount.blob.core.windows.net/example-blob-file"
111
- }
110
+ httpUrl: "https://testaccount.blob.core.windows.net/example-blob-file",
111
+ },
112
112
  ],
113
113
  userIdentity: { autoUser: { elevationLevel: "Admin", scope: "Pool" } },
114
- waitForSuccess: true
114
+ waitForSuccess: true,
115
115
  },
116
116
  taskSchedulingPolicy: { nodeFillType: "Pack" },
117
117
  taskSlotsPerNode: 13,
@@ -122,12 +122,12 @@ function createPoolFullCloudServiceConfiguration() {
122
122
  linuxUserConfiguration: {
123
123
  gid: 4567,
124
124
  sshPrivateKey: "sshprivatekeyvalue",
125
- uid: 1234
125
+ uid: 1234,
126
126
  },
127
- password: "<ExamplePassword>"
128
- }
127
+ password: "<ExamplePassword>",
128
+ },
129
129
  ],
130
- vmSize: "STANDARD_D4"
130
+ vmSize: "STANDARD_D4",
131
131
  };
132
132
  const credential = new DefaultAzureCredential();
133
133
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -139,7 +139,7 @@ function createPoolFullCloudServiceConfiguration() {
139
139
  * This sample demonstrates how to Creates a new pool inside the specified account.
140
140
  *
141
141
  * @summary Creates a new pool inside the specified account.
142
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration.json
142
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration.json
143
143
  */
144
144
  function createPoolFullVirtualMachineConfiguration() {
145
145
  return __awaiter(this, void 0, void 0, function* () {
@@ -155,28 +155,28 @@ function createPoolFullVirtualMachineConfiguration() {
155
155
  caching: "ReadWrite",
156
156
  diskSizeGB: 30,
157
157
  lun: 0,
158
- storageAccountType: "Premium_LRS"
158
+ storageAccountType: "Premium_LRS",
159
159
  },
160
160
  {
161
161
  caching: "None",
162
162
  diskSizeGB: 200,
163
163
  lun: 1,
164
- storageAccountType: "Standard_LRS"
165
- }
164
+ storageAccountType: "Standard_LRS",
165
+ },
166
166
  ],
167
167
  diskEncryptionConfiguration: { targets: ["OsDisk", "TemporaryDisk"] },
168
168
  imageReference: {
169
169
  offer: "WindowsServer",
170
170
  publisher: "MicrosoftWindowsServer",
171
171
  sku: "2016-Datacenter-SmallDisk",
172
- version: "latest"
172
+ version: "latest",
173
173
  },
174
174
  licenseType: "Windows_Server",
175
175
  nodeAgentSkuId: "batch.node.windows amd64",
176
176
  nodePlacementConfiguration: { policy: "Zonal" },
177
177
  osDisk: { ephemeralOSDiskSettings: { placement: "CacheDisk" } },
178
- windowsConfiguration: { enableAutomaticUpdates: false }
179
- }
178
+ windowsConfiguration: { enableAutomaticUpdates: false },
179
+ },
180
180
  },
181
181
  networkConfiguration: {
182
182
  endpointConfiguration: {
@@ -191,27 +191,27 @@ function createPoolFullVirtualMachineConfiguration() {
191
191
  access: "Allow",
192
192
  priority: 150,
193
193
  sourceAddressPrefix: "192.100.12.45",
194
- sourcePortRanges: ["1", "2"]
194
+ sourcePortRanges: ["1", "2"],
195
195
  },
196
196
  {
197
197
  access: "Deny",
198
198
  priority: 3500,
199
199
  sourceAddressPrefix: "*",
200
- sourcePortRanges: ["*"]
201
- }
200
+ sourcePortRanges: ["*"],
201
+ },
202
202
  ],
203
- protocol: "TCP"
204
- }
205
- ]
206
- }
203
+ protocol: "TCP",
204
+ },
205
+ ],
206
+ },
207
207
  },
208
208
  scaleSettings: {
209
209
  autoScale: {
210
210
  evaluationInterval: "PT5M",
211
- formula: "$TargetDedicatedNodes=1"
212
- }
211
+ formula: "$TargetDedicatedNodes=1",
212
+ },
213
213
  },
214
- vmSize: "STANDARD_D4"
214
+ vmSize: "STANDARD_D4",
215
215
  };
216
216
  const credential = new DefaultAzureCredential();
217
217
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -223,7 +223,7 @@ function createPoolFullVirtualMachineConfiguration() {
223
223
  * This sample demonstrates how to Creates a new pool inside the specified account.
224
224
  *
225
225
  * @summary Creates a new pool inside the specified account.
226
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json
226
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_MinimalCloudServiceConfiguration.json
227
227
  */
228
228
  function createPoolMinimalCloudServiceConfiguration() {
229
229
  return __awaiter(this, void 0, void 0, function* () {
@@ -234,7 +234,7 @@ function createPoolMinimalCloudServiceConfiguration() {
234
234
  const parameters = {
235
235
  deploymentConfiguration: { cloudServiceConfiguration: { osFamily: "5" } },
236
236
  scaleSettings: { fixedScale: { targetDedicatedNodes: 3 } },
237
- vmSize: "STANDARD_D4"
237
+ vmSize: "STANDARD_D4",
238
238
  };
239
239
  const credential = new DefaultAzureCredential();
240
240
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -246,7 +246,7 @@ function createPoolMinimalCloudServiceConfiguration() {
246
246
  * This sample demonstrates how to Creates a new pool inside the specified account.
247
247
  *
248
248
  * @summary Creates a new pool inside the specified account.
249
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
249
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_MinimalVirtualMachineConfiguration.json
250
250
  */
251
251
  function createPoolMinimalVirtualMachineConfiguration() {
252
252
  return __awaiter(this, void 0, void 0, function* () {
@@ -261,18 +261,18 @@ function createPoolMinimalVirtualMachineConfiguration() {
261
261
  offer: "UbuntuServer",
262
262
  publisher: "Canonical",
263
263
  sku: "18.04-LTS",
264
- version: "latest"
264
+ version: "latest",
265
265
  },
266
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
267
- }
266
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
267
+ },
268
268
  },
269
269
  scaleSettings: {
270
270
  autoScale: {
271
271
  evaluationInterval: "PT5M",
272
- formula: "$TargetDedicatedNodes=1"
273
- }
272
+ formula: "$TargetDedicatedNodes=1",
273
+ },
274
274
  },
275
- vmSize: "STANDARD_D4"
275
+ vmSize: "STANDARD_D4",
276
276
  };
277
277
  const credential = new DefaultAzureCredential();
278
278
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -284,7 +284,7 @@ function createPoolMinimalVirtualMachineConfiguration() {
284
284
  * This sample demonstrates how to Creates a new pool inside the specified account.
285
285
  *
286
286
  * @summary Creates a new pool inside the specified account.
287
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_NoPublicIPAddresses.json
287
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_NoPublicIPAddresses.json
288
288
  */
289
289
  function createPoolNoPublicIP() {
290
290
  return __awaiter(this, void 0, void 0, function* () {
@@ -296,16 +296,16 @@ function createPoolNoPublicIP() {
296
296
  deploymentConfiguration: {
297
297
  virtualMachineConfiguration: {
298
298
  imageReference: {
299
- id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
299
+ id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
300
300
  },
301
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
302
- }
301
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
302
+ },
303
303
  },
304
304
  networkConfiguration: {
305
305
  publicIPAddressConfiguration: { provision: "NoPublicIPAddresses" },
306
- subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
306
+ subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
307
307
  },
308
- vmSize: "STANDARD_D4"
308
+ vmSize: "STANDARD_D4",
309
309
  };
310
310
  const credential = new DefaultAzureCredential();
311
311
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -317,7 +317,7 @@ function createPoolNoPublicIP() {
317
317
  * This sample demonstrates how to Creates a new pool inside the specified account.
318
318
  *
319
319
  * @summary Creates a new pool inside the specified account.
320
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_PublicIPs.json
320
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_PublicIPs.json
321
321
  */
322
322
  function createPoolPublicIPs() {
323
323
  return __awaiter(this, void 0, void 0, function* () {
@@ -329,21 +329,21 @@ function createPoolPublicIPs() {
329
329
  deploymentConfiguration: {
330
330
  virtualMachineConfiguration: {
331
331
  imageReference: {
332
- id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1"
332
+ id: "/subscriptions/subid/resourceGroups/networking-group/providers/Microsoft.Compute/galleries/testgallery/images/testimagedef/versions/0.0.1",
333
333
  },
334
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
335
- }
334
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
335
+ },
336
336
  },
337
337
  networkConfiguration: {
338
338
  publicIPAddressConfiguration: {
339
339
  ipAddressIds: [
340
- "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135"
340
+ "/subscriptions/subid1/resourceGroups/rg13/providers/Microsoft.Network/publicIPAddresses/ip135",
341
341
  ],
342
- provision: "UserManaged"
342
+ provision: "UserManaged",
343
343
  },
344
- subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
344
+ subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
345
345
  },
346
- vmSize: "STANDARD_D4"
346
+ vmSize: "STANDARD_D4",
347
347
  };
348
348
  const credential = new DefaultAzureCredential();
349
349
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -355,7 +355,7 @@ function createPoolPublicIPs() {
355
355
  * This sample demonstrates how to Creates a new pool inside the specified account.
356
356
  *
357
357
  * @summary Creates a new pool inside the specified account.
358
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_ResourceTags.json
358
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_ResourceTags.json
359
359
  */
360
360
  function createPoolResourceTags() {
361
361
  return __awaiter(this, void 0, void 0, function* () {
@@ -370,16 +370,16 @@ function createPoolResourceTags() {
370
370
  offer: "UbuntuServer",
371
371
  publisher: "Canonical",
372
372
  sku: "18_04-lts-gen2",
373
- version: "latest"
373
+ version: "latest",
374
374
  },
375
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
376
- }
375
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
376
+ },
377
377
  },
378
378
  resourceTags: { tagName1: "TagValue1", tagName2: "TagValue2" },
379
379
  scaleSettings: {
380
- fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 }
380
+ fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 },
381
381
  },
382
- vmSize: "Standard_d4s_v3"
382
+ vmSize: "Standard_d4s_v3",
383
383
  };
384
384
  const credential = new DefaultAzureCredential();
385
385
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -391,7 +391,7 @@ function createPoolResourceTags() {
391
391
  * This sample demonstrates how to Creates a new pool inside the specified account.
392
392
  *
393
393
  * @summary Creates a new pool inside the specified account.
394
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_SecurityProfile.json
394
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_SecurityProfile.json
395
395
  */
396
396
  function createPoolSecurityProfile() {
397
397
  return __awaiter(this, void 0, void 0, function* () {
@@ -406,20 +406,20 @@ function createPoolSecurityProfile() {
406
406
  offer: "UbuntuServer",
407
407
  publisher: "Canonical",
408
408
  sku: "18_04-lts-gen2",
409
- version: "latest"
409
+ version: "latest",
410
410
  },
411
411
  nodeAgentSkuId: "batch.node.ubuntu 18.04",
412
412
  securityProfile: {
413
413
  encryptionAtHost: true,
414
414
  securityType: "trustedLaunch",
415
- uefiSettings: { secureBootEnabled: undefined, vTpmEnabled: false }
416
- }
417
- }
415
+ uefiSettings: { secureBootEnabled: undefined, vTpmEnabled: false },
416
+ },
417
+ },
418
418
  },
419
419
  scaleSettings: {
420
- fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 }
420
+ fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 },
421
421
  },
422
- vmSize: "Standard_d4s_v3"
422
+ vmSize: "Standard_d4s_v3",
423
423
  };
424
424
  const credential = new DefaultAzureCredential();
425
425
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -431,7 +431,62 @@ function createPoolSecurityProfile() {
431
431
  * This sample demonstrates how to Creates a new pool inside the specified account.
432
432
  *
433
433
  * @summary Creates a new pool inside the specified account.
434
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_UserAssignedIdentities.json
434
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UpgradePolicy.json
435
+ */
436
+ function createPoolUpgradePolicy() {
437
+ return __awaiter(this, void 0, void 0, function* () {
438
+ const subscriptionId = process.env["BATCH_SUBSCRIPTION_ID"] || "subid";
439
+ const resourceGroupName = process.env["BATCH_RESOURCE_GROUP"] || "default-azurebatch-japaneast";
440
+ const accountName = "sampleacct";
441
+ const poolName = "testpool";
442
+ const parameters = {
443
+ deploymentConfiguration: {
444
+ virtualMachineConfiguration: {
445
+ imageReference: {
446
+ offer: "WindowsServer",
447
+ publisher: "MicrosoftWindowsServer",
448
+ sku: "2019-datacenter-smalldisk",
449
+ version: "latest",
450
+ },
451
+ nodeAgentSkuId: "batch.node.windows amd64",
452
+ nodePlacementConfiguration: { policy: "Zonal" },
453
+ windowsConfiguration: { enableAutomaticUpdates: false },
454
+ },
455
+ },
456
+ scaleSettings: {
457
+ fixedScale: { targetDedicatedNodes: 2, targetLowPriorityNodes: 0 },
458
+ },
459
+ upgradePolicy: {
460
+ automaticOSUpgradePolicy: {
461
+ disableAutomaticRollback: true,
462
+ enableAutomaticOSUpgrade: true,
463
+ osRollingUpgradeDeferral: true,
464
+ useRollingUpgradePolicy: true,
465
+ },
466
+ mode: "automatic",
467
+ rollingUpgradePolicy: {
468
+ enableCrossZoneUpgrade: true,
469
+ maxBatchInstancePercent: 20,
470
+ maxUnhealthyInstancePercent: 20,
471
+ maxUnhealthyUpgradedInstancePercent: 20,
472
+ pauseTimeBetweenBatches: "PT0S",
473
+ prioritizeUnhealthyInstances: false,
474
+ rollbackFailedInstancesOnPolicyBreach: false,
475
+ },
476
+ },
477
+ vmSize: "Standard_d4s_v3",
478
+ };
479
+ const credential = new DefaultAzureCredential();
480
+ const client = new BatchManagementClient(credential, subscriptionId);
481
+ const result = yield client.poolOperations.create(resourceGroupName, accountName, poolName, parameters);
482
+ console.log(result);
483
+ });
484
+ }
485
+ /**
486
+ * This sample demonstrates how to Creates a new pool inside the specified account.
487
+ *
488
+ * @summary Creates a new pool inside the specified account.
489
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_UserAssignedIdentities.json
435
490
  */
436
491
  function createPoolUserAssignedIdentities() {
437
492
  return __awaiter(this, void 0, void 0, function* () {
@@ -446,25 +501,25 @@ function createPoolUserAssignedIdentities() {
446
501
  offer: "UbuntuServer",
447
502
  publisher: "Canonical",
448
503
  sku: "18.04-LTS",
449
- version: "latest"
504
+ version: "latest",
450
505
  },
451
- nodeAgentSkuId: "batch.node.ubuntu 18.04"
452
- }
506
+ nodeAgentSkuId: "batch.node.ubuntu 18.04",
507
+ },
453
508
  },
454
509
  identity: {
455
510
  type: "UserAssigned",
456
511
  userAssignedIdentities: {
457
512
  "/subscriptions/subid/resourceGroups/defaultAzurebatchJapaneast/providers/MicrosoftManagedIdentity/userAssignedIdentities/id1": {},
458
- "/subscriptions/subid/resourceGroups/defaultAzurebatchJapaneast/providers/MicrosoftManagedIdentity/userAssignedIdentities/id2": {}
459
- }
513
+ "/subscriptions/subid/resourceGroups/defaultAzurebatchJapaneast/providers/MicrosoftManagedIdentity/userAssignedIdentities/id2": {},
514
+ },
460
515
  },
461
516
  scaleSettings: {
462
517
  autoScale: {
463
518
  evaluationInterval: "PT5M",
464
- formula: "$TargetDedicatedNodes=1"
465
- }
519
+ formula: "$TargetDedicatedNodes=1",
520
+ },
466
521
  },
467
- vmSize: "STANDARD_D4"
522
+ vmSize: "STANDARD_D4",
468
523
  };
469
524
  const credential = new DefaultAzureCredential();
470
525
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -476,7 +531,7 @@ function createPoolUserAssignedIdentities() {
476
531
  * This sample demonstrates how to Creates a new pool inside the specified account.
477
532
  *
478
533
  * @summary Creates a new pool inside the specified account.
479
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
534
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_Extensions.json
480
535
  */
481
536
  function createPoolVirtualMachineConfigurationExtensions() {
482
537
  return __awaiter(this, void 0, void 0, function* () {
@@ -490,7 +545,7 @@ function createPoolVirtualMachineConfigurationExtensions() {
490
545
  imageReference: {
491
546
  offer: "0001-com-ubuntu-server-focal",
492
547
  publisher: "Canonical",
493
- sku: "20_04-lts"
548
+ sku: "20_04-lts",
494
549
  },
495
550
  nodeAgentSkuId: "batch.node.ubuntu 20.04",
496
551
  extensions: [
@@ -502,21 +557,21 @@ function createPoolVirtualMachineConfigurationExtensions() {
502
557
  publisher: "Microsoft.Azure.KeyVault",
503
558
  settings: {
504
559
  authenticationSettingsKey: "authenticationSettingsValue",
505
- secretsManagementSettingsKey: "secretsManagementSettingsValue"
560
+ secretsManagementSettingsKey: "secretsManagementSettingsValue",
506
561
  },
507
- typeHandlerVersion: "2.0"
508
- }
509
- ]
510
- }
562
+ typeHandlerVersion: "2.0",
563
+ },
564
+ ],
565
+ },
511
566
  },
512
567
  scaleSettings: {
513
568
  autoScale: {
514
569
  evaluationInterval: "PT5M",
515
- formula: "$TargetDedicatedNodes=1"
516
- }
570
+ formula: "$TargetDedicatedNodes=1",
571
+ },
517
572
  },
518
573
  targetNodeCommunicationMode: "Default",
519
- vmSize: "STANDARD_D4"
574
+ vmSize: "STANDARD_D4",
520
575
  };
521
576
  const credential = new DefaultAzureCredential();
522
577
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -528,7 +583,7 @@ function createPoolVirtualMachineConfigurationExtensions() {
528
583
  * This sample demonstrates how to Creates a new pool inside the specified account.
529
584
  *
530
585
  * @summary Creates a new pool inside the specified account.
531
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
586
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_ManagedOSDisk.json
532
587
  */
533
588
  function createPoolVirtualMachineConfigurationOSDisk() {
534
589
  return __awaiter(this, void 0, void 0, function* () {
@@ -542,21 +597,21 @@ function createPoolVirtualMachineConfigurationOSDisk() {
542
597
  imageReference: {
543
598
  offer: "windowsserver",
544
599
  publisher: "microsoftwindowsserver",
545
- sku: "2022-datacenter-smalldisk"
600
+ sku: "2022-datacenter-smalldisk",
546
601
  },
547
602
  nodeAgentSkuId: "batch.node.windows amd64",
548
603
  osDisk: {
549
604
  caching: "ReadWrite",
550
605
  diskSizeGB: 100,
551
606
  managedDisk: { storageAccountType: "StandardSSD_LRS" },
552
- writeAcceleratorEnabled: false
553
- }
554
- }
607
+ writeAcceleratorEnabled: false,
608
+ },
609
+ },
555
610
  },
556
611
  scaleSettings: {
557
- fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 }
612
+ fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 },
558
613
  },
559
- vmSize: "Standard_d2s_v3"
614
+ vmSize: "Standard_d2s_v3",
560
615
  };
561
616
  const credential = new DefaultAzureCredential();
562
617
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -568,7 +623,7 @@ function createPoolVirtualMachineConfigurationOSDisk() {
568
623
  * This sample demonstrates how to Creates a new pool inside the specified account.
569
624
  *
570
625
  * @summary Creates a new pool inside the specified account.
571
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
626
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_VirtualMachineConfiguration_ServiceArtifactReference.json
572
627
  */
573
628
  function createPoolVirtualMachineConfigurationServiceArtifactReference() {
574
629
  return __awaiter(this, void 0, void 0, function* () {
@@ -583,19 +638,23 @@ function createPoolVirtualMachineConfigurationServiceArtifactReference() {
583
638
  offer: "WindowsServer",
584
639
  publisher: "MicrosoftWindowsServer",
585
640
  sku: "2019-datacenter-smalldisk",
586
- version: "latest"
641
+ version: "latest",
587
642
  },
588
643
  nodeAgentSkuId: "batch.node.windows amd64",
589
644
  serviceArtifactReference: {
590
- id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile"
645
+ id: "/subscriptions/subid/resourceGroups/default-azurebatch-japaneast/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/vmArtifactsProfile",
591
646
  },
592
- windowsConfiguration: { enableAutomaticUpdates: false }
593
- }
647
+ windowsConfiguration: { enableAutomaticUpdates: false },
648
+ },
594
649
  },
595
650
  scaleSettings: {
596
- fixedScale: { targetDedicatedNodes: 2, targetLowPriorityNodes: 0 }
651
+ fixedScale: { targetDedicatedNodes: 2, targetLowPriorityNodes: 0 },
652
+ },
653
+ upgradePolicy: {
654
+ automaticOSUpgradePolicy: { enableAutomaticOSUpgrade: true },
655
+ mode: "automatic",
597
656
  },
598
- vmSize: "Standard_d4s_v3"
657
+ vmSize: "Standard_d4s_v3",
599
658
  };
600
659
  const credential = new DefaultAzureCredential();
601
660
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -607,7 +666,7 @@ function createPoolVirtualMachineConfigurationServiceArtifactReference() {
607
666
  * This sample demonstrates how to Creates a new pool inside the specified account.
608
667
  *
609
668
  * @summary Creates a new pool inside the specified account.
610
- * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2023-11-01/examples/PoolCreate_AcceleratedNetworking.json
669
+ * x-ms-original-file: specification/batch/resource-manager/Microsoft.Batch/stable/2024-02-01/examples/PoolCreate_AcceleratedNetworking.json
611
670
  */
612
671
  function createPoolAcceleratedNetworking() {
613
672
  return __awaiter(this, void 0, void 0, function* () {
@@ -622,19 +681,19 @@ function createPoolAcceleratedNetworking() {
622
681
  offer: "WindowsServer",
623
682
  publisher: "MicrosoftWindowsServer",
624
683
  sku: "2016-datacenter-smalldisk",
625
- version: "latest"
684
+ version: "latest",
626
685
  },
627
- nodeAgentSkuId: "batch.node.windows amd64"
628
- }
686
+ nodeAgentSkuId: "batch.node.windows amd64",
687
+ },
629
688
  },
630
689
  networkConfiguration: {
631
690
  enableAcceleratedNetworking: true,
632
- subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123"
691
+ subnetId: "/subscriptions/subid/resourceGroups/rg1234/providers/Microsoft.Network/virtualNetworks/network1234/subnets/subnet123",
633
692
  },
634
693
  scaleSettings: {
635
- fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 }
694
+ fixedScale: { targetDedicatedNodes: 1, targetLowPriorityNodes: 0 },
636
695
  },
637
- vmSize: "STANDARD_D1_V2"
696
+ vmSize: "STANDARD_D1_V2",
638
697
  };
639
698
  const credential = new DefaultAzureCredential();
640
699
  const client = new BatchManagementClient(credential, subscriptionId);
@@ -653,6 +712,7 @@ function main() {
653
712
  createPoolPublicIPs();
654
713
  createPoolResourceTags();
655
714
  createPoolSecurityProfile();
715
+ createPoolUpgradePolicy();
656
716
  createPoolUserAssignedIdentities();
657
717
  createPoolVirtualMachineConfigurationExtensions();
658
718
  createPoolVirtualMachineConfigurationOSDisk();