@aws-sdk/client-ecr-public 3.927.0 → 3.929.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 (44) hide show
  1. package/dist-cjs/index.js +1001 -1142
  2. package/dist-cjs/runtimeConfig.shared.js +7 -0
  3. package/dist-es/ECRPUBLICClient.js +2 -0
  4. package/dist-es/commands/BatchCheckLayerAvailabilityCommand.js +3 -9
  5. package/dist-es/commands/BatchDeleteImageCommand.js +3 -9
  6. package/dist-es/commands/CompleteLayerUploadCommand.js +3 -9
  7. package/dist-es/commands/CreateRepositoryCommand.js +3 -9
  8. package/dist-es/commands/DeleteRepositoryCommand.js +3 -9
  9. package/dist-es/commands/DeleteRepositoryPolicyCommand.js +3 -9
  10. package/dist-es/commands/DescribeImageTagsCommand.js +3 -9
  11. package/dist-es/commands/DescribeImagesCommand.js +3 -9
  12. package/dist-es/commands/DescribeRegistriesCommand.js +3 -9
  13. package/dist-es/commands/DescribeRepositoriesCommand.js +3 -9
  14. package/dist-es/commands/GetAuthorizationTokenCommand.js +3 -9
  15. package/dist-es/commands/GetRegistryCatalogDataCommand.js +3 -9
  16. package/dist-es/commands/GetRepositoryCatalogDataCommand.js +3 -9
  17. package/dist-es/commands/GetRepositoryPolicyCommand.js +3 -9
  18. package/dist-es/commands/InitiateLayerUploadCommand.js +3 -9
  19. package/dist-es/commands/ListTagsForResourceCommand.js +3 -9
  20. package/dist-es/commands/PutImageCommand.js +3 -9
  21. package/dist-es/commands/PutRegistryCatalogDataCommand.js +3 -9
  22. package/dist-es/commands/PutRepositoryCatalogDataCommand.js +3 -9
  23. package/dist-es/commands/SetRepositoryPolicyCommand.js +3 -9
  24. package/dist-es/commands/TagResourceCommand.js +3 -9
  25. package/dist-es/commands/UntagResourceCommand.js +3 -9
  26. package/dist-es/commands/UploadLayerPartCommand.js +3 -9
  27. package/dist-es/runtimeConfig.shared.js +7 -0
  28. package/dist-es/schemas/schemas_0.js +889 -0
  29. package/dist-types/ECRPUBLICClient.d.ts +10 -1
  30. package/dist-types/runtimeConfig.browser.d.ts +1 -0
  31. package/dist-types/runtimeConfig.d.ts +1 -0
  32. package/dist-types/runtimeConfig.native.d.ts +1 -0
  33. package/dist-types/runtimeConfig.shared.d.ts +2 -5
  34. package/dist-types/schemas/schemas_0.d.ts +129 -0
  35. package/dist-types/ts3.4/ECRPUBLICClient.d.ts +4 -0
  36. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
  37. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
  38. package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
  39. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
  40. package/dist-types/ts3.4/schemas/schemas_0.d.ts +134 -0
  41. package/package.json +5 -5
  42. package/dist-es/protocols/Aws_json1_1.js +0 -913
  43. package/dist-types/protocols/Aws_json1_1.d.ts +0 -209
  44. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -281
