@azure/arm-batch 7.1.2-alpha.20220415.1 → 7.2.0

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 (90) hide show
  1. package/CHANGELOG.md +29 -10
  2. package/dist/index.js +302 -16
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/applicationCreateSample.js +1 -1
  7. package/dist-esm/samples-dev/applicationDeleteSample.js +1 -1
  8. package/dist-esm/samples-dev/applicationGetSample.js +1 -1
  9. package/dist-esm/samples-dev/applicationListSample.js +1 -1
  10. package/dist-esm/samples-dev/applicationPackageActivateSample.js +1 -1
  11. package/dist-esm/samples-dev/applicationPackageCreateSample.js +1 -1
  12. package/dist-esm/samples-dev/applicationPackageDeleteSample.js +1 -1
  13. package/dist-esm/samples-dev/applicationPackageGetSample.js +1 -1
  14. package/dist-esm/samples-dev/applicationPackageListSample.js +1 -1
  15. package/dist-esm/samples-dev/applicationUpdateSample.js +1 -1
  16. package/dist-esm/samples-dev/batchAccountCreateSample.js +5 -5
  17. package/dist-esm/samples-dev/batchAccountDeleteSample.js +1 -1
  18. package/dist-esm/samples-dev/batchAccountGetDetectorSample.js +1 -1
  19. package/dist-esm/samples-dev/batchAccountGetKeysSample.js +1 -1
  20. package/dist-esm/samples-dev/batchAccountGetSample.js +2 -2
  21. package/dist-esm/samples-dev/batchAccountListByResourceGroupSample.js +1 -1
  22. package/dist-esm/samples-dev/batchAccountListDetectorsSample.js +1 -1
  23. package/dist-esm/samples-dev/batchAccountListOutboundNetworkDependenciesEndpointsSample.js +3 -3
  24. package/dist-esm/samples-dev/batchAccountListSample.js +1 -1
  25. package/dist-esm/samples-dev/batchAccountRegenerateKeySample.js +1 -1
  26. package/dist-esm/samples-dev/batchAccountSynchronizeAutoStorageKeysSample.js +1 -1
  27. package/dist-esm/samples-dev/batchAccountUpdateSample.js +1 -1
  28. package/dist-esm/samples-dev/certificateCancelDeletionSample.js +1 -1
  29. package/dist-esm/samples-dev/certificateCreateSample.js +3 -3
  30. package/dist-esm/samples-dev/certificateDeleteSample.js +1 -1
  31. package/dist-esm/samples-dev/certificateGetSample.js +2 -2
  32. package/dist-esm/samples-dev/certificateListByBatchAccountSample.js +2 -2
  33. package/dist-esm/samples-dev/certificateUpdateSample.js +1 -1
  34. package/dist-esm/samples-dev/locationCheckNameAvailabilitySample.js +2 -2
  35. package/dist-esm/samples-dev/locationGetQuotasSample.js +1 -1
  36. package/dist-esm/samples-dev/locationListSupportedCloudServiceSkusSample.js +1 -1
  37. package/dist-esm/samples-dev/locationListSupportedVirtualMachineSkusSample.js +1 -1
  38. package/dist-esm/samples-dev/operationsListSample.js +1 -1
  39. package/dist-esm/samples-dev/poolCreateSample.js +9 -9
  40. package/dist-esm/samples-dev/poolDeleteSample.js +1 -1
  41. package/dist-esm/samples-dev/poolDisableAutoScaleSample.js +1 -1
  42. package/dist-esm/samples-dev/poolGetSample.js +2 -2
  43. package/dist-esm/samples-dev/poolListByBatchAccountSample.js +2 -2
  44. package/dist-esm/samples-dev/poolStopResizeSample.js +1 -1
  45. package/dist-esm/samples-dev/poolUpdateSample.js +4 -4
  46. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.d.ts +2 -0
  47. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.d.ts.map +1 -0
  48. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js +32 -0
  49. package/dist-esm/samples-dev/privateEndpointConnectionDeleteSample.js.map +1 -0
  50. package/dist-esm/samples-dev/privateEndpointConnectionGetSample.js +1 -1
  51. package/dist-esm/samples-dev/privateEndpointConnectionListByBatchAccountSample.js +1 -1
  52. package/dist-esm/samples-dev/privateEndpointConnectionUpdateSample.js +1 -1
  53. package/dist-esm/samples-dev/privateLinkResourceGetSample.js +2 -2
  54. package/dist-esm/samples-dev/privateLinkResourceGetSample.js.map +1 -1
  55. package/dist-esm/samples-dev/privateLinkResourceListByBatchAccountSample.js +1 -1
  56. package/dist-esm/src/batchManagementClient.d.ts +2 -0
  57. package/dist-esm/src/batchManagementClient.d.ts.map +1 -1
  58. package/dist-esm/src/batchManagementClient.js +48 -2
  59. package/dist-esm/src/batchManagementClient.js.map +1 -1
  60. package/dist-esm/src/models/index.d.ts +92 -35
  61. package/dist-esm/src/models/index.d.ts.map +1 -1
  62. package/dist-esm/src/models/mappers.d.ts +4 -0
  63. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  64. package/dist-esm/src/models/mappers.js +146 -2
  65. package/dist-esm/src/models/mappers.js.map +1 -1
  66. package/dist-esm/src/models/parameters.js +1 -1
  67. package/dist-esm/src/operations/batchAccountOperations.d.ts +2 -2
  68. package/dist-esm/src/operations/batchAccountOperations.js +2 -2
  69. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +19 -1
  70. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -1
  71. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +92 -0
  72. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -1
  73. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +1 -1
  74. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +19 -1
  75. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -1
  76. package/dist-esm/test/batch_examples.d.ts.map +1 -1
  77. package/dist-esm/test/batch_examples.js +20 -22
  78. package/dist-esm/test/batch_examples.js.map +1 -1
  79. package/package.json +11 -8
  80. package/review/arm-batch.api.md +113 -69
  81. package/src/batchManagementClient.ts +60 -2
  82. package/src/models/index.ts +104 -36
  83. package/src/models/mappers.ts +153 -2
  84. package/src/models/parameters.ts +1 -1
  85. package/src/operations/batchAccountOperations.ts +2 -2
  86. package/src/operations/privateEndpointConnectionOperations.ts +134 -0
  87. package/src/operationsInterfaces/batchAccountOperations.ts +1 -1
  88. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +36 -1
  89. package/types/arm-batch.d.ts +120 -36
  90. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,15 +1,34 @@
