@azure/arm-containerregistry 10.0.0-beta.1 → 10.0.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 (161) hide show
  1. package/CHANGELOG.md +6 -20
  2. package/README.md +4 -0
  3. package/dist/index.js +3431 -7196
  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/src/containerRegistryManagementClient.d.ts +5 -9
  8. package/dist-esm/src/containerRegistryManagementClient.d.ts.map +1 -1
  9. package/dist-esm/src/containerRegistryManagementClient.js +32 -10
  10. package/dist-esm/src/containerRegistryManagementClient.js.map +1 -1
  11. package/dist-esm/src/index.d.ts +0 -1
  12. package/dist-esm/src/index.d.ts.map +1 -1
  13. package/dist-esm/src/index.js +0 -1
  14. package/dist-esm/src/index.js.map +1 -1
  15. package/dist-esm/src/models/index.d.ts +200 -1116
  16. package/dist-esm/src/models/index.d.ts.map +1 -1
  17. package/dist-esm/src/models/index.js +32 -121
  18. package/dist-esm/src/models/index.js.map +1 -1
  19. package/dist-esm/src/models/mappers.d.ts +10 -50
  20. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  21. package/dist-esm/src/models/mappers.js +320 -1560
  22. package/dist-esm/src/models/mappers.js.map +1 -1
  23. package/dist-esm/src/models/parameters.d.ts +6 -21
  24. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  25. package/dist-esm/src/models/parameters.js +38 -158
  26. package/dist-esm/src/models/parameters.js.map +1 -1
  27. package/dist-esm/src/operations/agentPools.d.ts +2 -2
  28. package/dist-esm/src/operations/agentPools.d.ts.map +1 -1
  29. package/dist-esm/src/operations/agentPools.js +2 -2
  30. package/dist-esm/src/operations/agentPools.js.map +1 -1
  31. package/dist-esm/src/operations/index.d.ts +0 -6
  32. package/dist-esm/src/operations/index.d.ts.map +1 -1
  33. package/dist-esm/src/operations/index.js +0 -6
  34. package/dist-esm/src/operations/index.js.map +1 -1
  35. package/dist-esm/src/operations/operations.d.ts +2 -2
  36. package/dist-esm/src/operations/operations.d.ts.map +1 -1
  37. package/dist-esm/src/operations/operations.js.map +1 -1
  38. package/dist-esm/src/operations/privateEndpointConnections.d.ts +2 -2
  39. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
  40. package/dist-esm/src/operations/privateEndpointConnections.js +1 -1
  41. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
  42. package/dist-esm/src/operations/registries.d.ts +11 -19
  43. package/dist-esm/src/operations/registries.d.ts.map +1 -1
  44. package/dist-esm/src/operations/registries.js +31 -84
  45. package/dist-esm/src/operations/registries.js.map +1 -1
  46. package/dist-esm/src/operations/replications.d.ts +2 -2
  47. package/dist-esm/src/operations/replications.d.ts.map +1 -1
  48. package/dist-esm/src/operations/replications.js +2 -2
  49. package/dist-esm/src/operations/replications.js.map +1 -1
  50. package/dist-esm/src/operations/runs.d.ts +2 -2
  51. package/dist-esm/src/operations/runs.d.ts.map +1 -1
  52. package/dist-esm/src/operations/runs.js +3 -3
  53. package/dist-esm/src/operations/runs.js.map +1 -1
  54. package/dist-esm/src/operations/taskRuns.d.ts +2 -2
  55. package/dist-esm/src/operations/taskRuns.d.ts.map +1 -1
  56. package/dist-esm/src/operations/taskRuns.js +2 -2
  57. package/dist-esm/src/operations/taskRuns.js.map +1 -1
  58. package/dist-esm/src/operations/tasks.d.ts +2 -2
  59. package/dist-esm/src/operations/tasks.d.ts.map +1 -1
  60. package/dist-esm/src/operations/tasks.js +2 -2
  61. package/dist-esm/src/operations/tasks.js.map +1 -1
  62. package/dist-esm/src/operations/webhooks.d.ts +2 -2
  63. package/dist-esm/src/operations/webhooks.d.ts.map +1 -1
  64. package/dist-esm/src/operations/webhooks.js +2 -2
  65. package/dist-esm/src/operations/webhooks.js.map +1 -1
  66. package/dist-esm/src/operationsInterfaces/index.d.ts +0 -6
  67. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  68. package/dist-esm/src/operationsInterfaces/index.js +0 -6
  69. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  70. package/dist-esm/src/operationsInterfaces/registries.d.ts +9 -17
  71. package/dist-esm/src/operationsInterfaces/registries.d.ts.map +1 -1
  72. package/dist-esm/test/containerregistry_examples.d.ts +3 -1
  73. package/dist-esm/test/containerregistry_examples.d.ts.map +1 -1
  74. package/dist-esm/test/containerregistry_examples.js +89 -146
  75. package/dist-esm/test/containerregistry_examples.js.map +1 -1
  76. package/package.json +5 -4
  77. package/review/arm-containerregistry.api.md +17 -815
  78. package/src/containerRegistryManagementClient.ts +44 -27
  79. package/src/index.ts +0 -1
  80. package/src/models/index.ts +323 -1385
  81. package/src/models/mappers.ts +1508 -2838
  82. package/src/models/parameters.ts +39 -184
  83. package/src/operations/agentPools.ts +5 -5
  84. package/src/operations/index.ts +0 -6
  85. package/src/operations/operations.ts +3 -3
  86. package/src/operations/privateEndpointConnections.ts +4 -4
  87. package/src/operations/registries.ts +45 -129
  88. package/src/operations/replications.ts +5 -5
  89. package/src/operations/runs.ts +6 -6
  90. package/src/operations/taskRuns.ts +5 -5
  91. package/src/operations/tasks.ts +5 -5
  92. package/src/operations/webhooks.ts +5 -5
  93. package/src/operationsInterfaces/index.ts +0 -6
  94. package/src/operationsInterfaces/registries.ts +15 -34
  95. package/types/arm-containerregistry.d.ts +135 -1592
  96. package/types/tsdoc-metadata.json +1 -1
  97. package/dist-esm/src/containerRegistryManagementClientContext.d.ts +0 -15
  98. package/dist-esm/src/containerRegistryManagementClientContext.d.ts.map +0 -1
  99. package/dist-esm/src/containerRegistryManagementClientContext.js +0 -48
  100. package/dist-esm/src/containerRegistryManagementClientContext.js.map +0 -1
  101. package/dist-esm/src/operations/connectedRegistries.d.ts +0 -115
  102. package/dist-esm/src/operations/connectedRegistries.d.ts.map +0 -1
  103. package/dist-esm/src/operations/connectedRegistries.js +0 -503
  104. package/dist-esm/src/operations/connectedRegistries.js.map +0 -1
  105. package/dist-esm/src/operations/exportPipelines.d.ts +0 -81
  106. package/dist-esm/src/operations/exportPipelines.d.ts.map +0 -1
  107. package/dist-esm/src/operations/exportPipelines.js +0 -316
  108. package/dist-esm/src/operations/exportPipelines.js.map +0 -1
  109. package/dist-esm/src/operations/importPipelines.d.ts +0 -81
  110. package/dist-esm/src/operations/importPipelines.d.ts.map +0 -1
  111. package/dist-esm/src/operations/importPipelines.js +0 -316
  112. package/dist-esm/src/operations/importPipelines.js.map +0 -1
  113. package/dist-esm/src/operations/pipelineRuns.d.ts +0 -81
  114. package/dist-esm/src/operations/pipelineRuns.d.ts.map +0 -1
  115. package/dist-esm/src/operations/pipelineRuns.js +0 -316
  116. package/dist-esm/src/operations/pipelineRuns.js.map +0 -1
  117. package/dist-esm/src/operations/scopeMaps.d.ts +0 -99
  118. package/dist-esm/src/operations/scopeMaps.d.ts.map +0 -1
  119. package/dist-esm/src/operations/scopeMaps.js +0 -405
  120. package/dist-esm/src/operations/scopeMaps.js.map +0 -1
  121. package/dist-esm/src/operations/tokens.d.ts +0 -99
  122. package/dist-esm/src/operations/tokens.d.ts.map +0 -1
  123. package/dist-esm/src/operations/tokens.js +0 -405
  124. package/dist-esm/src/operations/tokens.js.map +0 -1
  125. package/dist-esm/src/operationsInterfaces/connectedRegistries.d.ts +0 -90
  126. package/dist-esm/src/operationsInterfaces/connectedRegistries.d.ts.map +0 -1
  127. package/dist-esm/src/operationsInterfaces/connectedRegistries.js +0 -9
  128. package/dist-esm/src/operationsInterfaces/connectedRegistries.js.map +0 -1
  129. package/dist-esm/src/operationsInterfaces/exportPipelines.d.ts +0 -56
  130. package/dist-esm/src/operationsInterfaces/exportPipelines.d.ts.map +0 -1
  131. package/dist-esm/src/operationsInterfaces/exportPipelines.js +0 -9
  132. package/dist-esm/src/operationsInterfaces/exportPipelines.js.map +0 -1
  133. package/dist-esm/src/operationsInterfaces/importPipelines.d.ts +0 -56
  134. package/dist-esm/src/operationsInterfaces/importPipelines.d.ts.map +0 -1
  135. package/dist-esm/src/operationsInterfaces/importPipelines.js +0 -9
  136. package/dist-esm/src/operationsInterfaces/importPipelines.js.map +0 -1
  137. package/dist-esm/src/operationsInterfaces/pipelineRuns.d.ts +0 -56
  138. package/dist-esm/src/operationsInterfaces/pipelineRuns.d.ts.map +0 -1
  139. package/dist-esm/src/operationsInterfaces/pipelineRuns.js +0 -9
  140. package/dist-esm/src/operationsInterfaces/pipelineRuns.js.map +0 -1
  141. package/dist-esm/src/operationsInterfaces/scopeMaps.d.ts +0 -74
  142. package/dist-esm/src/operationsInterfaces/scopeMaps.d.ts.map +0 -1
  143. package/dist-esm/src/operationsInterfaces/scopeMaps.js +0 -9
  144. package/dist-esm/src/operationsInterfaces/scopeMaps.js.map +0 -1
  145. package/dist-esm/src/operationsInterfaces/tokens.d.ts +0 -74
  146. package/dist-esm/src/operationsInterfaces/tokens.d.ts.map +0 -1
  147. package/dist-esm/src/operationsInterfaces/tokens.js +0 -9
  148. package/dist-esm/src/operationsInterfaces/tokens.js.map +0 -1
  149. package/src/containerRegistryManagementClientContext.ts +0 -68
  150. package/src/operations/connectedRegistries.ts +0 -718
  151. package/src/operations/exportPipelines.ts +0 -449
  152. package/src/operations/importPipelines.ts +0 -449
  153. package/src/operations/pipelineRuns.ts +0 -449
  154. package/src/operations/scopeMaps.ts +0 -584
  155. package/src/operations/tokens.ts +0 -578
  156. package/src/operationsInterfaces/connectedRegistries.ts +0 -174
  157. package/src/operationsInterfaces/exportPipelines.ts +0 -109
  158. package/src/operationsInterfaces/importPipelines.ts +0 -109
  159. package/src/operationsInterfaces/pipelineRuns.ts +0 -109
  160. package/src/operationsInterfaces/scopeMaps.ts +0 -147
  161. package/src/operationsInterfaces/tokens.ts +0 -141
