@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,584 +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 { ScopeMaps } 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
- ScopeMap,
19
- ScopeMapsListNextOptionalParams,
20
- ScopeMapsListOptionalParams,
21
- ScopeMapsListResponse,
22
- ScopeMapsGetOptionalParams,
23
- ScopeMapsGetResponse,
24
- ScopeMapsCreateOptionalParams,
25
- ScopeMapsCreateResponse,
26
- ScopeMapsDeleteOptionalParams,
27
- ScopeMapUpdateParameters,
28
- ScopeMapsUpdateOptionalParams,
29
- ScopeMapsUpdateResponse,
30
- ScopeMapsListNextResponse
31
- } from "../models";
32
-
33
- /// <reference lib="esnext.asynciterable" />
34
- /** Class containing ScopeMaps operations. */
35
- export class ScopeMapsImpl implements ScopeMaps {
36
- private readonly client: ContainerRegistryManagementClientContext;
37
-
38
- /**
39
- * Initialize a new instance of the class ScopeMaps 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 scope maps 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?: ScopeMapsListOptionalParams
56
- ): PagedAsyncIterableIterator<ScopeMap> {
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?: ScopeMapsListOptionalParams
75
- ): AsyncIterableIterator<ScopeMap[]> {
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?: ScopeMapsListOptionalParams
95
- ): AsyncIterableIterator<ScopeMap> {
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 scope maps 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?: ScopeMapsListOptionalParams
115
- ): Promise<ScopeMapsListResponse> {
116
- return this.client.sendOperationRequest(
117
- { resourceGroupName, registryName, options },
118
- listOperationSpec
119
- );
120
- }
121
-
122
- /**
123
- * Gets the properties of the specified scope map.
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 scopeMapName The name of the scope map.
127
- * @param options The options parameters.
128
- */
129
- get(
130
- resourceGroupName: string,
131
- registryName: string,
132
- scopeMapName: string,
133
- options?: ScopeMapsGetOptionalParams
134
- ): Promise<ScopeMapsGetResponse> {
135
- return this.client.sendOperationRequest(
136
- { resourceGroupName, registryName, scopeMapName, options },
137
- getOperationSpec
138
- );
139
- }
140
-
141
- /**
142
- * Creates a scope map 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 scopeMapName The name of the scope map.
146
- * @param scopeMapCreateParameters The parameters for creating a scope map.
147
- * @param options The options parameters.
148
- */
149
- async beginCreate(
150
- resourceGroupName: string,
151
- registryName: string,
152
- scopeMapName: string,
153
- scopeMapCreateParameters: ScopeMap,
154
- options?: ScopeMapsCreateOptionalParams
155
- ): Promise<
156
- PollerLike<
157
- PollOperationState<ScopeMapsCreateResponse>,
158
- ScopeMapsCreateResponse
159
- >
160
- > {
161
- const directSendOperation = async (
162
- args: coreClient.OperationArguments,
163
- spec: coreClient.OperationSpec
164
- ): Promise<ScopeMapsCreateResponse> => {
165
- return this.client.sendOperationRequest(args, spec);
166
- };
167
- const sendOperation = async (
168
- args: coreClient.OperationArguments,
169
- spec: coreClient.OperationSpec
170
- ) => {
171
- let currentRawResponse:
172
- | coreClient.FullOperationResponse
173
- | undefined = undefined;
174
- const providedCallback = args.options?.onResponse;
175
- const callback: coreClient.RawResponseCallback = (
176
- rawResponse: coreClient.FullOperationResponse,
177
- flatResponse: unknown
178
- ) => {
179
- currentRawResponse = rawResponse;
180
- providedCallback?.(rawResponse, flatResponse);
181
- };
182
- const updatedArgs = {
183
- ...args,
184
- options: {
185
- ...args.options,
186
- onResponse: callback
187
- }
188
- };
189
- const flatResponse = await directSendOperation(updatedArgs, spec);
190
- return {
191
- flatResponse,
192
- rawResponse: {
193
- statusCode: currentRawResponse!.status,
194
- body: currentRawResponse!.parsedBody,
195
- headers: currentRawResponse!.headers.toJSON()
196
- }
197
- };
198
- };
199
-
200
- const lro = new LroImpl(
201
- sendOperation,
202
- {
203
- resourceGroupName,
204
- registryName,
205
- scopeMapName,
206
- scopeMapCreateParameters,
207
- options
208
- },
209
- createOperationSpec
210
- );
211
- return new LroEngine(lro, {
212
- resumeFrom: options?.resumeFrom,
213
- intervalInMs: options?.updateIntervalInMs
214
- });
215
- }
216
-
217
- /**
218
- * Creates a scope map for a container registry with the specified parameters.
219
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
220
- * @param registryName The name of the container registry.
221
- * @param scopeMapName The name of the scope map.
222
- * @param scopeMapCreateParameters The parameters for creating a scope map.
223
- * @param options The options parameters.
224
- */
225
- async beginCreateAndWait(
226
- resourceGroupName: string,
227
- registryName: string,
228
- scopeMapName: string,
229
- scopeMapCreateParameters: ScopeMap,
230
- options?: ScopeMapsCreateOptionalParams
231
- ): Promise<ScopeMapsCreateResponse> {
232
- const poller = await this.beginCreate(
233
- resourceGroupName,
234
- registryName,
235
- scopeMapName,
236
- scopeMapCreateParameters,
237
- options
238
- );
239
- return poller.pollUntilDone();
240
- }
241
-
242
- /**
243
- * Deletes a scope map from a container registry.
244
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
245
- * @param registryName The name of the container registry.
246
- * @param scopeMapName The name of the scope map.
247
- * @param options The options parameters.
248
- */
249
- async beginDelete(
250
- resourceGroupName: string,
251
- registryName: string,
252
- scopeMapName: string,
253
- options?: ScopeMapsDeleteOptionalParams
254
- ): Promise<PollerLike<PollOperationState<void>, void>> {
255
- const directSendOperation = async (
256
- args: coreClient.OperationArguments,
257
- spec: coreClient.OperationSpec
258
- ): Promise<void> => {
259
- return this.client.sendOperationRequest(args, spec);
260
- };
261
- const sendOperation = async (
262
- args: coreClient.OperationArguments,
263
- spec: coreClient.OperationSpec
264
- ) => {
265
- let currentRawResponse:
266
- | coreClient.FullOperationResponse
267
- | undefined = undefined;
268
- const providedCallback = args.options?.onResponse;
269
- const callback: coreClient.RawResponseCallback = (
270
- rawResponse: coreClient.FullOperationResponse,
271
- flatResponse: unknown
272
- ) => {
273
- currentRawResponse = rawResponse;
274
- providedCallback?.(rawResponse, flatResponse);
275
- };
276
- const updatedArgs = {
277
- ...args,
278
- options: {
279
- ...args.options,
280
- onResponse: callback
281
- }
282
- };
283
- const flatResponse = await directSendOperation(updatedArgs, spec);
284
- return {
285
- flatResponse,
286
- rawResponse: {
287
- statusCode: currentRawResponse!.status,
288
- body: currentRawResponse!.parsedBody,
289
- headers: currentRawResponse!.headers.toJSON()
290
- }
291
- };
292
- };
293
-
294
- const lro = new LroImpl(
295
- sendOperation,
296
- { resourceGroupName, registryName, scopeMapName, options },
297
- deleteOperationSpec
298
- );
299
- return new LroEngine(lro, {
300
- resumeFrom: options?.resumeFrom,
301
- intervalInMs: options?.updateIntervalInMs
302
- });
303
- }
304
-
305
- /**
306
- * Deletes a scope map from a container registry.
307
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
308
- * @param registryName The name of the container registry.
309
- * @param scopeMapName The name of the scope map.
310
- * @param options The options parameters.
311
- */
312
- async beginDeleteAndWait(
313
- resourceGroupName: string,
314
- registryName: string,
315
- scopeMapName: string,
316
- options?: ScopeMapsDeleteOptionalParams
317
- ): Promise<void> {
318
- const poller = await this.beginDelete(
319
- resourceGroupName,
320
- registryName,
321
- scopeMapName,
322
- options
323
- );
324
- return poller.pollUntilDone();
325
- }
326
-
327
- /**
328
- * Updates a scope map with the specified parameters.
329
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
330
- * @param registryName The name of the container registry.
331
- * @param scopeMapName The name of the scope map.
332
- * @param scopeMapUpdateParameters The parameters for updating a scope map.
333
- * @param options The options parameters.
334
- */
335
- async beginUpdate(
336
- resourceGroupName: string,
337
- registryName: string,
338
- scopeMapName: string,
339
- scopeMapUpdateParameters: ScopeMapUpdateParameters,
340
- options?: ScopeMapsUpdateOptionalParams
341
- ): Promise<
342
- PollerLike<
343
- PollOperationState<ScopeMapsUpdateResponse>,
344
- ScopeMapsUpdateResponse
345
- >
346
- > {
347
- const directSendOperation = async (
348
- args: coreClient.OperationArguments,
349
- spec: coreClient.OperationSpec
350
- ): Promise<ScopeMapsUpdateResponse> => {
351
- return this.client.sendOperationRequest(args, spec);
352
- };
353
- const sendOperation = async (
354
- args: coreClient.OperationArguments,
355
- spec: coreClient.OperationSpec
356
- ) => {
357
- let currentRawResponse:
358
- | coreClient.FullOperationResponse
359
- | undefined = undefined;
360
- const providedCallback = args.options?.onResponse;
361
- const callback: coreClient.RawResponseCallback = (
362
- rawResponse: coreClient.FullOperationResponse,
363
- flatResponse: unknown
364
- ) => {
365
- currentRawResponse = rawResponse;
366
- providedCallback?.(rawResponse, flatResponse);
367
- };
368
- const updatedArgs = {
369
- ...args,
370
- options: {
371
- ...args.options,
372
- onResponse: callback
373
- }
374
- };
375
- const flatResponse = await directSendOperation(updatedArgs, spec);
376
- return {
377
- flatResponse,
378
- rawResponse: {
379
- statusCode: currentRawResponse!.status,
380
- body: currentRawResponse!.parsedBody,
381
- headers: currentRawResponse!.headers.toJSON()
382
- }
383
- };
384
- };
385
-
386
- const lro = new LroImpl(
387
- sendOperation,
388
- {
389
- resourceGroupName,
390
- registryName,
391
- scopeMapName,
392
- scopeMapUpdateParameters,
393
- options
394
- },
395
- updateOperationSpec
396
- );
397
- return new LroEngine(lro, {
398
- resumeFrom: options?.resumeFrom,
399
- intervalInMs: options?.updateIntervalInMs
400
- });
401
- }
402
-
403
- /**
404
- * Updates a scope map with the specified parameters.
405
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
406
- * @param registryName The name of the container registry.
407
- * @param scopeMapName The name of the scope map.
408
- * @param scopeMapUpdateParameters The parameters for updating a scope map.
409
- * @param options The options parameters.
410
- */
411
- async beginUpdateAndWait(
412
- resourceGroupName: string,
413
- registryName: string,
414
- scopeMapName: string,
415
- scopeMapUpdateParameters: ScopeMapUpdateParameters,
416
- options?: ScopeMapsUpdateOptionalParams
417
- ): Promise<ScopeMapsUpdateResponse> {
418
- const poller = await this.beginUpdate(
419
- resourceGroupName,
420
- registryName,
421
- scopeMapName,
422
- scopeMapUpdateParameters,
423
- options
424
- );
425
- return poller.pollUntilDone();
426
- }
427
-
428
- /**
429
- * ListNext
430
- * @param resourceGroupName The name of the resource group to which the container registry belongs.
431
- * @param registryName The name of the container registry.
432
- * @param nextLink The nextLink from the previous successful call to the List method.
433
- * @param options The options parameters.
434
- */
435
- private _listNext(
436
- resourceGroupName: string,
437
- registryName: string,
438
- nextLink: string,
439
- options?: ScopeMapsListNextOptionalParams
440
- ): Promise<ScopeMapsListNextResponse> {
441
- return this.client.sendOperationRequest(
442
- { resourceGroupName, registryName, nextLink, options },
443
- listNextOperationSpec
444
- );
445
- }
446
- }
447
- // Operation Specifications
448
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
449
-
450
- const listOperationSpec: coreClient.OperationSpec = {
451
- path:
452
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps",
453
- httpMethod: "GET",
454
- responses: {
455
- 200: {
456
- bodyMapper: Mappers.ScopeMapListResult
457
- }
458
- },
459
- queryParameters: [Parameters.apiVersion],
460
- urlParameters: [
461
- Parameters.$host,
462
- Parameters.subscriptionId,
463
- Parameters.resourceGroupName,
464
- Parameters.registryName
465
- ],
466
- headerParameters: [Parameters.accept],
467
- serializer
468
- };
469
- const getOperationSpec: coreClient.OperationSpec = {
470
- path:
471
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}",
472
- httpMethod: "GET",
473
- responses: {
474
- 200: {
475
- bodyMapper: Mappers.ScopeMap
476
- }
477
- },
478
- queryParameters: [Parameters.apiVersion],
479
- urlParameters: [
480
- Parameters.$host,
481
- Parameters.subscriptionId,
482
- Parameters.resourceGroupName,
483
- Parameters.registryName,
484
- Parameters.scopeMapName
485
- ],
486
- headerParameters: [Parameters.accept],
487
- serializer
488
- };
489
- const createOperationSpec: coreClient.OperationSpec = {
490
- path:
491
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}",
492
- httpMethod: "PUT",
493
- responses: {
494
- 200: {
495
- bodyMapper: Mappers.ScopeMap
496
- },
497
- 201: {
498
- bodyMapper: Mappers.ScopeMap
499
- },
500
- 202: {
501
- bodyMapper: Mappers.ScopeMap
502
- },
503
- 204: {
504
- bodyMapper: Mappers.ScopeMap
505
- }
506
- },
507
- requestBody: Parameters.scopeMapCreateParameters,
508
- queryParameters: [Parameters.apiVersion],
509
- urlParameters: [
510
- Parameters.$host,
511
- Parameters.subscriptionId,
512
- Parameters.resourceGroupName,
513
- Parameters.registryName,
514
- Parameters.scopeMapName
515
- ],
516
- headerParameters: [Parameters.accept, Parameters.contentType],
517
- mediaType: "json",
518
- serializer
519
- };
520
- const deleteOperationSpec: coreClient.OperationSpec = {
521
- path:
522
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}",
523
- httpMethod: "DELETE",
524
- responses: { 200: {}, 201: {}, 202: {}, 204: {} },
525
- queryParameters: [Parameters.apiVersion],
526
- urlParameters: [
527
- Parameters.$host,
528
- Parameters.subscriptionId,
529
- Parameters.resourceGroupName,
530
- Parameters.registryName,
531
- Parameters.scopeMapName
532
- ],
533
- serializer
534
- };
535
- const updateOperationSpec: coreClient.OperationSpec = {
536
- path:
537
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}",
538
- httpMethod: "PATCH",
539
- responses: {
540
- 200: {
541
- bodyMapper: Mappers.ScopeMap
542
- },
543
- 201: {
544
- bodyMapper: Mappers.ScopeMap
545
- },
546
- 202: {
547
- bodyMapper: Mappers.ScopeMap
548
- },
549
- 204: {
550
- bodyMapper: Mappers.ScopeMap
551
- }
552
- },
553
- requestBody: Parameters.scopeMapUpdateParameters,
554
- queryParameters: [Parameters.apiVersion],
555
- urlParameters: [
556
- Parameters.$host,
557
- Parameters.subscriptionId,
558
- Parameters.resourceGroupName,
559
- Parameters.registryName,
560
- Parameters.scopeMapName
561
- ],
562
- headerParameters: [Parameters.accept, Parameters.contentType],
563
- mediaType: "json",
564
- serializer
565
- };
566
- const listNextOperationSpec: coreClient.OperationSpec = {
567
- path: "{nextLink}",
568
- httpMethod: "GET",
569
- responses: {
570
- 200: {
571
- bodyMapper: Mappers.ScopeMapListResult
572
- }
573
- },
574
- queryParameters: [Parameters.apiVersion],
575
- urlParameters: [
576
- Parameters.$host,
577
- Parameters.subscriptionId,
578
- Parameters.resourceGroupName,
579
- Parameters.registryName,
580
- Parameters.nextLink
581
- ],
582
- headerParameters: [Parameters.accept],
583
- serializer
584
- };