@azure/arm-batch 4.0.0 → 7.0.0-beta.1

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 (251) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +75 -77
  4. package/dist/index.js +6873 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/batchManagementClient.d.ts +24 -0
  9. package/dist-esm/src/batchManagementClient.d.ts.map +1 -0
  10. package/dist-esm/src/batchManagementClient.js +31 -0
  11. package/dist-esm/src/batchManagementClient.js.map +1 -0
  12. package/dist-esm/src/batchManagementClientContext.d.ts +17 -0
  13. package/dist-esm/src/batchManagementClientContext.d.ts.map +1 -0
  14. package/dist-esm/src/batchManagementClientContext.js +50 -0
  15. package/dist-esm/src/batchManagementClientContext.js.map +1 -0
  16. package/dist-esm/src/index.d.ts +6 -0
  17. package/dist-esm/src/index.d.ts.map +1 -0
  18. package/dist-esm/src/index.js +13 -0
  19. package/dist-esm/src/index.js.map +1 -0
  20. package/dist-esm/src/lroImpl.d.ts +16 -0
  21. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  22. package/dist-esm/src/lroImpl.js +29 -0
  23. package/dist-esm/src/lroImpl.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +1780 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +9 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +112 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +2357 -1248
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +34 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +303 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/applicationOperations.d.ts +71 -0
  37. package/dist-esm/src/operations/applicationOperations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/applicationOperations.js +269 -0
  39. package/dist-esm/src/operations/applicationOperations.js.map +1 -0
  40. package/dist-esm/src/operations/applicationPackageOperations.d.ts +83 -0
  41. package/dist-esm/src/operations/applicationPackageOperations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/applicationPackageOperations.js +294 -0
  43. package/dist-esm/src/operations/applicationPackageOperations.js.map +1 -0
  44. package/dist-esm/src/operations/batchAccountOperations.d.ts +171 -0
  45. package/dist-esm/src/operations/batchAccountOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/batchAccountOperations.js +681 -0
  47. package/dist-esm/src/operations/batchAccountOperations.js.map +1 -0
  48. package/dist-esm/src/operations/certificateOperations.d.ts +106 -0
  49. package/dist-esm/src/operations/certificateOperations.d.ts.map +1 -0
  50. package/dist-esm/src/operations/certificateOperations.js +388 -0
  51. package/dist-esm/src/operations/certificateOperations.js.map +1 -0
  52. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  53. package/dist-esm/src/operations/index.d.ts.map +1 -0
  54. package/dist-esm/src/operations/index.js +17 -0
  55. package/dist-esm/src/operations/index.js.map +1 -0
  56. package/dist-esm/src/operations/location.d.ts +71 -0
  57. package/dist-esm/src/operations/location.d.ts.map +1 -0
  58. package/dist-esm/src/operations/location.js +316 -0
  59. package/dist-esm/src/operations/location.js.map +1 -0
  60. package/dist-esm/src/operations/operations.d.ts +32 -0
  61. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/operations.js +120 -0
  63. package/dist-esm/src/operations/operations.js.map +1 -0
  64. package/dist-esm/src/operations/poolOperations.d.ts +103 -0
  65. package/dist-esm/src/operations/poolOperations.d.ts.map +1 -0
  66. package/dist-esm/src/operations/poolOperations.js +410 -0
  67. package/dist-esm/src/operations/poolOperations.js.map +1 -0
  68. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts +70 -0
  69. package/dist-esm/src/operations/privateEndpointConnectionOperations.d.ts.map +1 -0
  70. package/dist-esm/src/operations/privateEndpointConnectionOperations.js +278 -0
  71. package/dist-esm/src/operations/privateEndpointConnectionOperations.js.map +1 -0
  72. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts +47 -0
  73. package/dist-esm/src/operations/privateLinkResourceOperations.d.ts.map +1 -0
  74. package/dist-esm/src/operations/privateLinkResourceOperations.js +170 -0
  75. package/dist-esm/src/operations/privateLinkResourceOperations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts +46 -0
  77. package/dist-esm/src/operationsInterfaces/applicationOperations.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/applicationOperations.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/applicationOperations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts +56 -0
  81. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/applicationPackageOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts +112 -0
  85. package/dist-esm/src/operationsInterfaces/batchAccountOperations.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/batchAccountOperations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts +81 -0
  89. package/dist-esm/src/operationsInterfaces/certificateOperations.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/certificateOperations.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/certificateOperations.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/index.d.ts +10 -0
  93. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/index.js +17 -0
  95. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/location.d.ts +31 -0
  97. package/dist-esm/src/operationsInterfaces/location.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/location.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/location.js.map +1 -0
  100. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  101. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  102. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  103. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  104. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts +78 -0
  105. package/dist-esm/src/operationsInterfaces/poolOperations.d.ts.map +1 -0
  106. package/dist-esm/src/operationsInterfaces/poolOperations.js +9 -0
  107. package/dist-esm/src/operationsInterfaces/poolOperations.js.map +1 -0
  108. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts +45 -0
  109. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.d.ts.map +1 -0
  110. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js +9 -0
  111. package/dist-esm/src/operationsInterfaces/privateEndpointConnectionOperations.js.map +1 -0
  112. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts +22 -0
  113. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.d.ts.map +1 -0
  114. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js +9 -0
  115. package/dist-esm/src/operationsInterfaces/privateLinkResourceOperations.js.map +1 -0
  116. package/dist-esm/test/sampleTest.d.ts +4 -0
  117. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  118. package/dist-esm/test/sampleTest.js +479 -0
  119. package/dist-esm/test/sampleTest.js.map +1 -0
  120. package/package.json +71 -34
  121. package/review/arm-batch.api.md +1459 -0
  122. package/rollup.config.js +184 -27
  123. package/src/batchManagementClient.ts +75 -0
  124. package/src/batchManagementClientContext.ts +71 -0
  125. package/src/index.ts +13 -0
  126. package/src/lroImpl.ts +34 -0
  127. package/src/models/index.ts +2045 -0
  128. package/{lib → src}/models/mappers.ts +2413 -1223
  129. package/src/models/parameters.ts +351 -0
  130. package/src/operations/applicationOperations.ts +357 -0
  131. package/src/operations/applicationPackageOperations.ts +410 -0
  132. package/src/operations/batchAccountOperations.ts +901 -0
  133. package/src/operations/certificateOperations.ts +527 -0
  134. package/{lib → src}/operations/index.ts +5 -5
  135. package/src/operations/location.ts +413 -0
  136. package/src/operations/operations.ts +137 -0
  137. package/src/operations/poolOperations.ts +560 -0
  138. package/src/operations/privateEndpointConnectionOperations.ts +388 -0
  139. package/src/operations/privateLinkResourceOperations.ts +235 -0
  140. package/src/operationsInterfaces/applicationOperations.ts +90 -0
  141. package/src/operationsInterfaces/applicationPackageOperations.ts +106 -0
  142. package/src/operationsInterfaces/batchAccountOperations.ts +196 -0
  143. package/src/operationsInterfaces/certificateOperations.ts +139 -0
  144. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +6 -6
  145. package/src/operationsInterfaces/location.ts +62 -0
  146. package/src/operationsInterfaces/operations.ts +22 -0
  147. package/src/operationsInterfaces/poolOperations.ts +142 -0
  148. package/src/operationsInterfaces/privateEndpointConnectionOperations.ts +87 -0
  149. package/src/operationsInterfaces/privateLinkResourceOperations.ts +45 -0
  150. package/tsconfig.json +4 -4
  151. package/types/arm-batch.d.ts +2528 -0
  152. package/types/tsdoc-metadata.json +11 -0
  153. package/dist/arm-batch.js +0 -4689
  154. package/dist/arm-batch.js.map +0 -1
  155. package/dist/arm-batch.min.js +0 -1
  156. package/dist/arm-batch.min.js.map +0 -1
  157. package/esm/batchManagementClient.d.ts +0 -25
  158. package/esm/batchManagementClient.d.ts.map +0 -1
  159. package/esm/batchManagementClient.js +0 -40
  160. package/esm/batchManagementClient.js.map +0 -1
  161. package/esm/batchManagementClientContext.d.ts +0 -17
  162. package/esm/batchManagementClientContext.d.ts.map +0 -1
  163. package/esm/batchManagementClientContext.js +0 -57
  164. package/esm/batchManagementClientContext.js.map +0 -1
  165. package/esm/models/applicationOperationsMappers.d.ts +0 -2
  166. package/esm/models/applicationOperationsMappers.d.ts.map +0 -1
  167. package/esm/models/applicationOperationsMappers.js +0 -11
  168. package/esm/models/applicationOperationsMappers.js.map +0 -1
  169. package/esm/models/applicationPackageOperationsMappers.d.ts +0 -2
  170. package/esm/models/applicationPackageOperationsMappers.d.ts.map +0 -1
  171. package/esm/models/applicationPackageOperationsMappers.js +0 -11
  172. package/esm/models/applicationPackageOperationsMappers.js.map +0 -1
  173. package/esm/models/batchAccountOperationsMappers.d.ts +0 -2
  174. package/esm/models/batchAccountOperationsMappers.d.ts.map +0 -1
  175. package/esm/models/batchAccountOperationsMappers.js +0 -11
  176. package/esm/models/batchAccountOperationsMappers.js.map +0 -1
  177. package/esm/models/certificateOperationsMappers.d.ts +0 -2
  178. package/esm/models/certificateOperationsMappers.d.ts.map +0 -1
  179. package/esm/models/certificateOperationsMappers.js +0 -11
  180. package/esm/models/certificateOperationsMappers.js.map +0 -1
  181. package/esm/models/index.d.ts +0 -3108
  182. package/esm/models/index.d.ts.map +0 -1
  183. package/esm/models/index.js +0 -10
  184. package/esm/models/index.js.map +0 -1
  185. package/esm/models/locationMappers.d.ts +0 -2
  186. package/esm/models/locationMappers.d.ts.map +0 -1
  187. package/esm/models/locationMappers.js +0 -11
  188. package/esm/models/locationMappers.js.map +0 -1
  189. package/esm/models/mappers.d.ts +0 -76
  190. package/esm/models/mappers.d.ts.map +0 -1
  191. package/esm/models/mappers.js.map +0 -1
  192. package/esm/models/operationsMappers.d.ts +0 -2
  193. package/esm/models/operationsMappers.d.ts.map +0 -1
  194. package/esm/models/operationsMappers.js +0 -11
  195. package/esm/models/operationsMappers.js.map +0 -1
  196. package/esm/models/parameters.d.ts +0 -18
  197. package/esm/models/parameters.d.ts.map +0 -1
  198. package/esm/models/parameters.js +0 -196
  199. package/esm/models/parameters.js.map +0 -1
  200. package/esm/models/poolOperationsMappers.d.ts +0 -2
  201. package/esm/models/poolOperationsMappers.d.ts.map +0 -1
  202. package/esm/models/poolOperationsMappers.js +0 -11
  203. package/esm/models/poolOperationsMappers.js.map +0 -1
  204. package/esm/operations/applicationOperations.d.ts +0 -151
  205. package/esm/operations/applicationOperations.d.ts.map +0 -1
  206. package/esm/operations/applicationOperations.js +0 -226
  207. package/esm/operations/applicationOperations.js.map +0 -1
  208. package/esm/operations/applicationPackageOperations.d.ts +0 -124
  209. package/esm/operations/applicationPackageOperations.d.ts.map +0 -1
  210. package/esm/operations/applicationPackageOperations.js +0 -171
  211. package/esm/operations/applicationPackageOperations.js.map +0 -1
  212. package/esm/operations/batchAccountOperations.d.ts +0 -246
  213. package/esm/operations/batchAccountOperations.d.ts.map +0 -1
  214. package/esm/operations/batchAccountOperations.js +0 -426
  215. package/esm/operations/batchAccountOperations.js.map +0 -1
  216. package/esm/operations/certificateOperations.d.ts +0 -198
  217. package/esm/operations/certificateOperations.d.ts.map +0 -1
  218. package/esm/operations/certificateOperations.js +0 -326
  219. package/esm/operations/certificateOperations.js.map +0 -1
  220. package/esm/operations/index.d.ts.map +0 -1
  221. package/esm/operations/index.js.map +0 -1
  222. package/esm/operations/location.d.ts +0 -52
  223. package/esm/operations/location.d.ts.map +0 -1
  224. package/esm/operations/location.js +0 -93
  225. package/esm/operations/location.js.map +0 -1
  226. package/esm/operations/operations.d.ts +0 -46
  227. package/esm/operations/operations.d.ts.map +0 -1
  228. package/esm/operations/operations.js +0 -77
  229. package/esm/operations/operations.js.map +0 -1
  230. package/esm/operations/poolOperations.d.ts +0 -199
  231. package/esm/operations/poolOperations.d.ts.map +0 -1
  232. package/esm/operations/poolOperations.js +0 -352
  233. package/esm/operations/poolOperations.js.map +0 -1
  234. package/lib/batchManagementClient.ts +0 -55
  235. package/lib/batchManagementClientContext.ts +0 -63
  236. package/lib/models/applicationOperationsMappers.ts +0 -19
  237. package/lib/models/applicationPackageOperationsMappers.ts +0 -16
  238. package/lib/models/batchAccountOperationsMappers.ts +0 -61
  239. package/lib/models/certificateOperationsMappers.ts +0 -60
  240. package/lib/models/index.ts +0 -3252
  241. package/lib/models/locationMappers.ts +0 -17
  242. package/lib/models/operationsMappers.ts +0 -17
  243. package/lib/models/parameters.ts +0 -198
  244. package/lib/models/poolOperationsMappers.ts +0 -61
  245. package/lib/operations/applicationOperations.ts +0 -399
  246. package/lib/operations/applicationPackageOperations.ts +0 -307
  247. package/lib/operations/batchAccountOperations.ts +0 -683
  248. package/lib/operations/certificateOperations.ts +0 -510
  249. package/lib/operations/location.ts +0 -147
  250. package/lib/operations/operations.ts +0 -123
  251. package/lib/operations/poolOperations.ts +0 -550