1
1
  # Release History
2
+
3
+ ## 7.2.0 (2022-07-19)
4
+
5
+ **Features**
2
6
 
3
- ## 7.1.2 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
12
-
7
+ - Added operation PrivateEndpointConnectionOperations.beginDelete
8
+ - Added operation PrivateEndpointConnectionOperations.beginDeleteAndWait
9
+ - Added Interface Application
10
+ - Added Interface ApplicationPackage
11
+ - Added Interface AutoStorageProperties
12
+ - Added Interface BatchAccount
13
+ - Added Interface Certificate
14
+ - Added Interface CertificateCreateOrUpdateParameters
15
+ - Added Interface CertificateCreateOrUpdateProperties
16
+ - Added Interface CertificateProperties
17
+ - Added Interface DetectorResponse
18
+ - Added Interface EndpointAccessProfile
19
+ - Added Interface IPRule
20
+ - Added Interface NetworkProfile
21
+ - Added Interface Pool
22
+ - Added Interface PrivateEndpointConnection
23
+ - Added Interface PrivateEndpointConnectionDeleteHeaders
24
+ - Added Interface PrivateEndpointConnectionDeleteOptionalParams
25
+ - Added Interface PrivateLinkResource
26
+ - Added Type Alias EndpointAccessDefaultAction
27
+ - Added Type Alias PrivateEndpointConnectionDeleteResponse
28
+ - Interface BatchAccountCreateParameters has a new optional parameter networkProfile
29
+ - Interface BatchAccountUpdateParameters has a new optional parameter networkProfile
30
+ - Interface BatchAccountUpdateParameters has a new optional parameter publicNetworkAccess
31
+
13
32
  ## 7.1.1 (2022-04-11)
14
33
 
15
34
  **features**