@@ -1,913 +0,0 @@
1
- import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
2
- import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { _json, collectBody, decorateServiceException as __decorateServiceException, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
4
- import { ECRPUBLICServiceException as __BaseException } from "../models/ECRPUBLICServiceException";
5
- import { EmptyUploadException, ImageAlreadyExistsException, ImageDigestDoesNotMatchException, ImageNotFoundException, ImageTagAlreadyExistsException, InvalidLayerException, InvalidLayerPartException, InvalidParameterException, InvalidTagParameterException, LayerAlreadyExistsException, LayerPartTooSmallException, LayersNotFoundException, LimitExceededException, ReferencedImagesNotFoundException, RegistryNotFoundException, RepositoryAlreadyExistsException, RepositoryCatalogDataNotFoundException, RepositoryNotEmptyException, RepositoryNotFoundException, RepositoryPolicyNotFoundException, ServerException, TooManyTagsException, UnsupportedCommandException, UploadNotFoundException, } from "../models/models_0";
6
- export const se_BatchCheckLayerAvailabilityCommand = async (input, context) => {
7
- const headers = sharedHeaders("BatchCheckLayerAvailability");
8
- let body;
9
- body = JSON.stringify(_json(input));
10
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
- };
12
- export const se_BatchDeleteImageCommand = async (input, context) => {
13
- const headers = sharedHeaders("BatchDeleteImage");
14
- let body;
15
- body = JSON.stringify(_json(input));
16
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
- };
18
- export const se_CompleteLayerUploadCommand = async (input, context) => {
19
- const headers = sharedHeaders("CompleteLayerUpload");
20
- let body;
21
- body = JSON.stringify(_json(input));
22
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
- };
24
- export const se_CreateRepositoryCommand = async (input, context) => {
25
- const headers = sharedHeaders("CreateRepository");
26
- let body;
27
- body = JSON.stringify(se_CreateRepositoryRequest(input, context));
28
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
- };
30
- export const se_DeleteRepositoryCommand = async (input, context) => {
31
- const headers = sharedHeaders("DeleteRepository");
32
- let body;
33
- body = JSON.stringify(_json(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- export const se_DeleteRepositoryPolicyCommand = async (input, context) => {
37
- const headers = sharedHeaders("DeleteRepositoryPolicy");
38
- let body;
39
- body = JSON.stringify(_json(input));
40
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
- };
42
- export const se_DescribeImagesCommand = async (input, context) => {
43
- const headers = sharedHeaders("DescribeImages");
44
- let body;
45
- body = JSON.stringify(_json(input));
46
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
- };
48
- export const se_DescribeImageTagsCommand = async (input, context) => {
49
- const headers = sharedHeaders("DescribeImageTags");
50
- let body;
51
- body = JSON.stringify(_json(input));
52
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
- };
54
- export const se_DescribeRegistriesCommand = async (input, context) => {
55
- const headers = sharedHeaders("DescribeRegistries");
56
- let body;
57
- body = JSON.stringify(_json(input));
58
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
- };
60
- export const se_DescribeRepositoriesCommand = async (input, context) => {
61
- const headers = sharedHeaders("DescribeRepositories");
62
- let body;
63
- body = JSON.stringify(_json(input));
64
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
- };
66
- export const se_GetAuthorizationTokenCommand = async (input, context) => {
67
- const headers = sharedHeaders("GetAuthorizationToken");
68
- let body;
69
- body = JSON.stringify(_json(input));
70
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
- };
72
- export const se_GetRegistryCatalogDataCommand = async (input, context) => {
73
- const headers = sharedHeaders("GetRegistryCatalogData");
74
- let body;
75
- body = JSON.stringify(_json(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- export const se_GetRepositoryCatalogDataCommand = async (input, context) => {
79
- const headers = sharedHeaders("GetRepositoryCatalogData");
80
- let body;
81
- body = JSON.stringify(_json(input));
82
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
83
- };
84
- export const se_GetRepositoryPolicyCommand = async (input, context) => {
85
- const headers = sharedHeaders("GetRepositoryPolicy");
86
- let body;
87
- body = JSON.stringify(_json(input));
88
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
89
- };
90
- export const se_InitiateLayerUploadCommand = async (input, context) => {
91
- const headers = sharedHeaders("InitiateLayerUpload");
92
- let body;
93
- body = JSON.stringify(_json(input));
94
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
95
- };
96
- export const se_ListTagsForResourceCommand = async (input, context) => {
97
- const headers = sharedHeaders("ListTagsForResource");
98
- let body;
99
- body = JSON.stringify(_json(input));
100
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
101
- };
102
- export const se_PutImageCommand = async (input, context) => {
103
- const headers = sharedHeaders("PutImage");
104
- let body;
105
- body = JSON.stringify(_json(input));
106
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
107
- };
108
- export const se_PutRegistryCatalogDataCommand = async (input, context) => {
109
- const headers = sharedHeaders("PutRegistryCatalogData");
110
- let body;
111
- body = JSON.stringify(_json(input));
112
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
113
- };
114
- export const se_PutRepositoryCatalogDataCommand = async (input, context) => {
115
- const headers = sharedHeaders("PutRepositoryCatalogData");
116
- let body;
117
- body = JSON.stringify(se_PutRepositoryCatalogDataRequest(input, context));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- export const se_SetRepositoryPolicyCommand = async (input, context) => {
121
- const headers = sharedHeaders("SetRepositoryPolicy");
122
- let body;
123
- body = JSON.stringify(_json(input));
124
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
125
- };
126
- export const se_TagResourceCommand = async (input, context) => {
127
- const headers = sharedHeaders("TagResource");
128
- let body;
129
- body = JSON.stringify(_json(input));
130
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
131
- };
132
- export const se_UntagResourceCommand = async (input, context) => {
133
- const headers = sharedHeaders("UntagResource");
134
- let body;
135
- body = JSON.stringify(_json(input));
136
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
- };
138
- export const se_UploadLayerPartCommand = async (input, context) => {
139
- const headers = sharedHeaders("UploadLayerPart");
140
- let body;
141
- body = JSON.stringify(se_UploadLayerPartRequest(input, context));
142
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
- };
144
- export const de_BatchCheckLayerAvailabilityCommand = async (output, context) => {
145
- if (output.statusCode >= 300) {
146
- return de_CommandError(output, context);
147
- }
148
- const data = await parseBody(output.body, context);
149
- let contents = {};
150
- contents = _json(data);
151
- const response = {
152
- $metadata: deserializeMetadata(output),
153
- ...contents,
154
- };
155
- return response;
156
- };
157
- export const de_BatchDeleteImageCommand = async (output, context) => {
158
- if (output.statusCode >= 300) {
159
- return de_CommandError(output, context);
160
- }
161
- const data = await parseBody(output.body, context);
162
- let contents = {};
163
- contents = _json(data);
164
- const response = {
165
- $metadata: deserializeMetadata(output),
166
- ...contents,
167
- };
168
- return response;
169
- };
170
- export const de_CompleteLayerUploadCommand = async (output, context) => {
171
- if (output.statusCode >= 300) {
172
- return de_CommandError(output, context);
173
- }
174
- const data = await parseBody(output.body, context);
175
- let contents = {};
176
- contents = _json(data);
177
- const response = {
178
- $metadata: deserializeMetadata(output),
179
- ...contents,
180
- };
181
- return response;
182
- };
183
- export const de_CreateRepositoryCommand = async (output, context) => {
184
- if (output.statusCode >= 300) {
185
- return de_CommandError(output, context);
186
- }
187
- const data = await parseBody(output.body, context);
188
- let contents = {};
189
- contents = de_CreateRepositoryResponse(data, context);
190
- const response = {
191
- $metadata: deserializeMetadata(output),
192
- ...contents,
193
- };
194
- return response;
195
- };
196
- export const de_DeleteRepositoryCommand = async (output, context) => {
197
- if (output.statusCode >= 300) {
198
- return de_CommandError(output, context);
199
- }
200
- const data = await parseBody(output.body, context);
201
- let contents = {};
202
- contents = de_DeleteRepositoryResponse(data, context);
203
- const response = {
204
- $metadata: deserializeMetadata(output),
205
- ...contents,
206
- };
207
- return response;
208
- };
209
- export const de_DeleteRepositoryPolicyCommand = async (output, context) => {
210
- if (output.statusCode >= 300) {
211
- return de_CommandError(output, context);
212
- }
213
- const data = await parseBody(output.body, context);
214
- let contents = {};
215
- contents = _json(data);
216
- const response = {
217
- $metadata: deserializeMetadata(output),
218
- ...contents,
219
- };
220
- return response;
221
- };
222
- export const de_DescribeImagesCommand = async (output, context) => {
223
- if (output.statusCode >= 300) {
224
- return de_CommandError(output, context);
225
- }
226
- const data = await parseBody(output.body, context);
227
- let contents = {};
228
- contents = de_DescribeImagesResponse(data, context);
229
- const response = {
230
- $metadata: deserializeMetadata(output),
231
- ...contents,
232
- };
233
- return response;
234
- };
235
- export const de_DescribeImageTagsCommand = async (output, context) => {
236
- if (output.statusCode >= 300) {
237
- return de_CommandError(output, context);
238
- }
239
- const data = await parseBody(output.body, context);
240
- let contents = {};
241
- contents = de_DescribeImageTagsResponse(data, context);
242
- const response = {
243
- $metadata: deserializeMetadata(output),
244
- ...contents,
245
- };
246
- return response;
247
- };
248
- export const de_DescribeRegistriesCommand = async (output, context) => {
249
- if (output.statusCode >= 300) {
250
- return de_CommandError(output, context);
251
- }
252
- const data = await parseBody(output.body, context);
253
- let contents = {};
254
- contents = _json(data);
255
- const response = {
256
- $metadata: deserializeMetadata(output),
257
- ...contents,
258
- };
259
- return response;
260
- };
261
- export const de_DescribeRepositoriesCommand = async (output, context) => {
262
- if (output.statusCode >= 300) {
263
- return de_CommandError(output, context);
264
- }
265
- const data = await parseBody(output.body, context);
266
- let contents = {};
267
- contents = de_DescribeRepositoriesResponse(data, context);
268
- const response = {
269
- $metadata: deserializeMetadata(output),
270
- ...contents,
271
- };
272
- return response;
273
- };
274
- export const de_GetAuthorizationTokenCommand = async (output, context) => {
275
- if (output.statusCode >= 300) {
276
- return de_CommandError(output, context);
277
- }
278
- const data = await parseBody(output.body, context);
279
- let contents = {};
280
- contents = de_GetAuthorizationTokenResponse(data, context);
281
- const response = {
282
- $metadata: deserializeMetadata(output),
283
- ...contents,
284
- };
285
- return response;
286
- };
287
- export const de_GetRegistryCatalogDataCommand = async (output, context) => {
288
- if (output.statusCode >= 300) {
289
- return de_CommandError(output, context);
290
- }
291
- const data = await parseBody(output.body, context);
292
- let contents = {};
293
- contents = _json(data);
294
- const response = {
295
- $metadata: deserializeMetadata(output),
296
- ...contents,
297
- };
298
- return response;
299
- };
300
- export const de_GetRepositoryCatalogDataCommand = async (output, context) => {
301
- if (output.statusCode >= 300) {
302
- return de_CommandError(output, context);
303
- }
304
- const data = await parseBody(output.body, context);
305
- let contents = {};
306
- contents = _json(data);
307
- const response = {
308
- $metadata: deserializeMetadata(output),
309
- ...contents,
310
- };
311
- return response;
312
- };
313
- export const de_GetRepositoryPolicyCommand = async (output, context) => {
314
- if (output.statusCode >= 300) {
315
- return de_CommandError(output, context);
316
- }
317
- const data = await parseBody(output.body, context);
318
- let contents = {};
319
- contents = _json(data);
320
- const response = {
321
- $metadata: deserializeMetadata(output),
322
- ...contents,
323
- };
324
- return response;
325
- };
326
- export const de_InitiateLayerUploadCommand = async (output, context) => {
327
- if (output.statusCode >= 300) {
328
- return de_CommandError(output, context);
329
- }
330
- const data = await parseBody(output.body, context);
331
- let contents = {};
332
- contents = _json(data);
333
- const response = {
334
- $metadata: deserializeMetadata(output),
335
- ...contents,
336
- };
337
- return response;
338
- };
339
- export const de_ListTagsForResourceCommand = async (output, context) => {
340
- if (output.statusCode >= 300) {
341
- return de_CommandError(output, context);
342
- }
343
- const data = await parseBody(output.body, context);
344
- let contents = {};
345
- contents = _json(data);
346
- const response = {
347
- $metadata: deserializeMetadata(output),
348
- ...contents,
349
- };
350
- return response;
351
- };
352
- export const de_PutImageCommand = async (output, context) => {
353
- if (output.statusCode >= 300) {
354
- return de_CommandError(output, context);
355
- }
356
- const data = await parseBody(output.body, context);
357
- let contents = {};
358
- contents = _json(data);
359
- const response = {
360
- $metadata: deserializeMetadata(output),
361
- ...contents,
362
- };
363
- return response;
364
- };
365
- export const de_PutRegistryCatalogDataCommand = async (output, context) => {
366
- if (output.statusCode >= 300) {
367
- return de_CommandError(output, context);
368
- }
369
- const data = await parseBody(output.body, context);
370
- let contents = {};
371
- contents = _json(data);
372
- const response = {
373
- $metadata: deserializeMetadata(output),
374
- ...contents,
375
- };
376
- return response;
377
- };
378
- export const de_PutRepositoryCatalogDataCommand = async (output, context) => {
379
- if (output.statusCode >= 300) {
380
- return de_CommandError(output, context);
381
- }
382
- const data = await parseBody(output.body, context);
383
- let contents = {};
384
- contents = _json(data);
385
- const response = {
386
- $metadata: deserializeMetadata(output),
387
- ...contents,
388
- };
389
- return response;
390
- };
391
- export const de_SetRepositoryPolicyCommand = async (output, context) => {
392
- if (output.statusCode >= 300) {
393
- return de_CommandError(output, context);
394
- }
395
- const data = await parseBody(output.body, context);
396
- let contents = {};
397
- contents = _json(data);
398
- const response = {
399
- $metadata: deserializeMetadata(output),
400
- ...contents,
401
- };
402
- return response;
403
- };
404
- export const de_TagResourceCommand = async (output, context) => {
405
- if (output.statusCode >= 300) {
406
- return de_CommandError(output, context);
407
- }
408
- const data = await parseBody(output.body, context);
409
- let contents = {};
410
- contents = _json(data);
411
- const response = {
412
- $metadata: deserializeMetadata(output),
413
- ...contents,
414
- };
415
- return response;
416
- };
417
- export const de_UntagResourceCommand = async (output, context) => {
418
- if (output.statusCode >= 300) {
419
- return de_CommandError(output, context);
420
- }
421
- const data = await parseBody(output.body, context);
422
- let contents = {};
423
- contents = _json(data);
424
- const response = {
425
- $metadata: deserializeMetadata(output),
426
- ...contents,
427
- };
428
- return response;
429
- };
430
- export const de_UploadLayerPartCommand = async (output, context) => {
431
- if (output.statusCode >= 300) {
432
- return de_CommandError(output, context);
433
- }
434
- const data = await parseBody(output.body, context);
435
- let contents = {};
436
- contents = _json(data);
437
- const response = {
438
- $metadata: deserializeMetadata(output),
439
- ...contents,
440
- };
441
- return response;
442
- };
443
- const de_CommandError = async (output, context) => {
444
- const parsedOutput = {
445
- ...output,
446
- body: await parseErrorBody(output.body, context),
447
- };
448
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
449
- switch (errorCode) {
450
- case "InvalidParameterException":
451
- case "com.amazonaws.ecrpublic#InvalidParameterException":
452
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
453
- case "RegistryNotFoundException":
454
- case "com.amazonaws.ecrpublic#RegistryNotFoundException":
455
- throw await de_RegistryNotFoundExceptionRes(parsedOutput, context);
456
- case "RepositoryNotFoundException":
457
- case "com.amazonaws.ecrpublic#RepositoryNotFoundException":
458
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
459
- case "ServerException":
460
- case "com.amazonaws.ecrpublic#ServerException":
461
- throw await de_ServerExceptionRes(parsedOutput, context);
462
- case "UnsupportedCommandException":
463
- case "com.amazonaws.ecrpublic#UnsupportedCommandException":
464
- throw await de_UnsupportedCommandExceptionRes(parsedOutput, context);
465
- case "EmptyUploadException":
466
- case "com.amazonaws.ecrpublic#EmptyUploadException":
467
- throw await de_EmptyUploadExceptionRes(parsedOutput, context);
468
- case "InvalidLayerException":
469
- case "com.amazonaws.ecrpublic#InvalidLayerException":
470
- throw await de_InvalidLayerExceptionRes(parsedOutput, context);
471
- case "LayerAlreadyExistsException":
472
- case "com.amazonaws.ecrpublic#LayerAlreadyExistsException":
473
- throw await de_LayerAlreadyExistsExceptionRes(parsedOutput, context);
474
- case "LayerPartTooSmallException":
475
- case "com.amazonaws.ecrpublic#LayerPartTooSmallException":
476
- throw await de_LayerPartTooSmallExceptionRes(parsedOutput, context);
477
- case "UploadNotFoundException":
478
- case "com.amazonaws.ecrpublic#UploadNotFoundException":
479
- throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
480
- case "InvalidTagParameterException":
481
- case "com.amazonaws.ecrpublic#InvalidTagParameterException":
482
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
483
- case "LimitExceededException":
484
- case "com.amazonaws.ecrpublic#LimitExceededException":
485
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
486
- case "RepositoryAlreadyExistsException":
487
- case "com.amazonaws.ecrpublic#RepositoryAlreadyExistsException":
488
- throw await de_RepositoryAlreadyExistsExceptionRes(parsedOutput, context);
489
- case "TooManyTagsException":
490
- case "com.amazonaws.ecrpublic#TooManyTagsException":
491
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
492
- case "RepositoryNotEmptyException":
493
- case "com.amazonaws.ecrpublic#RepositoryNotEmptyException":
494
- throw await de_RepositoryNotEmptyExceptionRes(parsedOutput, context);
495
- case "RepositoryPolicyNotFoundException":
496
- case "com.amazonaws.ecrpublic#RepositoryPolicyNotFoundException":
497
- throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
498
- case "ImageNotFoundException":
499
- case "com.amazonaws.ecrpublic#ImageNotFoundException":
500
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
501
- case "RepositoryCatalogDataNotFoundException":
502
- case "com.amazonaws.ecrpublic#RepositoryCatalogDataNotFoundException":
503
- throw await de_RepositoryCatalogDataNotFoundExceptionRes(parsedOutput, context);
504
- case "ImageAlreadyExistsException":
505
- case "com.amazonaws.ecrpublic#ImageAlreadyExistsException":
506
- throw await de_ImageAlreadyExistsExceptionRes(parsedOutput, context);
507
- case "ImageDigestDoesNotMatchException":
508
- case "com.amazonaws.ecrpublic#ImageDigestDoesNotMatchException":
509
- throw await de_ImageDigestDoesNotMatchExceptionRes(parsedOutput, context);
510
- case "ImageTagAlreadyExistsException":
511
- case "com.amazonaws.ecrpublic#ImageTagAlreadyExistsException":
512
- throw await de_ImageTagAlreadyExistsExceptionRes(parsedOutput, context);
513
- case "LayersNotFoundException":
514
- case "com.amazonaws.ecrpublic#LayersNotFoundException":
515
- throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
516
- case "ReferencedImagesNotFoundException":
517
- case "com.amazonaws.ecrpublic#ReferencedImagesNotFoundException":
518
- throw await de_ReferencedImagesNotFoundExceptionRes(parsedOutput, context);
519
- case "InvalidLayerPartException":
520
- case "com.amazonaws.ecrpublic#InvalidLayerPartException":
521
- throw await de_InvalidLayerPartExceptionRes(parsedOutput, context);
522
- default:
523
- const parsedBody = parsedOutput.body;
524
- return throwDefaultError({
525
- output,
526
- parsedBody,
527
- errorCode,
528
- });
529
- }
530
- };
531
- const de_EmptyUploadExceptionRes = async (parsedOutput, context) => {
532
- const body = parsedOutput.body;
533
- const deserialized = _json(body);
534
- const exception = new EmptyUploadException({
535
- $metadata: deserializeMetadata(parsedOutput),
536
- ...deserialized,
537
- });
538
- return __decorateServiceException(exception, body);
539
- };
540
- const de_ImageAlreadyExistsExceptionRes = async (parsedOutput, context) => {
541
- const body = parsedOutput.body;
542
- const deserialized = _json(body);
543
- const exception = new ImageAlreadyExistsException({
544
- $metadata: deserializeMetadata(parsedOutput),
545
- ...deserialized,
546
- });
547
- return __decorateServiceException(exception, body);
548
- };
549
- const de_ImageDigestDoesNotMatchExceptionRes = async (parsedOutput, context) => {
550
- const body = parsedOutput.body;
551
- const deserialized = _json(body);
552
- const exception = new ImageDigestDoesNotMatchException({
553
- $metadata: deserializeMetadata(parsedOutput),
554
- ...deserialized,
555
- });
556
- return __decorateServiceException(exception, body);
557
- };
558
- const de_ImageNotFoundExceptionRes = async (parsedOutput, context) => {
559
- const body = parsedOutput.body;
560
- const deserialized = _json(body);
561
- const exception = new ImageNotFoundException({
562
- $metadata: deserializeMetadata(parsedOutput),
563
- ...deserialized,
564
- });
565
- return __decorateServiceException(exception, body);
566
- };
567
- const de_ImageTagAlreadyExistsExceptionRes = async (parsedOutput, context) => {
568
- const body = parsedOutput.body;
569
- const deserialized = _json(body);
570
- const exception = new ImageTagAlreadyExistsException({
571
- $metadata: deserializeMetadata(parsedOutput),
572
- ...deserialized,
573
- });
574
- return __decorateServiceException(exception, body);
575
- };
576
- const de_InvalidLayerExceptionRes = async (parsedOutput, context) => {
577
- const body = parsedOutput.body;
578
- const deserialized = _json(body);
579
- const exception = new InvalidLayerException({
580
- $metadata: deserializeMetadata(parsedOutput),
581
- ...deserialized,
582
- });
583
- return __decorateServiceException(exception, body);
584
- };
585
- const de_InvalidLayerPartExceptionRes = async (parsedOutput, context) => {
586
- const body = parsedOutput.body;
587
- const deserialized = _json(body);
588
- const exception = new InvalidLayerPartException({
589
- $metadata: deserializeMetadata(parsedOutput),
590
- ...deserialized,
591
- });
592
- return __decorateServiceException(exception, body);
593
- };
594
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
595
- const body = parsedOutput.body;
596
- const deserialized = _json(body);
597
- const exception = new InvalidParameterException({
598
- $metadata: deserializeMetadata(parsedOutput),
599
- ...deserialized,
600
- });
601
- return __decorateServiceException(exception, body);
602
- };
603
- const de_InvalidTagParameterExceptionRes = async (parsedOutput, context) => {
604
- const body = parsedOutput.body;
605
- const deserialized = _json(body);
606
- const exception = new InvalidTagParameterException({
607
- $metadata: deserializeMetadata(parsedOutput),
608
- ...deserialized,
609
- });
610
- return __decorateServiceException(exception, body);
611
- };
612
- const de_LayerAlreadyExistsExceptionRes = async (parsedOutput, context) => {
613
- const body = parsedOutput.body;
614
- const deserialized = _json(body);
615
- const exception = new LayerAlreadyExistsException({
616
- $metadata: deserializeMetadata(parsedOutput),
617
- ...deserialized,
618
- });
619
- return __decorateServiceException(exception, body);
620
- };
621
- const de_LayerPartTooSmallExceptionRes = async (parsedOutput, context) => {
622
- const body = parsedOutput.body;
623
- const deserialized = _json(body);
624
- const exception = new LayerPartTooSmallException({
625
- $metadata: deserializeMetadata(parsedOutput),
626
- ...deserialized,
627
- });
628
- return __decorateServiceException(exception, body);
629
- };
630
- const de_LayersNotFoundExceptionRes = async (parsedOutput, context) => {
631
- const body = parsedOutput.body;
632
- const deserialized = _json(body);
633
- const exception = new LayersNotFoundException({
634
- $metadata: deserializeMetadata(parsedOutput),
635
- ...deserialized,
636
- });
637
- return __decorateServiceException(exception, body);
638
- };
639
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
640
- const body = parsedOutput.body;
641
- const deserialized = _json(body);
642
- const exception = new LimitExceededException({
643
- $metadata: deserializeMetadata(parsedOutput),
644
- ...deserialized,
645
- });
646
- return __decorateServiceException(exception, body);
647
- };
648
- const de_ReferencedImagesNotFoundExceptionRes = async (parsedOutput, context) => {
649
- const body = parsedOutput.body;
650
- const deserialized = _json(body);
651
- const exception = new ReferencedImagesNotFoundException({
652
- $metadata: deserializeMetadata(parsedOutput),
653
- ...deserialized,
654
- });
655
- return __decorateServiceException(exception, body);
656
- };
657
- const de_RegistryNotFoundExceptionRes = async (parsedOutput, context) => {
658
- const body = parsedOutput.body;
659
- const deserialized = _json(body);
660
- const exception = new RegistryNotFoundException({
661
- $metadata: deserializeMetadata(parsedOutput),
662
- ...deserialized,
663
- });
664
- return __decorateServiceException(exception, body);
665
- };
666
- const de_RepositoryAlreadyExistsExceptionRes = async (parsedOutput, context) => {
667
- const body = parsedOutput.body;
668
- const deserialized = _json(body);
669
- const exception = new RepositoryAlreadyExistsException({
670
- $metadata: deserializeMetadata(parsedOutput),
671
- ...deserialized,
672
- });
673
- return __decorateServiceException(exception, body);
674
- };
675
- const de_RepositoryCatalogDataNotFoundExceptionRes = async (parsedOutput, context) => {
676
- const body = parsedOutput.body;
677
- const deserialized = _json(body);
678
- const exception = new RepositoryCatalogDataNotFoundException({
679
- $metadata: deserializeMetadata(parsedOutput),
680
- ...deserialized,
681
- });
682
- return __decorateServiceException(exception, body);
683
- };
684
- const de_RepositoryNotEmptyExceptionRes = async (parsedOutput, context) => {
685
- const body = parsedOutput.body;
686
- const deserialized = _json(body);
687
- const exception = new RepositoryNotEmptyException({
688
- $metadata: deserializeMetadata(parsedOutput),
689
- ...deserialized,
690
- });
691
- return __decorateServiceException(exception, body);
692
- };
693
- const de_RepositoryNotFoundExceptionRes = async (parsedOutput, context) => {
694
- const body = parsedOutput.body;
695
- const deserialized = _json(body);
696
- const exception = new RepositoryNotFoundException({
697
- $metadata: deserializeMetadata(parsedOutput),
698
- ...deserialized,
699
- });
700
- return __decorateServiceException(exception, body);
701
- };
702
- const de_RepositoryPolicyNotFoundExceptionRes = async (parsedOutput, context) => {
703
- const body = parsedOutput.body;
704
- const deserialized = _json(body);
705
- const exception = new RepositoryPolicyNotFoundException({
706
- $metadata: deserializeMetadata(parsedOutput),
707
- ...deserialized,
708
- });
709
- return __decorateServiceException(exception, body);
710
- };
711
- const de_ServerExceptionRes = async (parsedOutput, context) => {
712
- const body = parsedOutput.body;
713
- const deserialized = _json(body);
714
- const exception = new ServerException({
715
- $metadata: deserializeMetadata(parsedOutput),
716
- ...deserialized,
717
- });
718
- return __decorateServiceException(exception, body);
719
- };
720
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
721
- const body = parsedOutput.body;
722
- const deserialized = _json(body);
723
- const exception = new TooManyTagsException({
724
- $metadata: deserializeMetadata(parsedOutput),
725
- ...deserialized,
726
- });
727
- return __decorateServiceException(exception, body);
728
- };
729
- const de_UnsupportedCommandExceptionRes = async (parsedOutput, context) => {
730
- const body = parsedOutput.body;
731
- const deserialized = _json(body);
732
- const exception = new UnsupportedCommandException({
733
- $metadata: deserializeMetadata(parsedOutput),
734
- ...deserialized,
735
- });
736
- return __decorateServiceException(exception, body);
737
- };
738
- const de_UploadNotFoundExceptionRes = async (parsedOutput, context) => {
739
- const body = parsedOutput.body;
740
- const deserialized = _json(body);
741
- const exception = new UploadNotFoundException({
742
- $metadata: deserializeMetadata(parsedOutput),
743
- ...deserialized,
744
- });
745
- return __decorateServiceException(exception, body);
746
- };
747
- const se_CreateRepositoryRequest = (input, context) => {
748
- return take(input, {
749
- catalogData: (_) => se_RepositoryCatalogDataInput(_, context),
750
- repositoryName: [],
751
- tags: _json,
752
- });
753
- };
754
- const se_PutRepositoryCatalogDataRequest = (input, context) => {
755
- return take(input, {
756
- catalogData: (_) => se_RepositoryCatalogDataInput(_, context),
757
- registryId: [],
758
- repositoryName: [],
759
- });
760
- };
761
- const se_RepositoryCatalogDataInput = (input, context) => {
762
- return take(input, {
763
- aboutText: [],
764
- architectures: _json,
765
- description: [],
766
- logoImageBlob: context.base64Encoder,
767
- operatingSystems: _json,
768
- usageText: [],
769
- });
770
- };
771
- const se_UploadLayerPartRequest = (input, context) => {
772
- return take(input, {
773
- layerPartBlob: context.base64Encoder,
774
- partFirstByte: [],
775
- partLastByte: [],
776
- registryId: [],
777
- repositoryName: [],
778
- uploadId: [],
779
- });
780
- };
781
- const de_AuthorizationData = (output, context) => {
782
- return take(output, {
783
- authorizationToken: __expectString,
784
- expiresAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
785
- });
786
- };
787
- const de_CreateRepositoryResponse = (output, context) => {
788
- return take(output, {
789
- catalogData: _json,
790
- repository: (_) => de_Repository(_, context),
791
- });
792
- };
793
- const de_DeleteRepositoryResponse = (output, context) => {
794
- return take(output, {
795
- repository: (_) => de_Repository(_, context),
796
- });
797
- };
798
- const de_DescribeImagesResponse = (output, context) => {
799
- return take(output, {
800
- imageDetails: (_) => de_ImageDetailList(_, context),
801
- nextToken: __expectString,
802
- });
803
- };
804
- const de_DescribeImageTagsResponse = (output, context) => {
805
- return take(output, {
806
- imageTagDetails: (_) => de_ImageTagDetailList(_, context),
807
- nextToken: __expectString,
808
- });
809
- };
810
- const de_DescribeRepositoriesResponse = (output, context) => {
811
- return take(output, {
812
- nextToken: __expectString,
813
- repositories: (_) => de_RepositoryList(_, context),
814
- });
815
- };
816
- const de_GetAuthorizationTokenResponse = (output, context) => {
817
- return take(output, {
818
- authorizationData: (_) => de_AuthorizationData(_, context),
819
- });
820
- };
821
- const de_ImageDetail = (output, context) => {
822
- return take(output, {
823
- artifactMediaType: __expectString,
824
- imageDigest: __expectString,
825
- imageManifestMediaType: __expectString,
826
- imagePushedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
827
- imageSizeInBytes: __expectLong,
828
- imageTags: _json,
829
- registryId: __expectString,
830
- repositoryName: __expectString,
831
- });
832
- };
833
- const de_ImageDetailList = (output, context) => {
834
- const retVal = (output || [])
835
- .filter((e) => e != null)
836
- .map((entry) => {
837
- return de_ImageDetail(entry, context);
838
- });
839
- return retVal;
840
- };
841
- const de_ImageTagDetail = (output, context) => {
842
- return take(output, {
843
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
844
- imageDetail: (_) => de_ReferencedImageDetail(_, context),
845
- imageTag: __expectString,
846
- });
847
- };
848
- const de_ImageTagDetailList = (output, context) => {
849
- const retVal = (output || [])
850
- .filter((e) => e != null)
851
- .map((entry) => {
852
- return de_ImageTagDetail(entry, context);
853
- });
854
- return retVal;
855
- };
856
- const de_ReferencedImageDetail = (output, context) => {
857
- return take(output, {
858
- artifactMediaType: __expectString,
859
- imageDigest: __expectString,
860
- imageManifestMediaType: __expectString,
861
- imagePushedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
862
- imageSizeInBytes: __expectLong,
863
- });
864
- };
865
- const de_Repository = (output, context) => {
866
- return take(output, {
867
- createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
868
- registryId: __expectString,
869
- repositoryArn: __expectString,
870
- repositoryName: __expectString,
871
- repositoryUri: __expectString,
872
- });
873
- };
874
- const de_RepositoryList = (output, context) => {
875
- const retVal = (output || [])
876
- .filter((e) => e != null)
877
- .map((entry) => {
878
- return de_Repository(entry, context);
879
- });
880
- return retVal;
881
- };
882
- const deserializeMetadata = (output) => ({
883
- httpStatusCode: output.statusCode,
884
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
885
- extendedRequestId: output.headers["x-amz-id-2"],
886
- cfId: output.headers["x-amz-cf-id"],
887
- });
888
- const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
889
- const throwDefaultError = withBaseException(__BaseException);
890
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
891
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
892
- const contents = {
893
- protocol,
894
- hostname,
895
- port,
896
- method: "POST",
897
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
898
- headers,
899
- };
900
- if (resolvedHostname !== undefined) {
901
- contents.hostname = resolvedHostname;
902
- }
903
- if (body !== undefined) {
904
- contents.body = body;
905
- }
906
- return new __HttpRequest(contents);
907
- };
908
- function sharedHeaders(operation) {
909
- return {
910
- "content-type": "application/x-amz-json-1.1",
911
- "x-amz-target": `SpencerFrontendService.${operation}`,
912
- };
913
- }