@@ -0,0 +1,527 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { CertificateOperations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
+ import * as Parameters from "../models/parameters";
14
+ import { BatchManagementClientContext } from "../batchManagementClientContext";
15
+ import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ Certificate,
19
+ CertificateListByBatchAccountNextOptionalParams,
20
+ CertificateListByBatchAccountOptionalParams,
21
+ CertificateListByBatchAccountResponse,
22
+ CertificateCreateOrUpdateParameters,
23
+ CertificateCreateOptionalParams,
24
+ CertificateCreateResponse,
25
+ CertificateUpdateOptionalParams,
26
+ CertificateUpdateResponse,
27
+ CertificateDeleteOptionalParams,
28
+ CertificateGetOptionalParams,
29
+ CertificateGetResponse,
30
+ CertificateCancelDeletionOptionalParams,
31
+ CertificateCancelDeletionResponse,
32
+ CertificateListByBatchAccountNextResponse
33
+ } from "../models";
34
+
35
+ /// <reference lib="esnext.asynciterable" />
36
+ /** Class containing CertificateOperations operations. */
37
+ export class CertificateOperationsImpl implements CertificateOperations {
38
+ private readonly client: BatchManagementClientContext;
39
+
40
+ /**
41
+ * Initialize a new instance of the class CertificateOperations class.
42
+ * @param client Reference to the service client
43
+ */
44
+ constructor(client: BatchManagementClientContext) {
45
+ this.client = client;
46
+ }
47
+
48
+ /**
49
+ * Lists all of the certificates in the specified account.
50
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
51
+ * @param accountName The name of the Batch account.
52
+ * @param options The options parameters.
53
+ */
54
+ public listByBatchAccount(
55
+ resourceGroupName: string,
56
+ accountName: string,
57
+ options?: CertificateListByBatchAccountOptionalParams
58
+ ): PagedAsyncIterableIterator<Certificate> {
59
+ const iter = this.listByBatchAccountPagingAll(
60
+ resourceGroupName,
61
+ accountName,
62
+ options
63
+ );
64
+ return {
65
+ next() {
66
+ return iter.next();
67
+ },
68
+ [Symbol.asyncIterator]() {
69
+ return this;
70
+ },
71
+ byPage: () => {
72
+ return this.listByBatchAccountPagingPage(
73
+ resourceGroupName,
74
+ accountName,
75
+ options
76
+ );
77
+ }
78
+ };
79
+ }
80
+
81
+ private async *listByBatchAccountPagingPage(
82
+ resourceGroupName: string,
83
+ accountName: string,
84
+ options?: CertificateListByBatchAccountOptionalParams
85
+ ): AsyncIterableIterator<Certificate[]> {
86
+ let result = await this._listByBatchAccount(
87
+ resourceGroupName,
88
+ accountName,
89
+ options
90
+ );
91
+ yield result.value || [];
92
+ let continuationToken = result.nextLink;
93
+ while (continuationToken) {
94
+ result = await this._listByBatchAccountNext(
95
+ resourceGroupName,
96
+ accountName,
97
+ continuationToken,
98
+ options
99
+ );
100
+ continuationToken = result.nextLink;
101
+ yield result.value || [];
102
+ }
103
+ }
104
+
105
+ private async *listByBatchAccountPagingAll(
106
+ resourceGroupName: string,
107
+ accountName: string,
108
+ options?: CertificateListByBatchAccountOptionalParams
109
+ ): AsyncIterableIterator<Certificate> {
110
+ for await (const page of this.listByBatchAccountPagingPage(
111
+ resourceGroupName,
112
+ accountName,
113
+ options
114
+ )) {
115
+ yield* page;
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Lists all of the certificates in the specified account.
121
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
122
+ * @param accountName The name of the Batch account.
123
+ * @param options The options parameters.
124
+ */
125
+ private _listByBatchAccount(
126
+ resourceGroupName: string,
127
+ accountName: string,
128
+ options?: CertificateListByBatchAccountOptionalParams
129
+ ): Promise<CertificateListByBatchAccountResponse> {
130
+ return this.client.sendOperationRequest(
131
+ { resourceGroupName, accountName, options },
132
+ listByBatchAccountOperationSpec
133
+ );
134
+ }
135
+
136
+ /**
137
+ * Creates a new certificate inside the specified account.
138
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
139
+ * @param accountName The name of the Batch account.
140
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
141
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
142
+ * SHA1-a3d1c5.
143
+ * @param parameters Additional parameters for certificate creation.
144
+ * @param options The options parameters.
145
+ */
146
+ create(
147
+ resourceGroupName: string,
148
+ accountName: string,
149
+ certificateName: string,
150
+ parameters: CertificateCreateOrUpdateParameters,
151
+ options?: CertificateCreateOptionalParams
152
+ ): Promise<CertificateCreateResponse> {
153
+ return this.client.sendOperationRequest(
154
+ { resourceGroupName, accountName, certificateName, parameters, options },
155
+ createOperationSpec
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Updates the properties of an existing certificate.
161
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
162
+ * @param accountName The name of the Batch account.
163
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
164
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
165
+ * SHA1-a3d1c5.
166
+ * @param parameters Certificate entity to update.
167
+ * @param options The options parameters.
168
+ */
169
+ update(
170
+ resourceGroupName: string,
171
+ accountName: string,
172
+ certificateName: string,
173
+ parameters: CertificateCreateOrUpdateParameters,
174
+ options?: CertificateUpdateOptionalParams
175
+ ): Promise<CertificateUpdateResponse> {
176
+ return this.client.sendOperationRequest(
177
+ { resourceGroupName, accountName, certificateName, parameters, options },
178
+ updateOperationSpec
179
+ );
180
+ }
181
+
182
+ /**
183
+ * Deletes the specified certificate.
184
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
185
+ * @param accountName The name of the Batch account.
186
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
187
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
188
+ * SHA1-a3d1c5.
189
+ * @param options The options parameters.
190
+ */
191
+ async beginDelete(
192
+ resourceGroupName: string,
193
+ accountName: string,
194
+ certificateName: string,
195
+ options?: CertificateDeleteOptionalParams
196
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
197
+ const directSendOperation = async (
198
+ args: coreClient.OperationArguments,
199
+ spec: coreClient.OperationSpec
200
+ ): Promise<void> => {
201
+ return this.client.sendOperationRequest(args, spec);
202
+ };
203
+ const sendOperation = async (
204
+ args: coreClient.OperationArguments,
205
+ spec: coreClient.OperationSpec
206
+ ) => {
207
+ let currentRawResponse:
208
+ | coreClient.FullOperationResponse
209
+ | undefined = undefined;
210
+ const providedCallback = args.options?.onResponse;
211
+ const callback: coreClient.RawResponseCallback = (
212
+ rawResponse: coreClient.FullOperationResponse,
213
+ flatResponse: unknown
214
+ ) => {
215
+ currentRawResponse = rawResponse;
216
+ providedCallback?.(rawResponse, flatResponse);
217
+ };
218
+ const updatedArgs = {
219
+ ...args,
220
+ options: {
221
+ ...args.options,
222
+ onResponse: callback
223
+ }
224
+ };
225
+ const flatResponse = await directSendOperation(updatedArgs, spec);
226
+ return {
227
+ flatResponse,
228
+ rawResponse: {
229
+ statusCode: currentRawResponse!.status,
230
+ body: currentRawResponse!.parsedBody,
231
+ headers: currentRawResponse!.headers.toJSON()
232
+ }
233
+ };
234
+ };
235
+
236
+ const lro = new LroImpl(
237
+ sendOperation,
238
+ { resourceGroupName, accountName, certificateName, options },
239
+ deleteOperationSpec
240
+ );
241
+ return new LroEngine(lro, {
242
+ resumeFrom: options?.resumeFrom,
243
+ intervalInMs: options?.updateIntervalInMs,
244
+ lroResourceLocationConfig: "location"
245
+ });
246
+ }
247
+
248
+ /**
249
+ * Deletes the specified certificate.
250
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
251
+ * @param accountName The name of the Batch account.
252
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
253
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
254
+ * SHA1-a3d1c5.
255
+ * @param options The options parameters.
256
+ */
257
+ async beginDeleteAndWait(
258
+ resourceGroupName: string,
259
+ accountName: string,
260
+ certificateName: string,
261
+ options?: CertificateDeleteOptionalParams
262
+ ): Promise<void> {
263
+ const poller = await this.beginDelete(
264
+ resourceGroupName,
265
+ accountName,
266
+ certificateName,
267
+ options
268
+ );
269
+ return poller.pollUntilDone();
270
+ }
271
+
272
+ /**
273
+ * Gets information about the specified certificate.
274
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
275
+ * @param accountName The name of the Batch account.
276
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
277
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
278
+ * SHA1-a3d1c5.
279
+ * @param options The options parameters.
280
+ */
281
+ get(
282
+ resourceGroupName: string,
283
+ accountName: string,
284
+ certificateName: string,
285
+ options?: CertificateGetOptionalParams
286
+ ): Promise<CertificateGetResponse> {
287
+ return this.client.sendOperationRequest(
288
+ { resourceGroupName, accountName, certificateName, options },
289
+ getOperationSpec
290
+ );
291
+ }
292
+
293
+ /**
294
+ * If you try to delete a certificate that is being used by a pool or compute node, the status of the
295
+ * certificate changes to deleteFailed. If you decide that you want to continue using the certificate,
296
+ * you can use this operation to set the status of the certificate back to active. If you intend to
297
+ * delete the certificate, you do not need to run this operation after the deletion failed. You must
298
+ * make sure that the certificate is not being used by any resources, and then you can try again to
299
+ * delete the certificate.
300
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
301
+ * @param accountName The name of the Batch account.
302
+ * @param certificateName The identifier for the certificate. This must be made up of algorithm and
303
+ * thumbprint separated by a dash, and must match the certificate data in the request. For example
304
+ * SHA1-a3d1c5.
305
+ * @param options The options parameters.
306
+ */
307
+ cancelDeletion(
308
+ resourceGroupName: string,
309
+ accountName: string,
310
+ certificateName: string,
311
+ options?: CertificateCancelDeletionOptionalParams
312
+ ): Promise<CertificateCancelDeletionResponse> {
313
+ return this.client.sendOperationRequest(
314
+ { resourceGroupName, accountName, certificateName, options },
315
+ cancelDeletionOperationSpec
316
+ );
317
+ }
318
+
319
+ /**
320
+ * ListByBatchAccountNext
321
+ * @param resourceGroupName The name of the resource group that contains the Batch account.
322
+ * @param accountName The name of the Batch account.
323
+ * @param nextLink The nextLink from the previous successful call to the ListByBatchAccount method.
324
+ * @param options The options parameters.
325
+ */
326
+ private _listByBatchAccountNext(
327
+ resourceGroupName: string,
328
+ accountName: string,
329
+ nextLink: string,
330
+ options?: CertificateListByBatchAccountNextOptionalParams
331
+ ): Promise<CertificateListByBatchAccountNextResponse> {
332
+ return this.client.sendOperationRequest(
333
+ { resourceGroupName, accountName, nextLink, options },
334
+ listByBatchAccountNextOperationSpec
335
+ );
336
+ }
337
+ }
338
+ // Operation Specifications
339
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
340
+
341
+ const listByBatchAccountOperationSpec: coreClient.OperationSpec = {
342
+ path:
343
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates",
344
+ httpMethod: "GET",
345
+ responses: {
346
+ 200: {
347
+ bodyMapper: Mappers.ListCertificatesResult
348
+ },
349
+ default: {
350
+ bodyMapper: Mappers.CloudError
351
+ }
352
+ },
353
+ queryParameters: [
354
+ Parameters.apiVersion,
355
+ Parameters.maxresults,
356
+ Parameters.filter,
357
+ Parameters.select
358
+ ],
359
+ urlParameters: [
360
+ Parameters.$host,
361
+ Parameters.resourceGroupName,
362
+ Parameters.subscriptionId,
363
+ Parameters.accountName1
364
+ ],
365
+ headerParameters: [Parameters.accept],
366
+ serializer
367
+ };
368
+ const createOperationSpec: coreClient.OperationSpec = {
369
+ path:
370
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
371
+ httpMethod: "PUT",
372
+ responses: {
373
+ 200: {
374
+ bodyMapper: Mappers.Certificate,
375
+ headersMapper: Mappers.CertificateCreateHeaders
376
+ },
377
+ default: {
378
+ bodyMapper: Mappers.CloudError
379
+ }
380
+ },
381
+ requestBody: Parameters.parameters8,
382
+ queryParameters: [Parameters.apiVersion],
383
+ urlParameters: [
384
+ Parameters.$host,
385
+ Parameters.resourceGroupName,
386
+ Parameters.subscriptionId,
387
+ Parameters.accountName1,
388
+ Parameters.certificateName
389
+ ],
390
+ headerParameters: [
391
+ Parameters.contentType,
392
+ Parameters.accept,
393
+ Parameters.ifMatch,
394
+ Parameters.ifNoneMatch
395
+ ],
396
+ mediaType: "json",
397
+ serializer
398
+ };
399
+ const updateOperationSpec: coreClient.OperationSpec = {
400
+ path:
401
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
402
+ httpMethod: "PATCH",
403
+ responses: {
404
+ 200: {
405
+ bodyMapper: Mappers.Certificate,
406
+ headersMapper: Mappers.CertificateUpdateHeaders
407
+ },
408
+ default: {
409
+ bodyMapper: Mappers.CloudError
410
+ }
411
+ },
412
+ requestBody: Parameters.parameters8,
413
+ queryParameters: [Parameters.apiVersion],
414
+ urlParameters: [
415
+ Parameters.$host,
416
+ Parameters.resourceGroupName,
417
+ Parameters.subscriptionId,
418
+ Parameters.accountName1,
419
+ Parameters.certificateName
420
+ ],
421
+ headerParameters: [
422
+ Parameters.contentType,
423
+ Parameters.accept,
424
+ Parameters.ifMatch
425
+ ],
426
+ mediaType: "json",
427
+ serializer
428
+ };
429
+ const deleteOperationSpec: coreClient.OperationSpec = {
430
+ path:
431
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
432
+ httpMethod: "DELETE",
433
+ responses: {
434
+ 200: {},
435
+ 201: {},
436
+ 202: {},
437
+ 204: {},
438
+ default: {
439
+ bodyMapper: Mappers.CloudError
440
+ }
441
+ },
442
+ queryParameters: [Parameters.apiVersion],
443
+ urlParameters: [
444
+ Parameters.$host,
445
+ Parameters.resourceGroupName,
446
+ Parameters.subscriptionId,
447
+ Parameters.accountName1,
448
+ Parameters.certificateName
449
+ ],
450
+ headerParameters: [Parameters.accept],
451
+ serializer
452
+ };
453
+ const getOperationSpec: coreClient.OperationSpec = {
454
+ path:
455
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}",
456
+ httpMethod: "GET",
457
+ responses: {
458
+ 200: {
459
+ bodyMapper: Mappers.Certificate,
460
+ headersMapper: Mappers.CertificateGetHeaders
461
+ },
462
+ default: {
463
+ bodyMapper: Mappers.CloudError
464
+ }
465
+ },
466
+ queryParameters: [Parameters.apiVersion],
467
+ urlParameters: [
468
+ Parameters.$host,
469
+ Parameters.resourceGroupName,
470
+ Parameters.subscriptionId,
471
+ Parameters.accountName1,
472
+ Parameters.certificateName
473
+ ],
474
+ headerParameters: [Parameters.accept],
475
+ serializer
476
+ };
477
+ const cancelDeletionOperationSpec: coreClient.OperationSpec = {
478
+ path:
479
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Batch/batchAccounts/{accountName}/certificates/{certificateName}/cancelDelete",
480
+ httpMethod: "POST",
481
+ responses: {
482
+ 200: {
483
+ bodyMapper: Mappers.Certificate,
484
+ headersMapper: Mappers.CertificateCancelDeletionHeaders
485
+ },
486
+ default: {
487
+ bodyMapper: Mappers.CloudError
488
+ }
489
+ },
490
+ queryParameters: [Parameters.apiVersion],
491
+ urlParameters: [
492
+ Parameters.$host,
493
+ Parameters.resourceGroupName,
494
+ Parameters.subscriptionId,
495
+ Parameters.accountName1,
496
+ Parameters.certificateName
497
+ ],
498
+ headerParameters: [Parameters.accept],
499
+ serializer
500
+ };
501
+ const listByBatchAccountNextOperationSpec: coreClient.OperationSpec = {
502
+ path: "{nextLink}",
503
+ httpMethod: "GET",
504
+ responses: {
505
+ 200: {
506
+ bodyMapper: Mappers.ListCertificatesResult
507
+ },
508
+ default: {
509
+ bodyMapper: Mappers.CloudError
510
+ }
511
+ },
512
+ queryParameters: [
513
+ Parameters.apiVersion,
514
+ Parameters.maxresults,
515
+ Parameters.filter,
516
+ Parameters.select
517
+ ],
518
+ urlParameters: [
519
+ Parameters.$host,
520
+ Parameters.resourceGroupName,
521
+ Parameters.subscriptionId,
522
+ Parameters.accountName1,
523
+ Parameters.nextLink
524
+ ],
525
+ headerParameters: [Parameters.accept],
526
+ serializer
527
+ };
@@ -1,11 +1,9 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
9
  export * from "./batchAccountOperations";
@@ -14,4 +12,6 @@ export * from "./applicationOperations";
14
12
  export * from "./location";
15
13
  export * from "./operations";
16
14
  export * from "./certificateOperations";
15
+ export * from "./privateLinkResourceOperations";
16
+ export * from "./privateEndpointConnectionOperations";
17
17
  export * from "./poolOperations";