package/dist/index.js CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var coreClient = require('@azure/core-client');
6
5
  var tslib = require('tslib');
6
+ var coreClient = require('@azure/core-client');
7
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
9
10
  function _interopNamespace(e) {
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
25
26
  }
26
27
 
27
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
28
30
 
29
31
  /*
30
32
  * Copyright (c) Microsoft Corporation.
@@ -88,6 +90,13 @@ const BatchAccountCreateParameters = {
88
90
  allowedValues: ["Enabled", "Disabled"]
89
91
  }
90
92
  },
93
+ networkProfile: {
94
+ serializedName: "properties.networkProfile",
95
+ type: {
96
+ name: "Composite",
97
+ className: "NetworkProfile"
98
+ }
99
+ },
91
100
  encryption: {
92
101
  serializedName: "properties.encryption",
93
102
  type: {
@@ -177,6 +186,79 @@ const KeyVaultReference = {
177
186
  }
178
187
  }
179
188
  };
189
+ const NetworkProfile = {
190
+ type: {
191
+ name: "Composite",
192
+ className: "NetworkProfile",
193
+ modelProperties: {
194
+ accountAccess: {
195
+ serializedName: "accountAccess",
196
+ type: {
197
+ name: "Composite",
198
+ className: "EndpointAccessProfile"
199
+ }
200
+ },
201
+ nodeManagementAccess: {
202
+ serializedName: "nodeManagementAccess",
203
+ type: {
204
+ name: "Composite",
205
+ className: "EndpointAccessProfile"
206
+ }
207
+ }
208
+ }
209
+ }
210
+ };
211
+ const EndpointAccessProfile = {
212
+ type: {
213
+ name: "Composite",
214
+ className: "EndpointAccessProfile",
215
+ modelProperties: {
216
+ defaultAction: {
217
+ serializedName: "defaultAction",
218
+ required: true,
219
+ type: {
220
+ name: "Enum",
221
+ allowedValues: ["Allow", "Deny"]
222
+ }
223
+ },
224
+ ipRules: {
225
+ serializedName: "ipRules",
226
+ type: {
227
+ name: "Sequence",
228
+ element: {
229
+ type: {
230
+ name: "Composite",
231
+ className: "IPRule"
232
+ }
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
238
+ };
239
+ const IPRule = {
240
+ type: {
241
+ name: "Composite",
242
+ className: "IPRule",
243
+ modelProperties: {
244
+ action: {
245
+ defaultValue: "Allow",
246
+ isConstant: true,
247
+ serializedName: "action",
248
+ type: {
249
+ name: "String"
250
+ }
251
+ },
252
+ value: {
253
+ serializedName: "value",
254
+ required: true,
255
+ type: {
256
+ name: "String"
257
+ }
258
+ }
259
+ }
260
+ }
261
+ };
180
262
  const EncryptionProperties = {
181
263
  type: {
182
264
  name: "Composite",
@@ -518,6 +600,21 @@ const BatchAccountUpdateParameters = {
518
600
  }
519
601
  }
520
602
  }
603
+ },
604
+ publicNetworkAccess: {
605
+ defaultValue: "Enabled",
606
+ serializedName: "properties.publicNetworkAccess",
607
+ type: {
608
+ name: "Enum",
609
+ allowedValues: ["Enabled", "Disabled"]
610
+ }
611
+ },
612
+ networkProfile: {
613
+ serializedName: "properties.networkProfile",
614
+ type: {
615
+ name: "Composite",
616
+ className: "NetworkProfile"
617
+ }
521
618
  }
522
619
  }
523
620
  }
@@ -2693,7 +2790,14 @@ const PrivateEndpointConnection = {
2693
2790
  readOnly: true,
2694
2791
  type: {
2695
2792
  name: "Enum",
2696
- allowedValues: ["Succeeded", "Updating", "Failed"]
2793
+ allowedValues: [
2794
+ "Creating",
2795
+ "Updating",
2796
+ "Deleting",
2797
+ "Succeeded",
2798
+ "Failed",
2799
+ "Cancelled"
2800
+ ]
2697
2801
  }
2698
2802
  }, privateEndpoint: {
2699
2803
  serializedName: "properties.privateEndpoint",
@@ -2701,6 +2805,17 @@ const PrivateEndpointConnection = {
2701
2805
  name: "Composite",
2702
2806
  className: "PrivateEndpoint"
2703
2807
  }
2808
+ }, groupIds: {
2809
+ serializedName: "properties.groupIds",
2810
+ readOnly: true,
2811
+ type: {
2812
+ name: "Sequence",
2813
+ element: {
2814
+ type: {
2815
+ name: "String"
2816
+ }
2817
+ }
2818
+ }
2704
2819
  }, privateLinkServiceConnectionState: {
2705
2820
  serializedName: "properties.privateLinkServiceConnectionState",
2706
2821
  type: {
@@ -3118,6 +3233,12 @@ const BatchAccount = {
3118
3233
  type: {
3119
3234
  name: "String"
3120
3235
  }
3236
+ }, nodeManagementEndpoint: {
3237
+ serializedName: "properties.nodeManagementEndpoint",
3238
+ readOnly: true,
3239
+ type: {
3240
+ name: "String"
3241
+ }
3121
3242
  }, provisioningState: {
3122
3243
  serializedName: "properties.provisioningState",
3123
3244
  readOnly: true,
@@ -3148,12 +3269,17 @@ const BatchAccount = {
3148
3269
  }, publicNetworkAccess: {
3149
3270
  defaultValue: "Enabled",
3150
3271
  serializedName: "properties.publicNetworkAccess",
3151
- readOnly: true,
3152
3272
  nullable: true,
3153
3273
  type: {
3154
3274
  name: "Enum",
3155
3275
  allowedValues: ["Enabled", "Disabled"]
3156
3276
  }
3277
+ }, networkProfile: {
3278
+ serializedName: "properties.networkProfile",
3279
+ type: {
3280
+ name: "Composite",
3281
+ className: "NetworkProfile"
3282
+ }
3157
3283
  }, privateEndpointConnections: {
3158
3284
  serializedName: "properties.privateEndpointConnections",
3159
3285
  readOnly: true,
@@ -3438,6 +3564,26 @@ const PrivateEndpointConnectionUpdateHeaders = {
3438
3564
  }
3439
3565
  }
3440
3566
  };
3567
+ const PrivateEndpointConnectionDeleteHeaders = {
3568
+ type: {
3569
+ name: "Composite",
3570
+ className: "PrivateEndpointConnectionDeleteHeaders",
3571
+ modelProperties: {
3572
+ location: {
3573
+ serializedName: "location",
3574
+ type: {
3575
+ name: "String"
3576
+ }
3577
+ },
3578
+ retryAfter: {
3579
+ serializedName: "retry-after",
3580
+ type: {
3581
+ name: "Number"
3582
+ }
3583
+ }
3584
+ }
3585
+ }
3586
+ };
3441
3587
  const PoolCreateHeaders = {
3442
3588
  type: {
3443
3589
  name: "Composite",
@@ -3535,6 +3681,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
3535
3681
  AutoStorageBaseProperties: AutoStorageBaseProperties,
3536
3682
  ComputeNodeIdentityReference: ComputeNodeIdentityReference,
3537
3683
  KeyVaultReference: KeyVaultReference,
3684
+ NetworkProfile: NetworkProfile,
3685
+ EndpointAccessProfile: EndpointAccessProfile,
3686
+ IPRule: IPRule,
3538
3687
  EncryptionProperties: EncryptionProperties,
3539
3688
  KeyVaultProperties: KeyVaultProperties,
3540
3689
  BatchAccountIdentity: BatchAccountIdentity,
@@ -3637,6 +3786,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
3637
3786
  CertificateGetHeaders: CertificateGetHeaders,
3638
3787
  CertificateCancelDeletionHeaders: CertificateCancelDeletionHeaders,
3639
3788
  PrivateEndpointConnectionUpdateHeaders: PrivateEndpointConnectionUpdateHeaders,
3789
+ PrivateEndpointConnectionDeleteHeaders: PrivateEndpointConnectionDeleteHeaders,
3640
3790
  PoolCreateHeaders: PoolCreateHeaders,
3641
3791
  PoolUpdateHeaders: PoolUpdateHeaders,
3642
3792
  PoolDeleteHeaders: PoolDeleteHeaders,
@@ -3717,7 +3867,7 @@ const accountName = {
3717
3867
  const apiVersion = {
3718
3868
  parameterPath: "apiVersion",
3719
3869
  mapper: {
3720
- defaultValue: "2022-01-01",
3870
+ defaultValue: "2022-06-01",
3721
3871
  isConstant: true,
3722
3872
  serializedName: "api-version",
3723
3873
  type: {
@@ -4155,7 +4305,7 @@ class BatchAccountOperationsImpl {
4155
4305
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
4156
4306
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
4157
4307
  * about creating a pool inside of a virtual network, see
4158
- * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
4308
+ * https://docs.microsoft.com/azure/batch/batch-virtual-network
4159
4309
  * @param resourceGroupName The name of the resource group that contains the Batch account.
4160
4310
  * @param accountName The name of the Batch account.
4161
4311
  * @param options The options parameters.
@@ -4306,7 +4456,7 @@ class BatchAccountOperationsImpl {
4306
4456
  }
4307
4457
  };
4308
4458
  });
4309
- const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, options }, deleteOperationSpec$4);
4459
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, options }, deleteOperationSpec$5);
4310
4460
  const poller = new coreLro.LroEngine(lro, {
4311
4461
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
4312
4462
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
@@ -4412,7 +4562,7 @@ class BatchAccountOperationsImpl {
4412
4562
  * you must make sure your network allows outbound access to these endpoints. Failure to allow access
4413
4563
  * to these endpoints may cause Batch to mark the affected nodes as unusable. For more information
4414
4564
  * about creating a pool inside of a virtual network, see
4415
- * https://docs.microsoft.com/en-us/azure/batch/batch-virtual-network.
4565
+ * https://docs.microsoft.com/azure/batch/batch-virtual-network
4416
4566
  * @param resourceGroupName The name of the resource group that contains the Batch account.
4417
4567
  * @param accountName The name of the Batch account.
4418
4568
  * @param options The options parameters.
@@ -4516,7 +4666,7 @@ const updateOperationSpec$4 = {
4516
4666
  mediaType: "json",
4517
4667
  serializer: serializer$8
4518
4668
  };
4519
- const deleteOperationSpec$4 = {
4669
+ const deleteOperationSpec$5 = {
4520
4670
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}",
4521
4671
  httpMethod: "DELETE",
4522
4672
  responses: {
@@ -4920,7 +5070,7 @@ class ApplicationPackageOperationsImpl {
4920
5070
  * @param options The options parameters.
4921
5071
  */