@@ -1,578 +0,0 @@
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 { Tokens } 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 { ContainerRegistryManagementClientContext } from "../containerRegistryManagementClientContext";
15
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
- import { LroImpl } from "../lroImpl";
17
- import {
18
- Token,
19
- TokensListNextOptionalParams,
20
- TokensListOptionalParams,
21
- TokensListResponse,
22
- TokensGetOptionalParams,
23
- TokensGetResponse,
24
- TokensCreateOptionalParams,
25
- TokensCreateResponse,
26
- TokensDeleteOptionalParams,
27
- TokenUpdateParameters,
28
- TokensUpdateOptionalParams,
29
- TokensUpdateResponse,
30
- TokensListNextResponse
31
- } from "../models";
32
-
33
- /// <reference lib="esnext.asynciterable" />
34
- /** Class containing Tokens operations. */
35
- export class TokensImpl implements Tokens {
36
- private readonly client: ContainerRegistryManagementClientContext;
37
-
38
- /**
39
- * Initialize a new instance of the class Tokens class.
40
- * @param client Reference to the service client
41
- */
42
- constructor(client: ContainerRegistryManagementClientContext) {
43
- this.client = client;
44
- }
45
-
46
- /**
47
- * Lists all the tokens for the specified container registry.
48
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
49
- * @param registryName The name of the container registry.
50
- * @param options The options parameters.
51
- */
52
- public list(
53
- resourceGroupName: string,
54
- registryName: string,
55
- options?: TokensListOptionalParams
56
- ): PagedAsyncIterableIterator<Token> {
57
- const iter = this.listPagingAll(resourceGroupName, registryName, options);
58
- return {
59
- next() {
60
- return iter.next();
61
- },
62
- [Symbol.asyncIterator]() {
63
- return this;
64
- },
65
- byPage: () => {
66
- return this.listPagingPage(resourceGroupName, registryName, options);
67
- }
68
- };
69
- }
70
-
71
- private async *listPagingPage(
72
- resourceGroupName: string,
73
- registryName: string,
74
- options?: TokensListOptionalParams
75
- ): AsyncIterableIterator<Token[]> {
76
- let result = await this._list(resourceGroupName, registryName, options);
77
- yield result.value || [];
78
- let continuationToken = result.nextLink;
79
- while (continuationToken) {
80
- result = await this._listNext(
81
- resourceGroupName,
82
- registryName,
83
- continuationToken,
84
- options
85
- );
86
- continuationToken = result.nextLink;
87
- yield result.value || [];
88
- }
89
- }
90
-
91
- private async *listPagingAll(
92
- resourceGroupName: string,
93
- registryName: string,
94
- options?: TokensListOptionalParams
95
- ): AsyncIterableIterator<Token> {
96
- for await (const page of this.listPagingPage(
97
- resourceGroupName,
98
- registryName,
99
- options
100
- )) {
101
- yield* page;
102
- }
103
- }
104
-
105
- /**
106
- * Lists all the tokens for the specified container registry.
107
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
108
- * @param registryName The name of the container registry.
109
- * @param options The options parameters.
110
- */
111
- private _list(
112
- resourceGroupName: string,
113
- registryName: string,
114
- options?: TokensListOptionalParams
115
- ): Promise<TokensListResponse> {
116
- return this.client.sendOperationRequest(
117
- { resourceGroupName, registryName, options },
118
- listOperationSpec
119
- );
120
- }
121
-
122
- /**
123
- * Gets the properties of the specified token.
124
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
125
- * @param registryName The name of the container registry.
126
- * @param tokenName The name of the token.
127
- * @param options The options parameters.
128
- */
129
- get(
130
- resourceGroupName: string,
131
- registryName: string,
132
- tokenName: string,
133
- options?: TokensGetOptionalParams
134
- ): Promise<TokensGetResponse> {
135
- return this.client.sendOperationRequest(
136
- { resourceGroupName, registryName, tokenName, options },
137
- getOperationSpec
138
- );
139
- }
140
-
141
- /**
142
- * Creates a token for a container registry with the specified parameters.
143
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
144
- * @param registryName The name of the container registry.
145
- * @param tokenName The name of the token.
146
- * @param tokenCreateParameters The parameters for creating a token.
147
- * @param options The options parameters.
148
- */
149
- async beginCreate(
150
- resourceGroupName: string,
151
- registryName: string,
152
- tokenName: string,
153
- tokenCreateParameters: Token,
154
- options?: TokensCreateOptionalParams
155
- ): Promise<
156
- PollerLike<PollOperationState<TokensCreateResponse>, TokensCreateResponse>
157
- > {
158
- const directSendOperation = async (
159
- args: coreClient.OperationArguments,
160
- spec: coreClient.OperationSpec
161
- ): Promise<TokensCreateResponse> => {
162
- return this.client.sendOperationRequest(args, spec);
163
- };
164
- const sendOperation = async (
165
- args: coreClient.OperationArguments,
166
- spec: coreClient.OperationSpec
167
- ) => {
168
- let currentRawResponse:
169
- | coreClient.FullOperationResponse
170
- | undefined = undefined;
171
- const providedCallback = args.options?.onResponse;
172
- const callback: coreClient.RawResponseCallback = (
173
- rawResponse: coreClient.FullOperationResponse,
174
- flatResponse: unknown
175
- ) => {
176
- currentRawResponse = rawResponse;
177
- providedCallback?.(rawResponse, flatResponse);
178
- };
179
- const updatedArgs = {
180
- ...args,
181
- options: {
182
- ...args.options,
183
- onResponse: callback
184
- }
185
- };
186
- const flatResponse = await directSendOperation(updatedArgs, spec);
187
- return {
188
- flatResponse,
189
- rawResponse: {
190
- statusCode: currentRawResponse!.status,
191
- body: currentRawResponse!.parsedBody,
192
- headers: currentRawResponse!.headers.toJSON()
193
- }
194
- };
195
- };
196
-
197
- const lro = new LroImpl(
198
- sendOperation,
199
- {
200
- resourceGroupName,
201
- registryName,
202
- tokenName,
203
- tokenCreateParameters,
204
- options
205
- },
206
- createOperationSpec
207
- );
208
- return new LroEngine(lro, {
209
- resumeFrom: options?.resumeFrom,
210
- intervalInMs: options?.updateIntervalInMs
211
- });
212
- }
213
-
214
- /**
215
- * Creates a token for a container registry with the specified parameters.
216
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
217
- * @param registryName The name of the container registry.
218
- * @param tokenName The name of the token.
219
- * @param tokenCreateParameters The parameters for creating a token.
220
- * @param options The options parameters.
221
- */
222
- async beginCreateAndWait(
223
- resourceGroupName: string,
224
- registryName: string,
225
- tokenName: string,
226
- tokenCreateParameters: Token,
227
- options?: TokensCreateOptionalParams
228
- ): Promise<TokensCreateResponse> {
229
- const poller = await this.beginCreate(
230
- resourceGroupName,
231
- registryName,
232
- tokenName,
233
- tokenCreateParameters,
234
- options
235
- );
236
- return poller.pollUntilDone();
237
- }
238
-
239
- /**
240
- * Deletes a token from a container registry.
241
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
242
- * @param registryName The name of the container registry.
243
- * @param tokenName The name of the token.
244
- * @param options The options parameters.
245
- */
246
- async beginDelete(
247
- resourceGroupName: string,
248
- registryName: string,
249
- tokenName: string,
250
- options?: TokensDeleteOptionalParams
251
- ): Promise<PollerLike<PollOperationState<void>, void>> {
252
- const directSendOperation = async (
253
- args: coreClient.OperationArguments,
254
- spec: coreClient.OperationSpec
255
- ): Promise<void> => {
256
- return this.client.sendOperationRequest(args, spec);
257
- };
258
- const sendOperation = async (
259
- args: coreClient.OperationArguments,
260
- spec: coreClient.OperationSpec
261
- ) => {
262
- let currentRawResponse:
263
- | coreClient.FullOperationResponse
264
- | undefined = undefined;
265
- const providedCallback = args.options?.onResponse;
266
- const callback: coreClient.RawResponseCallback = (
267
- rawResponse: coreClient.FullOperationResponse,
268
- flatResponse: unknown
269
- ) => {
270
- currentRawResponse = rawResponse;
271
- providedCallback?.(rawResponse, flatResponse);
272
- };
273
- const updatedArgs = {
274
- ...args,
275
- options: {
276
- ...args.options,
277
- onResponse: callback
278
- }
279
- };
280
- const flatResponse = await directSendOperation(updatedArgs, spec);
281
- return {
282
- flatResponse,
283
- rawResponse: {
284
- statusCode: currentRawResponse!.status,
285
- body: currentRawResponse!.parsedBody,
286
- headers: currentRawResponse!.headers.toJSON()
287
- }
288
- };
289
- };
290
-
291
- const lro = new LroImpl(
292
- sendOperation,
293
- { resourceGroupName, registryName, tokenName, options },
294
- deleteOperationSpec
295
- );
296
- return new LroEngine(lro, {
297
- resumeFrom: options?.resumeFrom,
298
- intervalInMs: options?.updateIntervalInMs
299
- });
300
- }
301
-
302
- /**
303
- * Deletes a token from a container registry.
304
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
305
- * @param registryName The name of the container registry.
306
- * @param tokenName The name of the token.
307
- * @param options The options parameters.
308
- */
309
- async beginDeleteAndWait(
310
- resourceGroupName: string,
311
- registryName: string,
312
- tokenName: string,
313
- options?: TokensDeleteOptionalParams
314
- ): Promise<void> {
315
- const poller = await this.beginDelete(
316
- resourceGroupName,
317
- registryName,
318
- tokenName,
319
- options
320
- );
321
- return poller.pollUntilDone();
322
- }
323
-
324
- /**
325
- * Updates a token with the specified parameters.
326
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
327
- * @param registryName The name of the container registry.
328
- * @param tokenName The name of the token.
329
- * @param tokenUpdateParameters The parameters for updating a token.
330
- * @param options The options parameters.
331
- */
332
- async beginUpdate(
333
- resourceGroupName: string,
334
- registryName: string,
335
- tokenName: string,
336
- tokenUpdateParameters: TokenUpdateParameters,
337
- options?: TokensUpdateOptionalParams
338
- ): Promise<
339
- PollerLike<PollOperationState<TokensUpdateResponse>, TokensUpdateResponse>
340
- > {
341
- const directSendOperation = async (
342
- args: coreClient.OperationArguments,
343
- spec: coreClient.OperationSpec
344
- ): Promise<TokensUpdateResponse> => {
345
- return this.client.sendOperationRequest(args, spec);
346
- };
347
- const sendOperation = async (
348
- args: coreClient.OperationArguments,
349
- spec: coreClient.OperationSpec
350
- ) => {
351
- let currentRawResponse:
352
- | coreClient.FullOperationResponse
353
- | undefined = undefined;
354
- const providedCallback = args.options?.onResponse;
355
- const callback: coreClient.RawResponseCallback = (
356
- rawResponse: coreClient.FullOperationResponse,
357
- flatResponse: unknown
358
- ) => {
359
- currentRawResponse = rawResponse;
360
- providedCallback?.(rawResponse, flatResponse);
361
- };
362
- const updatedArgs = {
363
- ...args,
364
- options: {
365
- ...args.options,
366
- onResponse: callback
367
- }
368
- };
369
- const flatResponse = await directSendOperation(updatedArgs, spec);
370
- return {
371
- flatResponse,
372
- rawResponse: {
373
- statusCode: currentRawResponse!.status,
374
- body: currentRawResponse!.parsedBody,
375
- headers: currentRawResponse!.headers.toJSON()
376
- }
377
- };
378
- };
379
-
380
- const lro = new LroImpl(
381
- sendOperation,
382
- {
383
- resourceGroupName,
384
- registryName,
385
- tokenName,
386
- tokenUpdateParameters,
387
- options
388
- },
389
- updateOperationSpec
390
- );
391
- return new LroEngine(lro, {
392
- resumeFrom: options?.resumeFrom,
393
- intervalInMs: options?.updateIntervalInMs
394
- });
395
- }
396
-
397
- /**
398
- * Updates a token with the specified parameters.
399
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
400
- * @param registryName The name of the container registry.
401
- * @param tokenName The name of the token.
402
- * @param tokenUpdateParameters The parameters for updating a token.
403
- * @param options The options parameters.
404
- */
405
- async beginUpdateAndWait(
406
- resourceGroupName: string,
407
- registryName: string,
408
- tokenName: string,
409
- tokenUpdateParameters: TokenUpdateParameters,
410
- options?: TokensUpdateOptionalParams
411
- ): Promise<TokensUpdateResponse> {
412
- const poller = await this.beginUpdate(
413
- resourceGroupName,
414
- registryName,
415
- tokenName,
416
- tokenUpdateParameters,
417
- options
418
- );
419
- return poller.pollUntilDone();
420
- }
421
-
422
- /**
423
- * ListNext
424
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
425
- * @param registryName The name of the container registry.
426
- * @param nextLink The nextLink from the previous successful call to the List method.
427
- * @param options The options parameters.
428
- */
429
- private _listNext(
430
- resourceGroupName: string,
431
- registryName: string,
432
- nextLink: string,
433
- options?: TokensListNextOptionalParams
434
- ): Promise<TokensListNextResponse> {
435
- return this.client.sendOperationRequest(
436
- { resourceGroupName, registryName, nextLink, options },
437
- listNextOperationSpec
438
- );
439
- }
440
- }
441
- // Operation Specifications
442
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
443
-
444
- const listOperationSpec: coreClient.OperationSpec = {
445
- path:
446
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens",
447
- httpMethod: "GET",
448
- responses: {
449
- 200: {
450
- bodyMapper: Mappers.TokenListResult
451
- }
452
- },
453
- queryParameters: [Parameters.apiVersion],
454
- urlParameters: [
455
- Parameters.$host,
456
- Parameters.subscriptionId,
457
- Parameters.resourceGroupName,
458
- Parameters.registryName
459
- ],
460
- headerParameters: [Parameters.accept],
461
- serializer
462
- };
463
- const getOperationSpec: coreClient.OperationSpec = {
464
- path:
465
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}",
466
- httpMethod: "GET",
467
- responses: {
468
- 200: {
469
- bodyMapper: Mappers.Token
470
- }
471
- },
472
- queryParameters: [Parameters.apiVersion],
473
- urlParameters: [
474
- Parameters.$host,
475
- Parameters.subscriptionId,
476
- Parameters.resourceGroupName,
477
- Parameters.registryName,
478
- Parameters.tokenName
479
- ],
480
- headerParameters: [Parameters.accept],
481
- serializer
482
- };
483
- const createOperationSpec: coreClient.OperationSpec = {
484
- path:
485
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}",
486
- httpMethod: "PUT",
487
- responses: {
488
- 200: {
489
- bodyMapper: Mappers.Token
490
- },
491
- 201: {
492
- bodyMapper: Mappers.Token
493
- },
494
- 202: {
495
- bodyMapper: Mappers.Token
496
- },
497
- 204: {
498
- bodyMapper: Mappers.Token
499
- }
500
- },
501
- requestBody: Parameters.tokenCreateParameters,
502
- queryParameters: [Parameters.apiVersion],
503
- urlParameters: [
504
- Parameters.$host,
505
- Parameters.subscriptionId,
506
- Parameters.resourceGroupName,
507
- Parameters.registryName,
508
- Parameters.tokenName
509
- ],
510
- headerParameters: [Parameters.accept, Parameters.contentType],
511
- mediaType: "json",
512
- serializer
513
- };
514
- const deleteOperationSpec: coreClient.OperationSpec = {
515
- path:
516
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}",
517
- httpMethod: "DELETE",
518
- responses: { 200: {}, 201: {}, 202: {}, 204: {} },
519
- queryParameters: [Parameters.apiVersion],
520
- urlParameters: [
521
- Parameters.$host,
522
- Parameters.subscriptionId,
523
- Parameters.resourceGroupName,
524
- Parameters.registryName,
525
- Parameters.tokenName
526
- ],
527
- serializer
528
- };
529
- const updateOperationSpec: coreClient.OperationSpec = {
530
- path:
531
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}",
532
- httpMethod: "PATCH",
533
- responses: {
534
- 200: {
535
- bodyMapper: Mappers.Token
536
- },
537
- 201: {
538
- bodyMapper: Mappers.Token
539
- },
540
- 202: {
541
- bodyMapper: Mappers.Token
542
- },
543
- 204: {
544
- bodyMapper: Mappers.Token
545
- }
546
- },
547
- requestBody: Parameters.tokenUpdateParameters,
548
- queryParameters: [Parameters.apiVersion],
549
- urlParameters: [
550
- Parameters.$host,
551
- Parameters.subscriptionId,
552
- Parameters.resourceGroupName,
553
- Parameters.registryName,
554
- Parameters.tokenName
555
- ],
556
- headerParameters: [Parameters.accept, Parameters.contentType],
557
- mediaType: "json",
558
- serializer
559
- };
560
- const listNextOperationSpec: coreClient.OperationSpec = {
561
- path: "{nextLink}",
562
- httpMethod: "GET",
563
- responses: {
564
- 200: {
565
- bodyMapper: Mappers.TokenListResult
566
- }
567
- },
568
- queryParameters: [Parameters.apiVersion],
569
- urlParameters: [
570
- Parameters.$host,
571
- Parameters.subscriptionId,
572
- Parameters.resourceGroupName,
573
- Parameters.registryName,
574
- Parameters.nextLink
575
- ],
576
- headerParameters: [Parameters.accept],
577
- serializer
578
- };