4922
5072
  delete(resourceGroupName, accountName, applicationName, versionName, options) {
4923
- return this.client.sendOperationRequest({ resourceGroupName, accountName, applicationName, versionName, options }, deleteOperationSpec$3);
5073
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, applicationName, versionName, options }, deleteOperationSpec$4);
4924
5074
  }
4925
5075
  /**
4926
5076
  * Gets information about the specified application package.
@@ -5007,7 +5157,7 @@ const createOperationSpec$3 = {
5007
5157
  mediaType: "json",
5008
5158
  serializer: serializer$7
5009
5159
  };
5010
- const deleteOperationSpec$3 = {
5160
+ const deleteOperationSpec$4 = {
5011
5161
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}/versions/{versionName}",
5012
5162
  httpMethod: "DELETE",
5013
5163
  responses: {
@@ -5183,7 +5333,7 @@ class ApplicationOperationsImpl {
5183
5333
  * @param options The options parameters.
5184
5334
  */
5185
5335
  delete(resourceGroupName, accountName, applicationName, options) {
5186
- return this.client.sendOperationRequest({ resourceGroupName, accountName, applicationName, options }, deleteOperationSpec$2);
5336
+ return this.client.sendOperationRequest({ resourceGroupName, accountName, applicationName, options }, deleteOperationSpec$3);
5187
5337
  }
5188
5338
  /**
5189
5339
  * Gets information about the specified application.
@@ -5252,7 +5402,7 @@ const createOperationSpec$2 = {
5252
5402
  mediaType: "json",
5253
5403
  serializer: serializer$6
5254
5404
  };
5255
- const deleteOperationSpec$2 = {
5405
+ const deleteOperationSpec$3 = {
5256
5406
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/applications/{applicationName}",
5257
5407
  httpMethod: "DELETE",
5258
5408
  responses: {
@@ -5926,7 +6076,7 @@ class CertificateOperationsImpl {
5926
6076
  }
5927
6077
  };
5928
6078
  });
5929
- const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, certificateName, options }, deleteOperationSpec$1);
6079
+ const lro = new LroImpl(sendOperation, { resourceGroupName, accountName, certificateName, options }, deleteOperationSpec$2);
5930
6080
  const poller = new coreLro.LroEngine(lro, {
5931
6081
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
5932
6082
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
@@ -6078,7 +6228,7 @@ const updateOperationSpec$2 = {
6078
6228
  mediaType: "json",
6079
6229
  serializer: serializer$3
6080
6230
  };
6081
- const deleteOperationSpec$1 = {
6231
+ const deleteOperationSpec$2 = {
6082
6232
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
6083
6233
  httpMethod: "DELETE",
6084
6234
  responses: {
@@ -6499,6 +6649,67 @@ class PrivateEndpointConnectionOperationsImpl {
6499
6649
  return poller.pollUntilDone();
6500
6650
  });
6501
6651
  }
6652
+ /**
6653
+ * Deletes the specified private endpoint connection.
6654
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
6655
+ * @param accountName The name of the Batch account.
6656
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique
6657
+ * within the account.
6658
+ * @param options The options parameters.
6659
+ */
6660
+ beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options) {
6661
+ return tslib.__awaiter(this, void 0, void 0, function* () {
6662
+ const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6663
+ return this.client.sendOperationRequest(args, spec);
6664
+ });
6665
+ const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
6666
+ var _a;
6667
+ let currentRawResponse = undefined;
6668
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
6669
+ const callback = (rawResponse, flatResponse) => {
6670
+ currentRawResponse = rawResponse;
6671
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
6672
+ };
6673
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
6674
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
6675
+ return {
6676
+ flatResponse,
6677
+ rawResponse: {
6678
+ statusCode: currentRawResponse.status,
6679
+ body: currentRawResponse.parsedBody,
6680
+ headers: currentRawResponse.headers.toJSON()
6681
+ }
6682
+ };
6683
+ });
6684
+ const lro = new LroImpl(sendOperation, {
6685
+ resourceGroupName,
6686
+ accountName,
6687
+ privateEndpointConnectionName,
6688
+ options
6689
+ }, deleteOperationSpec$1);
6690
+ const poller = new coreLro.LroEngine(lro, {
6691
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
6692
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
6693
+ lroResourceLocationConfig: "azure-async-operation"
6694
+ });
6695
+ yield poller.poll();
6696
+ return poller;
6697
+ });
6698
+ }
6699
+ /**
6700
+ * Deletes the specified private endpoint connection.
6701
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
6702
+ * @param accountName The name of the Batch account.
6703
+ * @param privateEndpointConnectionName The private endpoint connection name. This must be unique
6704
+ * within the account.
6705
+ * @param options The options parameters.
6706
+ */
6707
+ beginDeleteAndWait(resourceGroupName, accountName, privateEndpointConnectionName, options) {
6708
+ return tslib.__awaiter(this, void 0, void 0, function* () {
6709
+ const poller = yield this.beginDelete(resourceGroupName, accountName, privateEndpointConnectionName, options);
6710
+ return poller.pollUntilDone();
6711
+ });
6712
+ }
6502
6713
  /**
6503
6714
  * ListByBatchAccountNext
6504
6715
  * @param resourceGroupName The name of the resource group that contains the Batch account.
@@ -6592,6 +6803,37 @@ const updateOperationSpec$1 = {
6592
6803
  mediaType: "json",
6593
6804
  serializer: serializer$1
6594
6805
  };
6806
+ const deleteOperationSpec$1 = {
6807
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}",
6808
+ httpMethod: "DELETE",
6809
+ responses: {
6810
+ 200: {
6811
+ headersMapper: PrivateEndpointConnectionDeleteHeaders
6812
+ },
6813
+ 201: {
6814
+ headersMapper: PrivateEndpointConnectionDeleteHeaders
6815
+ },
6816
+ 202: {
6817
+ headersMapper: PrivateEndpointConnectionDeleteHeaders
6818
+ },
6819
+ 204: {
6820
+ headersMapper: PrivateEndpointConnectionDeleteHeaders
6821
+ },
6822
+ default: {
6823
+ bodyMapper: CloudError
6824
+ }
6825
+ },
6826
+ queryParameters: [apiVersion],
6827
+ urlParameters: [
6828
+ $host,
6829
+ resourceGroupName,
6830
+ subscriptionId,
6831
+ accountName1,
6832
+ privateEndpointConnectionName
6833
+ ],
6834
+ headerParameters: [accept],
6835
+ serializer: serializer$1
6836
+ };
6595
6837
  const listByBatchAccountNextOperationSpec$1 = {
6596
6838
  path: "{nextLink}",
6597
6839
  httpMethod: "GET",
@@ -7052,7 +7294,7 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7052
7294
  requestContentType: "application/json; charset=utf-8",
7053
7295
  credential: credentials
7054
7296
  };
7055
- const packageDetails = `azsdk-js-arm-batch/7.1.2`;
7297
+ const packageDetails = `azsdk-js-arm-batch/7.2.0`;
7056
7298
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7057
7299
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
7058
7300
  : `${packageDetails}`;
@@ -7063,11 +7305,27 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7063
7305
  userAgentPrefix
7064
7306
  }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
7065
7307
  super(optionsWithDefaults);
7308
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
7309
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
7310
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
7311
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
7312
+ if (!bearerTokenAuthenticationPolicyFound) {
7313
+ this.pipeline.removePolicy({
7314
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
7315
+ });
7316
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
7317
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
7318
+ challengeCallbacks: {
7319
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
7320
+ }
7321
+ }));
7322
+ }
7323
+ }
7066
7324
  // Parameter assignments
7067
7325
  this.subscriptionId = subscriptionId;
7068
7326
  // Assigning values to Constant parameters
7069
7327
  this.$host = options.$host || "https://management.azure.com";
7070
- this.apiVersion = options.apiVersion || "2022-01-01";
7328
+ this.apiVersion = options.apiVersion || "2022-06-01";
7071
7329
  this.batchAccountOperations = new BatchAccountOperationsImpl(this);
7072
7330
  this.applicationPackageOperations = new ApplicationPackageOperationsImpl(this);
7073
7331
  this.applicationOperations = new ApplicationOperationsImpl(this);
@@ -7077,6 +7335,34 @@ class BatchManagementClient extends coreClient__namespace.ServiceClient {
7077
7335
  this.privateLinkResourceOperations = new PrivateLinkResourceOperationsImpl(this);
7078
7336
  this.privateEndpointConnectionOperations = new PrivateEndpointConnectionOperationsImpl(this);
7079
7337
  this.poolOperations = new PoolOperationsImpl(this);
7338
+ this.addCustomApiVersionPolicy(options.apiVersion);
7339
+ }
7340
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
7341
+ addCustomApiVersionPolicy(apiVersion) {
7342
+ if (!apiVersion) {
7343
+ return;
7344
+ }
7345
+ const apiVersionPolicy = {
7346
+ name: "CustomApiVersionPolicy",
7347
+ sendRequest(request, next) {
7348
+ return tslib.__awaiter(this, void 0, void 0, function* () {
7349
+ const param = request.url.split("?");
7350
+ if (param.length > 1) {
7351
+ const newParams = param[1].split("&").map((item) => {
7352
+ if (item.indexOf("api-version") > -1) {
7353
+ return "api-version=" + apiVersion;
7354
+ }
7355
+ else {
7356
+ return item;
7357
+ }
7358
+ });
7359
+ request.url = param[0] + "?" + newParams.join("&");
7360
+ }
7361
+ return next(request);
7362
+ });
7363
+ }
7364
+ };
7365
+ this.pipeline.addPolicy(apiVersionPolicy);
7080
7366
  }
7081
7367
  }
7082
7368