@aws-sdk/client-ecr 3.490.0 → 3.495.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 (66) hide show
  1. package/dist-cjs/ECR.js +1 -97
  2. package/dist-cjs/ECRClient.js +1 -43
  3. package/dist-cjs/commands/BatchCheckLayerAvailabilityCommand.js +1 -28
  4. package/dist-cjs/commands/BatchDeleteImageCommand.js +1 -28
  5. package/dist-cjs/commands/BatchGetImageCommand.js +1 -28
  6. package/dist-cjs/commands/BatchGetRepositoryScanningConfigurationCommand.js +1 -28
  7. package/dist-cjs/commands/CompleteLayerUploadCommand.js +1 -28
  8. package/dist-cjs/commands/CreatePullThroughCacheRuleCommand.js +1 -28
  9. package/dist-cjs/commands/CreateRepositoryCommand.js +1 -28
  10. package/dist-cjs/commands/DeleteLifecyclePolicyCommand.js +1 -28
  11. package/dist-cjs/commands/DeletePullThroughCacheRuleCommand.js +1 -28
  12. package/dist-cjs/commands/DeleteRegistryPolicyCommand.js +1 -28
  13. package/dist-cjs/commands/DeleteRepositoryCommand.js +1 -28
  14. package/dist-cjs/commands/DeleteRepositoryPolicyCommand.js +1 -28
  15. package/dist-cjs/commands/DescribeImageReplicationStatusCommand.js +1 -28
  16. package/dist-cjs/commands/DescribeImageScanFindingsCommand.js +1 -28
  17. package/dist-cjs/commands/DescribeImagesCommand.js +1 -28
  18. package/dist-cjs/commands/DescribePullThroughCacheRulesCommand.js +1 -28
  19. package/dist-cjs/commands/DescribeRegistryCommand.js +1 -28
  20. package/dist-cjs/commands/DescribeRepositoriesCommand.js +1 -28
  21. package/dist-cjs/commands/GetAuthorizationTokenCommand.js +1 -28
  22. package/dist-cjs/commands/GetDownloadUrlForLayerCommand.js +1 -28
  23. package/dist-cjs/commands/GetLifecyclePolicyCommand.js +1 -28
  24. package/dist-cjs/commands/GetLifecyclePolicyPreviewCommand.js +1 -28
  25. package/dist-cjs/commands/GetRegistryPolicyCommand.js +1 -28
  26. package/dist-cjs/commands/GetRegistryScanningConfigurationCommand.js +1 -28
  27. package/dist-cjs/commands/GetRepositoryPolicyCommand.js +1 -28
  28. package/dist-cjs/commands/InitiateLayerUploadCommand.js +1 -28
  29. package/dist-cjs/commands/ListImagesCommand.js +1 -28
  30. package/dist-cjs/commands/ListTagsForResourceCommand.js +1 -28
  31. package/dist-cjs/commands/PutImageCommand.js +1 -28
  32. package/dist-cjs/commands/PutImageScanningConfigurationCommand.js +1 -28
  33. package/dist-cjs/commands/PutImageTagMutabilityCommand.js +1 -28
  34. package/dist-cjs/commands/PutLifecyclePolicyCommand.js +1 -28
  35. package/dist-cjs/commands/PutRegistryPolicyCommand.js +1 -28
  36. package/dist-cjs/commands/PutRegistryScanningConfigurationCommand.js +1 -28
  37. package/dist-cjs/commands/PutReplicationConfigurationCommand.js +1 -28
  38. package/dist-cjs/commands/SetRepositoryPolicyCommand.js +1 -28
  39. package/dist-cjs/commands/StartImageScanCommand.js +1 -28
  40. package/dist-cjs/commands/StartLifecyclePolicyPreviewCommand.js +1 -28
  41. package/dist-cjs/commands/TagResourceCommand.js +1 -28
  42. package/dist-cjs/commands/UntagResourceCommand.js +1 -28
  43. package/dist-cjs/commands/UpdatePullThroughCacheRuleCommand.js +1 -28
  44. package/dist-cjs/commands/UploadLayerPartCommand.js +1 -28
  45. package/dist-cjs/commands/ValidatePullThroughCacheRuleCommand.js +1 -28
  46. package/dist-cjs/commands/index.js +1 -46
  47. package/dist-cjs/endpoint/EndpointParameters.js +1 -18
  48. package/dist-cjs/extensionConfiguration.js +1 -2
  49. package/dist-cjs/index.js +4820 -12
  50. package/dist-cjs/models/ECRServiceException.js +1 -12
  51. package/dist-cjs/models/index.js +1 -4
  52. package/dist-cjs/models/models_0.js +1 -595
  53. package/dist-cjs/pagination/DescribeImageScanFindingsPaginator.js +1 -7
  54. package/dist-cjs/pagination/DescribeImagesPaginator.js +1 -7
  55. package/dist-cjs/pagination/DescribePullThroughCacheRulesPaginator.js +1 -7
  56. package/dist-cjs/pagination/DescribeRepositoriesPaginator.js +1 -7
  57. package/dist-cjs/pagination/GetLifecyclePolicyPreviewPaginator.js +1 -7
  58. package/dist-cjs/pagination/Interfaces.js +1 -2
  59. package/dist-cjs/pagination/ListImagesPaginator.js +1 -7
  60. package/dist-cjs/pagination/index.js +1 -10
  61. package/dist-cjs/protocols/Aws_json1_1.js +1 -2934
  62. package/dist-cjs/runtimeExtensions.js +1 -22
  63. package/dist-cjs/waiters/index.js +1 -5
  64. package/dist-cjs/waiters/waitForImageScanComplete.js +1 -45
  65. package/dist-cjs/waiters/waitForLifecyclePolicyPreviewComplete.js +1 -45
  66. package/package.json +41 -41
@@ -1,2934 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.de_CreateRepositoryCommand = exports.de_CreatePullThroughCacheRuleCommand = exports.de_CompleteLayerUploadCommand = exports.de_BatchGetRepositoryScanningConfigurationCommand = exports.de_BatchGetImageCommand = exports.de_BatchDeleteImageCommand = exports.de_BatchCheckLayerAvailabilityCommand = exports.se_ValidatePullThroughCacheRuleCommand = exports.se_UploadLayerPartCommand = exports.se_UpdatePullThroughCacheRuleCommand = exports.se_UntagResourceCommand = exports.se_TagResourceCommand = exports.se_StartLifecyclePolicyPreviewCommand = exports.se_StartImageScanCommand = exports.se_SetRepositoryPolicyCommand = exports.se_PutReplicationConfigurationCommand = exports.se_PutRegistryScanningConfigurationCommand = exports.se_PutRegistryPolicyCommand = exports.se_PutLifecyclePolicyCommand = exports.se_PutImageTagMutabilityCommand = exports.se_PutImageScanningConfigurationCommand = exports.se_PutImageCommand = exports.se_ListTagsForResourceCommand = exports.se_ListImagesCommand = exports.se_InitiateLayerUploadCommand = exports.se_GetRepositoryPolicyCommand = exports.se_GetRegistryScanningConfigurationCommand = exports.se_GetRegistryPolicyCommand = exports.se_GetLifecyclePolicyPreviewCommand = exports.se_GetLifecyclePolicyCommand = exports.se_GetDownloadUrlForLayerCommand = exports.se_GetAuthorizationTokenCommand = exports.se_DescribeRepositoriesCommand = exports.se_DescribeRegistryCommand = exports.se_DescribePullThroughCacheRulesCommand = exports.se_DescribeImageScanFindingsCommand = exports.se_DescribeImagesCommand = exports.se_DescribeImageReplicationStatusCommand = exports.se_DeleteRepositoryPolicyCommand = exports.se_DeleteRepositoryCommand = exports.se_DeleteRegistryPolicyCommand = exports.se_DeletePullThroughCacheRuleCommand = exports.se_DeleteLifecyclePolicyCommand = exports.se_CreateRepositoryCommand = exports.se_CreatePullThroughCacheRuleCommand = exports.se_CompleteLayerUploadCommand = exports.se_BatchGetRepositoryScanningConfigurationCommand = exports.se_BatchGetImageCommand = exports.se_BatchDeleteImageCommand = exports.se_BatchCheckLayerAvailabilityCommand = void 0;
4
- exports.de_ValidatePullThroughCacheRuleCommand = exports.de_UploadLayerPartCommand = exports.de_UpdatePullThroughCacheRuleCommand = exports.de_UntagResourceCommand = exports.de_TagResourceCommand = exports.de_StartLifecyclePolicyPreviewCommand = exports.de_StartImageScanCommand = exports.de_SetRepositoryPolicyCommand = exports.de_PutReplicationConfigurationCommand = exports.de_PutRegistryScanningConfigurationCommand = exports.de_PutRegistryPolicyCommand = exports.de_PutLifecyclePolicyCommand = exports.de_PutImageTagMutabilityCommand = exports.de_PutImageScanningConfigurationCommand = exports.de_PutImageCommand = exports.de_ListTagsForResourceCommand = exports.de_ListImagesCommand = exports.de_InitiateLayerUploadCommand = exports.de_GetRepositoryPolicyCommand = exports.de_GetRegistryScanningConfigurationCommand = exports.de_GetRegistryPolicyCommand = exports.de_GetLifecyclePolicyPreviewCommand = exports.de_GetLifecyclePolicyCommand = exports.de_GetDownloadUrlForLayerCommand = exports.de_GetAuthorizationTokenCommand = exports.de_DescribeRepositoriesCommand = exports.de_DescribeRegistryCommand = exports.de_DescribePullThroughCacheRulesCommand = exports.de_DescribeImageScanFindingsCommand = exports.de_DescribeImagesCommand = exports.de_DescribeImageReplicationStatusCommand = exports.de_DeleteRepositoryPolicyCommand = exports.de_DeleteRepositoryCommand = exports.de_DeleteRegistryPolicyCommand = exports.de_DeletePullThroughCacheRuleCommand = exports.de_DeleteLifecyclePolicyCommand = void 0;
5
- const protocol_http_1 = require("@smithy/protocol-http");
6
- const smithy_client_1 = require("@smithy/smithy-client");
7
- const ECRServiceException_1 = require("../models/ECRServiceException");
8
- const models_0_1 = require("../models/models_0");
9
- const se_BatchCheckLayerAvailabilityCommand = async (input, context) => {
10
- const headers = sharedHeaders("BatchCheckLayerAvailability");
11
- let body;
12
- body = JSON.stringify((0, smithy_client_1._json)(input));
13
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
14
- };
15
- exports.se_BatchCheckLayerAvailabilityCommand = se_BatchCheckLayerAvailabilityCommand;
16
- const se_BatchDeleteImageCommand = async (input, context) => {
17
- const headers = sharedHeaders("BatchDeleteImage");
18
- let body;
19
- body = JSON.stringify((0, smithy_client_1._json)(input));
20
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
21
- };
22
- exports.se_BatchDeleteImageCommand = se_BatchDeleteImageCommand;
23
- const se_BatchGetImageCommand = async (input, context) => {
24
- const headers = sharedHeaders("BatchGetImage");
25
- let body;
26
- body = JSON.stringify((0, smithy_client_1._json)(input));
27
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
28
- };
29
- exports.se_BatchGetImageCommand = se_BatchGetImageCommand;
30
- const se_BatchGetRepositoryScanningConfigurationCommand = async (input, context) => {
31
- const headers = sharedHeaders("BatchGetRepositoryScanningConfiguration");
32
- let body;
33
- body = JSON.stringify((0, smithy_client_1._json)(input));
34
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
- };
36
- exports.se_BatchGetRepositoryScanningConfigurationCommand = se_BatchGetRepositoryScanningConfigurationCommand;
37
- const se_CompleteLayerUploadCommand = async (input, context) => {
38
- const headers = sharedHeaders("CompleteLayerUpload");
39
- let body;
40
- body = JSON.stringify((0, smithy_client_1._json)(input));
41
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
42
- };
43
- exports.se_CompleteLayerUploadCommand = se_CompleteLayerUploadCommand;
44
- const se_CreatePullThroughCacheRuleCommand = async (input, context) => {
45
- const headers = sharedHeaders("CreatePullThroughCacheRule");
46
- let body;
47
- body = JSON.stringify((0, smithy_client_1._json)(input));
48
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
49
- };
50
- exports.se_CreatePullThroughCacheRuleCommand = se_CreatePullThroughCacheRuleCommand;
51
- const se_CreateRepositoryCommand = async (input, context) => {
52
- const headers = sharedHeaders("CreateRepository");
53
- let body;
54
- body = JSON.stringify((0, smithy_client_1._json)(input));
55
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
56
- };
57
- exports.se_CreateRepositoryCommand = se_CreateRepositoryCommand;
58
- const se_DeleteLifecyclePolicyCommand = async (input, context) => {
59
- const headers = sharedHeaders("DeleteLifecyclePolicy");
60
- let body;
61
- body = JSON.stringify((0, smithy_client_1._json)(input));
62
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
63
- };
64
- exports.se_DeleteLifecyclePolicyCommand = se_DeleteLifecyclePolicyCommand;
65
- const se_DeletePullThroughCacheRuleCommand = async (input, context) => {
66
- const headers = sharedHeaders("DeletePullThroughCacheRule");
67
- let body;
68
- body = JSON.stringify((0, smithy_client_1._json)(input));
69
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
- };
71
- exports.se_DeletePullThroughCacheRuleCommand = se_DeletePullThroughCacheRuleCommand;
72
- const se_DeleteRegistryPolicyCommand = async (input, context) => {
73
- const headers = sharedHeaders("DeleteRegistryPolicy");
74
- let body;
75
- body = JSON.stringify((0, smithy_client_1._json)(input));
76
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
77
- };
78
- exports.se_DeleteRegistryPolicyCommand = se_DeleteRegistryPolicyCommand;
79
- const se_DeleteRepositoryCommand = async (input, context) => {
80
- const headers = sharedHeaders("DeleteRepository");
81
- let body;
82
- body = JSON.stringify((0, smithy_client_1._json)(input));
83
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
84
- };
85
- exports.se_DeleteRepositoryCommand = se_DeleteRepositoryCommand;
86
- const se_DeleteRepositoryPolicyCommand = async (input, context) => {
87
- const headers = sharedHeaders("DeleteRepositoryPolicy");
88
- let body;
89
- body = JSON.stringify((0, smithy_client_1._json)(input));
90
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
91
- };
92
- exports.se_DeleteRepositoryPolicyCommand = se_DeleteRepositoryPolicyCommand;
93
- const se_DescribeImageReplicationStatusCommand = async (input, context) => {
94
- const headers = sharedHeaders("DescribeImageReplicationStatus");
95
- let body;
96
- body = JSON.stringify((0, smithy_client_1._json)(input));
97
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
98
- };
99
- exports.se_DescribeImageReplicationStatusCommand = se_DescribeImageReplicationStatusCommand;
100
- const se_DescribeImagesCommand = async (input, context) => {
101
- const headers = sharedHeaders("DescribeImages");
102
- let body;
103
- body = JSON.stringify((0, smithy_client_1._json)(input));
104
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
105
- };
106
- exports.se_DescribeImagesCommand = se_DescribeImagesCommand;
107
- const se_DescribeImageScanFindingsCommand = async (input, context) => {
108
- const headers = sharedHeaders("DescribeImageScanFindings");
109
- let body;
110
- body = JSON.stringify((0, smithy_client_1._json)(input));
111
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
112
- };
113
- exports.se_DescribeImageScanFindingsCommand = se_DescribeImageScanFindingsCommand;
114
- const se_DescribePullThroughCacheRulesCommand = async (input, context) => {
115
- const headers = sharedHeaders("DescribePullThroughCacheRules");
116
- let body;
117
- body = JSON.stringify((0, smithy_client_1._json)(input));
118
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
119
- };
120
- exports.se_DescribePullThroughCacheRulesCommand = se_DescribePullThroughCacheRulesCommand;
121
- const se_DescribeRegistryCommand = async (input, context) => {
122
- const headers = sharedHeaders("DescribeRegistry");
123
- let body;
124
- body = JSON.stringify((0, smithy_client_1._json)(input));
125
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
126
- };
127
- exports.se_DescribeRegistryCommand = se_DescribeRegistryCommand;
128
- const se_DescribeRepositoriesCommand = async (input, context) => {
129
- const headers = sharedHeaders("DescribeRepositories");
130
- let body;
131
- body = JSON.stringify((0, smithy_client_1._json)(input));
132
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
133
- };
134
- exports.se_DescribeRepositoriesCommand = se_DescribeRepositoriesCommand;
135
- const se_GetAuthorizationTokenCommand = async (input, context) => {
136
- const headers = sharedHeaders("GetAuthorizationToken");
137
- let body;
138
- body = JSON.stringify((0, smithy_client_1._json)(input));
139
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
140
- };
141
- exports.se_GetAuthorizationTokenCommand = se_GetAuthorizationTokenCommand;
142
- const se_GetDownloadUrlForLayerCommand = async (input, context) => {
143
- const headers = sharedHeaders("GetDownloadUrlForLayer");
144
- let body;
145
- body = JSON.stringify((0, smithy_client_1._json)(input));
146
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
147
- };
148
- exports.se_GetDownloadUrlForLayerCommand = se_GetDownloadUrlForLayerCommand;
149
- const se_GetLifecyclePolicyCommand = async (input, context) => {
150
- const headers = sharedHeaders("GetLifecyclePolicy");
151
- let body;
152
- body = JSON.stringify((0, smithy_client_1._json)(input));
153
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
154
- };
155
- exports.se_GetLifecyclePolicyCommand = se_GetLifecyclePolicyCommand;
156
- const se_GetLifecyclePolicyPreviewCommand = async (input, context) => {
157
- const headers = sharedHeaders("GetLifecyclePolicyPreview");
158
- let body;
159
- body = JSON.stringify((0, smithy_client_1._json)(input));
160
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
- };
162
- exports.se_GetLifecyclePolicyPreviewCommand = se_GetLifecyclePolicyPreviewCommand;
163
- const se_GetRegistryPolicyCommand = async (input, context) => {
164
- const headers = sharedHeaders("GetRegistryPolicy");
165
- let body;
166
- body = JSON.stringify((0, smithy_client_1._json)(input));
167
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
168
- };
169
- exports.se_GetRegistryPolicyCommand = se_GetRegistryPolicyCommand;
170
- const se_GetRegistryScanningConfigurationCommand = async (input, context) => {
171
- const headers = sharedHeaders("GetRegistryScanningConfiguration");
172
- let body;
173
- body = JSON.stringify((0, smithy_client_1._json)(input));
174
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
175
- };
176
- exports.se_GetRegistryScanningConfigurationCommand = se_GetRegistryScanningConfigurationCommand;
177
- const se_GetRepositoryPolicyCommand = async (input, context) => {
178
- const headers = sharedHeaders("GetRepositoryPolicy");
179
- let body;
180
- body = JSON.stringify((0, smithy_client_1._json)(input));
181
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
182
- };
183
- exports.se_GetRepositoryPolicyCommand = se_GetRepositoryPolicyCommand;
184
- const se_InitiateLayerUploadCommand = async (input, context) => {
185
- const headers = sharedHeaders("InitiateLayerUpload");
186
- let body;
187
- body = JSON.stringify((0, smithy_client_1._json)(input));
188
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
189
- };
190
- exports.se_InitiateLayerUploadCommand = se_InitiateLayerUploadCommand;
191
- const se_ListImagesCommand = async (input, context) => {
192
- const headers = sharedHeaders("ListImages");
193
- let body;
194
- body = JSON.stringify((0, smithy_client_1._json)(input));
195
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
196
- };
197
- exports.se_ListImagesCommand = se_ListImagesCommand;
198
- const se_ListTagsForResourceCommand = async (input, context) => {
199
- const headers = sharedHeaders("ListTagsForResource");
200
- let body;
201
- body = JSON.stringify((0, smithy_client_1._json)(input));
202
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
203
- };
204
- exports.se_ListTagsForResourceCommand = se_ListTagsForResourceCommand;
205
- const se_PutImageCommand = async (input, context) => {
206
- const headers = sharedHeaders("PutImage");
207
- let body;
208
- body = JSON.stringify((0, smithy_client_1._json)(input));
209
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
210
- };
211
- exports.se_PutImageCommand = se_PutImageCommand;
212
- const se_PutImageScanningConfigurationCommand = async (input, context) => {
213
- const headers = sharedHeaders("PutImageScanningConfiguration");
214
- let body;
215
- body = JSON.stringify((0, smithy_client_1._json)(input));
216
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
217
- };
218
- exports.se_PutImageScanningConfigurationCommand = se_PutImageScanningConfigurationCommand;
219
- const se_PutImageTagMutabilityCommand = async (input, context) => {
220
- const headers = sharedHeaders("PutImageTagMutability");
221
- let body;
222
- body = JSON.stringify((0, smithy_client_1._json)(input));
223
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
224
- };
225
- exports.se_PutImageTagMutabilityCommand = se_PutImageTagMutabilityCommand;
226
- const se_PutLifecyclePolicyCommand = async (input, context) => {
227
- const headers = sharedHeaders("PutLifecyclePolicy");
228
- let body;
229
- body = JSON.stringify((0, smithy_client_1._json)(input));
230
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
231
- };
232
- exports.se_PutLifecyclePolicyCommand = se_PutLifecyclePolicyCommand;
233
- const se_PutRegistryPolicyCommand = async (input, context) => {
234
- const headers = sharedHeaders("PutRegistryPolicy");
235
- let body;
236
- body = JSON.stringify((0, smithy_client_1._json)(input));
237
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
238
- };
239
- exports.se_PutRegistryPolicyCommand = se_PutRegistryPolicyCommand;
240
- const se_PutRegistryScanningConfigurationCommand = async (input, context) => {
241
- const headers = sharedHeaders("PutRegistryScanningConfiguration");
242
- let body;
243
- body = JSON.stringify((0, smithy_client_1._json)(input));
244
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
245
- };
246
- exports.se_PutRegistryScanningConfigurationCommand = se_PutRegistryScanningConfigurationCommand;
247
- const se_PutReplicationConfigurationCommand = async (input, context) => {
248
- const headers = sharedHeaders("PutReplicationConfiguration");
249
- let body;
250
- body = JSON.stringify((0, smithy_client_1._json)(input));
251
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
252
- };
253
- exports.se_PutReplicationConfigurationCommand = se_PutReplicationConfigurationCommand;
254
- const se_SetRepositoryPolicyCommand = async (input, context) => {
255
- const headers = sharedHeaders("SetRepositoryPolicy");
256
- let body;
257
- body = JSON.stringify((0, smithy_client_1._json)(input));
258
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
259
- };
260
- exports.se_SetRepositoryPolicyCommand = se_SetRepositoryPolicyCommand;
261
- const se_StartImageScanCommand = async (input, context) => {
262
- const headers = sharedHeaders("StartImageScan");
263
- let body;
264
- body = JSON.stringify((0, smithy_client_1._json)(input));
265
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
266
- };
267
- exports.se_StartImageScanCommand = se_StartImageScanCommand;
268
- const se_StartLifecyclePolicyPreviewCommand = async (input, context) => {
269
- const headers = sharedHeaders("StartLifecyclePolicyPreview");
270
- let body;
271
- body = JSON.stringify((0, smithy_client_1._json)(input));
272
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
273
- };
274
- exports.se_StartLifecyclePolicyPreviewCommand = se_StartLifecyclePolicyPreviewCommand;
275
- const se_TagResourceCommand = async (input, context) => {
276
- const headers = sharedHeaders("TagResource");
277
- let body;
278
- body = JSON.stringify((0, smithy_client_1._json)(input));
279
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
280
- };
281
- exports.se_TagResourceCommand = se_TagResourceCommand;
282
- const se_UntagResourceCommand = async (input, context) => {
283
- const headers = sharedHeaders("UntagResource");
284
- let body;
285
- body = JSON.stringify((0, smithy_client_1._json)(input));
286
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
287
- };
288
- exports.se_UntagResourceCommand = se_UntagResourceCommand;
289
- const se_UpdatePullThroughCacheRuleCommand = async (input, context) => {
290
- const headers = sharedHeaders("UpdatePullThroughCacheRule");
291
- let body;
292
- body = JSON.stringify((0, smithy_client_1._json)(input));
293
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
294
- };
295
- exports.se_UpdatePullThroughCacheRuleCommand = se_UpdatePullThroughCacheRuleCommand;
296
- const se_UploadLayerPartCommand = async (input, context) => {
297
- const headers = sharedHeaders("UploadLayerPart");
298
- let body;
299
- body = JSON.stringify(se_UploadLayerPartRequest(input, context));
300
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
301
- };
302
- exports.se_UploadLayerPartCommand = se_UploadLayerPartCommand;
303
- const se_ValidatePullThroughCacheRuleCommand = async (input, context) => {
304
- const headers = sharedHeaders("ValidatePullThroughCacheRule");
305
- let body;
306
- body = JSON.stringify((0, smithy_client_1._json)(input));
307
- return buildHttpRpcRequest(context, headers, "/", undefined, body);
308
- };
309
- exports.se_ValidatePullThroughCacheRuleCommand = se_ValidatePullThroughCacheRuleCommand;
310
- const de_BatchCheckLayerAvailabilityCommand = async (output, context) => {
311
- if (output.statusCode >= 300) {
312
- return de_BatchCheckLayerAvailabilityCommandError(output, context);
313
- }
314
- const data = await parseBody(output.body, context);
315
- let contents = {};
316
- contents = (0, smithy_client_1._json)(data);
317
- const response = {
318
- $metadata: deserializeMetadata(output),
319
- ...contents,
320
- };
321
- return response;
322
- };
323
- exports.de_BatchCheckLayerAvailabilityCommand = de_BatchCheckLayerAvailabilityCommand;
324
- const de_BatchCheckLayerAvailabilityCommandError = async (output, context) => {
325
- const parsedOutput = {
326
- ...output,
327
- body: await parseErrorBody(output.body, context),
328
- };
329
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
330
- switch (errorCode) {
331
- case "InvalidParameterException":
332
- case "com.amazonaws.ecr#InvalidParameterException":
333
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
334
- case "RepositoryNotFoundException":
335
- case "com.amazonaws.ecr#RepositoryNotFoundException":
336
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
337
- case "ServerException":
338
- case "com.amazonaws.ecr#ServerException":
339
- throw await de_ServerExceptionRes(parsedOutput, context);
340
- default:
341
- const parsedBody = parsedOutput.body;
342
- return throwDefaultError({
343
- output,
344
- parsedBody,
345
- errorCode,
346
- });
347
- }
348
- };
349
- const de_BatchDeleteImageCommand = async (output, context) => {
350
- if (output.statusCode >= 300) {
351
- return de_BatchDeleteImageCommandError(output, context);
352
- }
353
- const data = await parseBody(output.body, context);
354
- let contents = {};
355
- contents = (0, smithy_client_1._json)(data);
356
- const response = {
357
- $metadata: deserializeMetadata(output),
358
- ...contents,
359
- };
360
- return response;
361
- };
362
- exports.de_BatchDeleteImageCommand = de_BatchDeleteImageCommand;
363
- const de_BatchDeleteImageCommandError = async (output, context) => {
364
- const parsedOutput = {
365
- ...output,
366
- body: await parseErrorBody(output.body, context),
367
- };
368
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
369
- switch (errorCode) {
370
- case "InvalidParameterException":
371
- case "com.amazonaws.ecr#InvalidParameterException":
372
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
373
- case "RepositoryNotFoundException":
374
- case "com.amazonaws.ecr#RepositoryNotFoundException":
375
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
376
- case "ServerException":
377
- case "com.amazonaws.ecr#ServerException":
378
- throw await de_ServerExceptionRes(parsedOutput, context);
379
- default:
380
- const parsedBody = parsedOutput.body;
381
- return throwDefaultError({
382
- output,
383
- parsedBody,
384
- errorCode,
385
- });
386
- }
387
- };
388
- const de_BatchGetImageCommand = async (output, context) => {
389
- if (output.statusCode >= 300) {
390
- return de_BatchGetImageCommandError(output, context);
391
- }
392
- const data = await parseBody(output.body, context);
393
- let contents = {};
394
- contents = (0, smithy_client_1._json)(data);
395
- const response = {
396
- $metadata: deserializeMetadata(output),
397
- ...contents,
398
- };
399
- return response;
400
- };
401
- exports.de_BatchGetImageCommand = de_BatchGetImageCommand;
402
- const de_BatchGetImageCommandError = async (output, context) => {
403
- const parsedOutput = {
404
- ...output,
405
- body: await parseErrorBody(output.body, context),
406
- };
407
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
408
- switch (errorCode) {
409
- case "InvalidParameterException":
410
- case "com.amazonaws.ecr#InvalidParameterException":
411
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
412
- case "LimitExceededException":
413
- case "com.amazonaws.ecr#LimitExceededException":
414
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
415
- case "RepositoryNotFoundException":
416
- case "com.amazonaws.ecr#RepositoryNotFoundException":
417
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
418
- case "ServerException":
419
- case "com.amazonaws.ecr#ServerException":
420
- throw await de_ServerExceptionRes(parsedOutput, context);
421
- case "UnableToGetUpstreamImageException":
422
- case "com.amazonaws.ecr#UnableToGetUpstreamImageException":
423
- throw await de_UnableToGetUpstreamImageExceptionRes(parsedOutput, context);
424
- default:
425
- const parsedBody = parsedOutput.body;
426
- return throwDefaultError({
427
- output,
428
- parsedBody,
429
- errorCode,
430
- });
431
- }
432
- };
433
- const de_BatchGetRepositoryScanningConfigurationCommand = async (output, context) => {
434
- if (output.statusCode >= 300) {
435
- return de_BatchGetRepositoryScanningConfigurationCommandError(output, context);
436
- }
437
- const data = await parseBody(output.body, context);
438
- let contents = {};
439
- contents = (0, smithy_client_1._json)(data);
440
- const response = {
441
- $metadata: deserializeMetadata(output),
442
- ...contents,
443
- };
444
- return response;
445
- };
446
- exports.de_BatchGetRepositoryScanningConfigurationCommand = de_BatchGetRepositoryScanningConfigurationCommand;
447
- const de_BatchGetRepositoryScanningConfigurationCommandError = async (output, context) => {
448
- const parsedOutput = {
449
- ...output,
450
- body: await parseErrorBody(output.body, context),
451
- };
452
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
453
- switch (errorCode) {
454
- case "InvalidParameterException":
455
- case "com.amazonaws.ecr#InvalidParameterException":
456
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
457
- case "RepositoryNotFoundException":
458
- case "com.amazonaws.ecr#RepositoryNotFoundException":
459
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
460
- case "ServerException":
461
- case "com.amazonaws.ecr#ServerException":
462
- throw await de_ServerExceptionRes(parsedOutput, context);
463
- case "ValidationException":
464
- case "com.amazonaws.ecr#ValidationException":
465
- throw await de_ValidationExceptionRes(parsedOutput, context);
466
- default:
467
- const parsedBody = parsedOutput.body;
468
- return throwDefaultError({
469
- output,
470
- parsedBody,
471
- errorCode,
472
- });
473
- }
474
- };
475
- const de_CompleteLayerUploadCommand = async (output, context) => {
476
- if (output.statusCode >= 300) {
477
- return de_CompleteLayerUploadCommandError(output, context);
478
- }
479
- const data = await parseBody(output.body, context);
480
- let contents = {};
481
- contents = (0, smithy_client_1._json)(data);
482
- const response = {
483
- $metadata: deserializeMetadata(output),
484
- ...contents,
485
- };
486
- return response;
487
- };
488
- exports.de_CompleteLayerUploadCommand = de_CompleteLayerUploadCommand;
489
- const de_CompleteLayerUploadCommandError = async (output, context) => {
490
- const parsedOutput = {
491
- ...output,
492
- body: await parseErrorBody(output.body, context),
493
- };
494
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
495
- switch (errorCode) {
496
- case "EmptyUploadException":
497
- case "com.amazonaws.ecr#EmptyUploadException":
498
- throw await de_EmptyUploadExceptionRes(parsedOutput, context);
499
- case "InvalidLayerException":
500
- case "com.amazonaws.ecr#InvalidLayerException":
501
- throw await de_InvalidLayerExceptionRes(parsedOutput, context);
502
- case "InvalidParameterException":
503
- case "com.amazonaws.ecr#InvalidParameterException":
504
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
505
- case "KmsException":
506
- case "com.amazonaws.ecr#KmsException":
507
- throw await de_KmsExceptionRes(parsedOutput, context);
508
- case "LayerAlreadyExistsException":
509
- case "com.amazonaws.ecr#LayerAlreadyExistsException":
510
- throw await de_LayerAlreadyExistsExceptionRes(parsedOutput, context);
511
- case "LayerPartTooSmallException":
512
- case "com.amazonaws.ecr#LayerPartTooSmallException":
513
- throw await de_LayerPartTooSmallExceptionRes(parsedOutput, context);
514
- case "RepositoryNotFoundException":
515
- case "com.amazonaws.ecr#RepositoryNotFoundException":
516
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
517
- case "ServerException":
518
- case "com.amazonaws.ecr#ServerException":
519
- throw await de_ServerExceptionRes(parsedOutput, context);
520
- case "UploadNotFoundException":
521
- case "com.amazonaws.ecr#UploadNotFoundException":
522
- throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
523
- default:
524
- const parsedBody = parsedOutput.body;
525
- return throwDefaultError({
526
- output,
527
- parsedBody,
528
- errorCode,
529
- });
530
- }
531
- };
532
- const de_CreatePullThroughCacheRuleCommand = async (output, context) => {
533
- if (output.statusCode >= 300) {
534
- return de_CreatePullThroughCacheRuleCommandError(output, context);
535
- }
536
- const data = await parseBody(output.body, context);
537
- let contents = {};
538
- contents = de_CreatePullThroughCacheRuleResponse(data, context);
539
- const response = {
540
- $metadata: deserializeMetadata(output),
541
- ...contents,
542
- };
543
- return response;
544
- };
545
- exports.de_CreatePullThroughCacheRuleCommand = de_CreatePullThroughCacheRuleCommand;
546
- const de_CreatePullThroughCacheRuleCommandError = async (output, context) => {
547
- const parsedOutput = {
548
- ...output,
549
- body: await parseErrorBody(output.body, context),
550
- };
551
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
552
- switch (errorCode) {
553
- case "InvalidParameterException":
554
- case "com.amazonaws.ecr#InvalidParameterException":
555
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
556
- case "LimitExceededException":
557
- case "com.amazonaws.ecr#LimitExceededException":
558
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
559
- case "PullThroughCacheRuleAlreadyExistsException":
560
- case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
561
- throw await de_PullThroughCacheRuleAlreadyExistsExceptionRes(parsedOutput, context);
562
- case "SecretNotFoundException":
563
- case "com.amazonaws.ecr#SecretNotFoundException":
564
- throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
565
- case "ServerException":
566
- case "com.amazonaws.ecr#ServerException":
567
- throw await de_ServerExceptionRes(parsedOutput, context);
568
- case "UnableToAccessSecretException":
569
- case "com.amazonaws.ecr#UnableToAccessSecretException":
570
- throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
571
- case "UnableToDecryptSecretValueException":
572
- case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
573
- throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
574
- case "UnsupportedUpstreamRegistryException":
575
- case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
576
- throw await de_UnsupportedUpstreamRegistryExceptionRes(parsedOutput, context);
577
- case "ValidationException":
578
- case "com.amazonaws.ecr#ValidationException":
579
- throw await de_ValidationExceptionRes(parsedOutput, context);
580
- default:
581
- const parsedBody = parsedOutput.body;
582
- return throwDefaultError({
583
- output,
584
- parsedBody,
585
- errorCode,
586
- });
587
- }
588
- };
589
- const de_CreateRepositoryCommand = async (output, context) => {
590
- if (output.statusCode >= 300) {
591
- return de_CreateRepositoryCommandError(output, context);
592
- }
593
- const data = await parseBody(output.body, context);
594
- let contents = {};
595
- contents = de_CreateRepositoryResponse(data, context);
596
- const response = {
597
- $metadata: deserializeMetadata(output),
598
- ...contents,
599
- };
600
- return response;
601
- };
602
- exports.de_CreateRepositoryCommand = de_CreateRepositoryCommand;
603
- const de_CreateRepositoryCommandError = async (output, context) => {
604
- const parsedOutput = {
605
- ...output,
606
- body: await parseErrorBody(output.body, context),
607
- };
608
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
609
- switch (errorCode) {
610
- case "InvalidParameterException":
611
- case "com.amazonaws.ecr#InvalidParameterException":
612
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
613
- case "InvalidTagParameterException":
614
- case "com.amazonaws.ecr#InvalidTagParameterException":
615
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
616
- case "KmsException":
617
- case "com.amazonaws.ecr#KmsException":
618
- throw await de_KmsExceptionRes(parsedOutput, context);
619
- case "LimitExceededException":
620
- case "com.amazonaws.ecr#LimitExceededException":
621
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
622
- case "RepositoryAlreadyExistsException":
623
- case "com.amazonaws.ecr#RepositoryAlreadyExistsException":
624
- throw await de_RepositoryAlreadyExistsExceptionRes(parsedOutput, context);
625
- case "ServerException":
626
- case "com.amazonaws.ecr#ServerException":
627
- throw await de_ServerExceptionRes(parsedOutput, context);
628
- case "TooManyTagsException":
629
- case "com.amazonaws.ecr#TooManyTagsException":
630
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
631
- default:
632
- const parsedBody = parsedOutput.body;
633
- return throwDefaultError({
634
- output,
635
- parsedBody,
636
- errorCode,
637
- });
638
- }
639
- };
640
- const de_DeleteLifecyclePolicyCommand = async (output, context) => {
641
- if (output.statusCode >= 300) {
642
- return de_DeleteLifecyclePolicyCommandError(output, context);
643
- }
644
- const data = await parseBody(output.body, context);
645
- let contents = {};
646
- contents = de_DeleteLifecyclePolicyResponse(data, context);
647
- const response = {
648
- $metadata: deserializeMetadata(output),
649
- ...contents,
650
- };
651
- return response;
652
- };
653
- exports.de_DeleteLifecyclePolicyCommand = de_DeleteLifecyclePolicyCommand;
654
- const de_DeleteLifecyclePolicyCommandError = async (output, context) => {
655
- const parsedOutput = {
656
- ...output,
657
- body: await parseErrorBody(output.body, context),
658
- };
659
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
660
- switch (errorCode) {
661
- case "InvalidParameterException":
662
- case "com.amazonaws.ecr#InvalidParameterException":
663
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
664
- case "LifecyclePolicyNotFoundException":
665
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
666
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
667
- case "RepositoryNotFoundException":
668
- case "com.amazonaws.ecr#RepositoryNotFoundException":
669
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
670
- case "ServerException":
671
- case "com.amazonaws.ecr#ServerException":
672
- throw await de_ServerExceptionRes(parsedOutput, context);
673
- case "ValidationException":
674
- case "com.amazonaws.ecr#ValidationException":
675
- throw await de_ValidationExceptionRes(parsedOutput, context);
676
- default:
677
- const parsedBody = parsedOutput.body;
678
- return throwDefaultError({
679
- output,
680
- parsedBody,
681
- errorCode,
682
- });
683
- }
684
- };
685
- const de_DeletePullThroughCacheRuleCommand = async (output, context) => {
686
- if (output.statusCode >= 300) {
687
- return de_DeletePullThroughCacheRuleCommandError(output, context);
688
- }
689
- const data = await parseBody(output.body, context);
690
- let contents = {};
691
- contents = de_DeletePullThroughCacheRuleResponse(data, context);
692
- const response = {
693
- $metadata: deserializeMetadata(output),
694
- ...contents,
695
- };
696
- return response;
697
- };
698
- exports.de_DeletePullThroughCacheRuleCommand = de_DeletePullThroughCacheRuleCommand;
699
- const de_DeletePullThroughCacheRuleCommandError = async (output, context) => {
700
- const parsedOutput = {
701
- ...output,
702
- body: await parseErrorBody(output.body, context),
703
- };
704
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
705
- switch (errorCode) {
706
- case "InvalidParameterException":
707
- case "com.amazonaws.ecr#InvalidParameterException":
708
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
709
- case "PullThroughCacheRuleNotFoundException":
710
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
711
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
712
- case "ServerException":
713
- case "com.amazonaws.ecr#ServerException":
714
- throw await de_ServerExceptionRes(parsedOutput, context);
715
- case "ValidationException":
716
- case "com.amazonaws.ecr#ValidationException":
717
- throw await de_ValidationExceptionRes(parsedOutput, context);
718
- default:
719
- const parsedBody = parsedOutput.body;
720
- return throwDefaultError({
721
- output,
722
- parsedBody,
723
- errorCode,
724
- });
725
- }
726
- };
727
- const de_DeleteRegistryPolicyCommand = async (output, context) => {
728
- if (output.statusCode >= 300) {
729
- return de_DeleteRegistryPolicyCommandError(output, context);
730
- }
731
- const data = await parseBody(output.body, context);
732
- let contents = {};
733
- contents = (0, smithy_client_1._json)(data);
734
- const response = {
735
- $metadata: deserializeMetadata(output),
736
- ...contents,
737
- };
738
- return response;
739
- };
740
- exports.de_DeleteRegistryPolicyCommand = de_DeleteRegistryPolicyCommand;
741
- const de_DeleteRegistryPolicyCommandError = async (output, context) => {
742
- const parsedOutput = {
743
- ...output,
744
- body: await parseErrorBody(output.body, context),
745
- };
746
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
747
- switch (errorCode) {
748
- case "InvalidParameterException":
749
- case "com.amazonaws.ecr#InvalidParameterException":
750
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
751
- case "RegistryPolicyNotFoundException":
752
- case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
753
- throw await de_RegistryPolicyNotFoundExceptionRes(parsedOutput, context);
754
- case "ServerException":
755
- case "com.amazonaws.ecr#ServerException":
756
- throw await de_ServerExceptionRes(parsedOutput, context);
757
- case "ValidationException":
758
- case "com.amazonaws.ecr#ValidationException":
759
- throw await de_ValidationExceptionRes(parsedOutput, context);
760
- default:
761
- const parsedBody = parsedOutput.body;
762
- return throwDefaultError({
763
- output,
764
- parsedBody,
765
- errorCode,
766
- });
767
- }
768
- };
769
- const de_DeleteRepositoryCommand = async (output, context) => {
770
- if (output.statusCode >= 300) {
771
- return de_DeleteRepositoryCommandError(output, context);
772
- }
773
- const data = await parseBody(output.body, context);
774
- let contents = {};
775
- contents = de_DeleteRepositoryResponse(data, context);
776
- const response = {
777
- $metadata: deserializeMetadata(output),
778
- ...contents,
779
- };
780
- return response;
781
- };
782
- exports.de_DeleteRepositoryCommand = de_DeleteRepositoryCommand;
783
- const de_DeleteRepositoryCommandError = async (output, context) => {
784
- const parsedOutput = {
785
- ...output,
786
- body: await parseErrorBody(output.body, context),
787
- };
788
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
789
- switch (errorCode) {
790
- case "InvalidParameterException":
791
- case "com.amazonaws.ecr#InvalidParameterException":
792
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
793
- case "KmsException":
794
- case "com.amazonaws.ecr#KmsException":
795
- throw await de_KmsExceptionRes(parsedOutput, context);
796
- case "RepositoryNotEmptyException":
797
- case "com.amazonaws.ecr#RepositoryNotEmptyException":
798
- throw await de_RepositoryNotEmptyExceptionRes(parsedOutput, context);
799
- case "RepositoryNotFoundException":
800
- case "com.amazonaws.ecr#RepositoryNotFoundException":
801
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
802
- case "ServerException":
803
- case "com.amazonaws.ecr#ServerException":
804
- throw await de_ServerExceptionRes(parsedOutput, context);
805
- default:
806
- const parsedBody = parsedOutput.body;
807
- return throwDefaultError({
808
- output,
809
- parsedBody,
810
- errorCode,
811
- });
812
- }
813
- };
814
- const de_DeleteRepositoryPolicyCommand = async (output, context) => {
815
- if (output.statusCode >= 300) {
816
- return de_DeleteRepositoryPolicyCommandError(output, context);
817
- }
818
- const data = await parseBody(output.body, context);
819
- let contents = {};
820
- contents = (0, smithy_client_1._json)(data);
821
- const response = {
822
- $metadata: deserializeMetadata(output),
823
- ...contents,
824
- };
825
- return response;
826
- };
827
- exports.de_DeleteRepositoryPolicyCommand = de_DeleteRepositoryPolicyCommand;
828
- const de_DeleteRepositoryPolicyCommandError = async (output, context) => {
829
- const parsedOutput = {
830
- ...output,
831
- body: await parseErrorBody(output.body, context),
832
- };
833
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
834
- switch (errorCode) {
835
- case "InvalidParameterException":
836
- case "com.amazonaws.ecr#InvalidParameterException":
837
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
838
- case "RepositoryNotFoundException":
839
- case "com.amazonaws.ecr#RepositoryNotFoundException":
840
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
841
- case "RepositoryPolicyNotFoundException":
842
- case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
843
- throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
844
- case "ServerException":
845
- case "com.amazonaws.ecr#ServerException":
846
- throw await de_ServerExceptionRes(parsedOutput, context);
847
- default:
848
- const parsedBody = parsedOutput.body;
849
- return throwDefaultError({
850
- output,
851
- parsedBody,
852
- errorCode,
853
- });
854
- }
855
- };
856
- const de_DescribeImageReplicationStatusCommand = async (output, context) => {
857
- if (output.statusCode >= 300) {
858
- return de_DescribeImageReplicationStatusCommandError(output, context);
859
- }
860
- const data = await parseBody(output.body, context);
861
- let contents = {};
862
- contents = (0, smithy_client_1._json)(data);
863
- const response = {
864
- $metadata: deserializeMetadata(output),
865
- ...contents,
866
- };
867
- return response;
868
- };
869
- exports.de_DescribeImageReplicationStatusCommand = de_DescribeImageReplicationStatusCommand;
870
- const de_DescribeImageReplicationStatusCommandError = async (output, context) => {
871
- const parsedOutput = {
872
- ...output,
873
- body: await parseErrorBody(output.body, context),
874
- };
875
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
876
- switch (errorCode) {
877
- case "ImageNotFoundException":
878
- case "com.amazonaws.ecr#ImageNotFoundException":
879
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
880
- case "InvalidParameterException":
881
- case "com.amazonaws.ecr#InvalidParameterException":
882
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
883
- case "RepositoryNotFoundException":
884
- case "com.amazonaws.ecr#RepositoryNotFoundException":
885
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
886
- case "ServerException":
887
- case "com.amazonaws.ecr#ServerException":
888
- throw await de_ServerExceptionRes(parsedOutput, context);
889
- case "ValidationException":
890
- case "com.amazonaws.ecr#ValidationException":
891
- throw await de_ValidationExceptionRes(parsedOutput, context);
892
- default:
893
- const parsedBody = parsedOutput.body;
894
- return throwDefaultError({
895
- output,
896
- parsedBody,
897
- errorCode,
898
- });
899
- }
900
- };
901
- const de_DescribeImagesCommand = async (output, context) => {
902
- if (output.statusCode >= 300) {
903
- return de_DescribeImagesCommandError(output, context);
904
- }
905
- const data = await parseBody(output.body, context);
906
- let contents = {};
907
- contents = de_DescribeImagesResponse(data, context);
908
- const response = {
909
- $metadata: deserializeMetadata(output),
910
- ...contents,
911
- };
912
- return response;
913
- };
914
- exports.de_DescribeImagesCommand = de_DescribeImagesCommand;
915
- const de_DescribeImagesCommandError = async (output, context) => {
916
- const parsedOutput = {
917
- ...output,
918
- body: await parseErrorBody(output.body, context),
919
- };
920
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
921
- switch (errorCode) {
922
- case "ImageNotFoundException":
923
- case "com.amazonaws.ecr#ImageNotFoundException":
924
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
925
- case "InvalidParameterException":
926
- case "com.amazonaws.ecr#InvalidParameterException":
927
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
928
- case "RepositoryNotFoundException":
929
- case "com.amazonaws.ecr#RepositoryNotFoundException":
930
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
931
- case "ServerException":
932
- case "com.amazonaws.ecr#ServerException":
933
- throw await de_ServerExceptionRes(parsedOutput, context);
934
- default:
935
- const parsedBody = parsedOutput.body;
936
- return throwDefaultError({
937
- output,
938
- parsedBody,
939
- errorCode,
940
- });
941
- }
942
- };
943
- const de_DescribeImageScanFindingsCommand = async (output, context) => {
944
- if (output.statusCode >= 300) {
945
- return de_DescribeImageScanFindingsCommandError(output, context);
946
- }
947
- const data = await parseBody(output.body, context);
948
- let contents = {};
949
- contents = de_DescribeImageScanFindingsResponse(data, context);
950
- const response = {
951
- $metadata: deserializeMetadata(output),
952
- ...contents,
953
- };
954
- return response;
955
- };
956
- exports.de_DescribeImageScanFindingsCommand = de_DescribeImageScanFindingsCommand;
957
- const de_DescribeImageScanFindingsCommandError = async (output, context) => {
958
- const parsedOutput = {
959
- ...output,
960
- body: await parseErrorBody(output.body, context),
961
- };
962
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
963
- switch (errorCode) {
964
- case "ImageNotFoundException":
965
- case "com.amazonaws.ecr#ImageNotFoundException":
966
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
967
- case "InvalidParameterException":
968
- case "com.amazonaws.ecr#InvalidParameterException":
969
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
970
- case "RepositoryNotFoundException":
971
- case "com.amazonaws.ecr#RepositoryNotFoundException":
972
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
973
- case "ScanNotFoundException":
974
- case "com.amazonaws.ecr#ScanNotFoundException":
975
- throw await de_ScanNotFoundExceptionRes(parsedOutput, context);
976
- case "ServerException":
977
- case "com.amazonaws.ecr#ServerException":
978
- throw await de_ServerExceptionRes(parsedOutput, context);
979
- case "ValidationException":
980
- case "com.amazonaws.ecr#ValidationException":
981
- throw await de_ValidationExceptionRes(parsedOutput, context);
982
- default:
983
- const parsedBody = parsedOutput.body;
984
- return throwDefaultError({
985
- output,
986
- parsedBody,
987
- errorCode,
988
- });
989
- }
990
- };
991
- const de_DescribePullThroughCacheRulesCommand = async (output, context) => {
992
- if (output.statusCode >= 300) {
993
- return de_DescribePullThroughCacheRulesCommandError(output, context);
994
- }
995
- const data = await parseBody(output.body, context);
996
- let contents = {};
997
- contents = de_DescribePullThroughCacheRulesResponse(data, context);
998
- const response = {
999
- $metadata: deserializeMetadata(output),
1000
- ...contents,
1001
- };
1002
- return response;
1003
- };
1004
- exports.de_DescribePullThroughCacheRulesCommand = de_DescribePullThroughCacheRulesCommand;
1005
- const de_DescribePullThroughCacheRulesCommandError = async (output, context) => {
1006
- const parsedOutput = {
1007
- ...output,
1008
- body: await parseErrorBody(output.body, context),
1009
- };
1010
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1011
- switch (errorCode) {
1012
- case "InvalidParameterException":
1013
- case "com.amazonaws.ecr#InvalidParameterException":
1014
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1015
- case "PullThroughCacheRuleNotFoundException":
1016
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
1017
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
1018
- case "ServerException":
1019
- case "com.amazonaws.ecr#ServerException":
1020
- throw await de_ServerExceptionRes(parsedOutput, context);
1021
- case "ValidationException":
1022
- case "com.amazonaws.ecr#ValidationException":
1023
- throw await de_ValidationExceptionRes(parsedOutput, context);
1024
- default:
1025
- const parsedBody = parsedOutput.body;
1026
- return throwDefaultError({
1027
- output,
1028
- parsedBody,
1029
- errorCode,
1030
- });
1031
- }
1032
- };
1033
- const de_DescribeRegistryCommand = async (output, context) => {
1034
- if (output.statusCode >= 300) {
1035
- return de_DescribeRegistryCommandError(output, context);
1036
- }
1037
- const data = await parseBody(output.body, context);
1038
- let contents = {};
1039
- contents = (0, smithy_client_1._json)(data);
1040
- const response = {
1041
- $metadata: deserializeMetadata(output),
1042
- ...contents,
1043
- };
1044
- return response;
1045
- };
1046
- exports.de_DescribeRegistryCommand = de_DescribeRegistryCommand;
1047
- const de_DescribeRegistryCommandError = async (output, context) => {
1048
- const parsedOutput = {
1049
- ...output,
1050
- body: await parseErrorBody(output.body, context),
1051
- };
1052
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1053
- switch (errorCode) {
1054
- case "InvalidParameterException":
1055
- case "com.amazonaws.ecr#InvalidParameterException":
1056
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1057
- case "ServerException":
1058
- case "com.amazonaws.ecr#ServerException":
1059
- throw await de_ServerExceptionRes(parsedOutput, context);
1060
- case "ValidationException":
1061
- case "com.amazonaws.ecr#ValidationException":
1062
- throw await de_ValidationExceptionRes(parsedOutput, context);
1063
- default:
1064
- const parsedBody = parsedOutput.body;
1065
- return throwDefaultError({
1066
- output,
1067
- parsedBody,
1068
- errorCode,
1069
- });
1070
- }
1071
- };
1072
- const de_DescribeRepositoriesCommand = async (output, context) => {
1073
- if (output.statusCode >= 300) {
1074
- return de_DescribeRepositoriesCommandError(output, context);
1075
- }
1076
- const data = await parseBody(output.body, context);
1077
- let contents = {};
1078
- contents = de_DescribeRepositoriesResponse(data, context);
1079
- const response = {
1080
- $metadata: deserializeMetadata(output),
1081
- ...contents,
1082
- };
1083
- return response;
1084
- };
1085
- exports.de_DescribeRepositoriesCommand = de_DescribeRepositoriesCommand;
1086
- const de_DescribeRepositoriesCommandError = async (output, context) => {
1087
- const parsedOutput = {
1088
- ...output,
1089
- body: await parseErrorBody(output.body, context),
1090
- };
1091
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1092
- switch (errorCode) {
1093
- case "InvalidParameterException":
1094
- case "com.amazonaws.ecr#InvalidParameterException":
1095
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1096
- case "RepositoryNotFoundException":
1097
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1098
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1099
- case "ServerException":
1100
- case "com.amazonaws.ecr#ServerException":
1101
- throw await de_ServerExceptionRes(parsedOutput, context);
1102
- default:
1103
- const parsedBody = parsedOutput.body;
1104
- return throwDefaultError({
1105
- output,
1106
- parsedBody,
1107
- errorCode,
1108
- });
1109
- }
1110
- };
1111
- const de_GetAuthorizationTokenCommand = async (output, context) => {
1112
- if (output.statusCode >= 300) {
1113
- return de_GetAuthorizationTokenCommandError(output, context);
1114
- }
1115
- const data = await parseBody(output.body, context);
1116
- let contents = {};
1117
- contents = de_GetAuthorizationTokenResponse(data, context);
1118
- const response = {
1119
- $metadata: deserializeMetadata(output),
1120
- ...contents,
1121
- };
1122
- return response;
1123
- };
1124
- exports.de_GetAuthorizationTokenCommand = de_GetAuthorizationTokenCommand;
1125
- const de_GetAuthorizationTokenCommandError = async (output, context) => {
1126
- const parsedOutput = {
1127
- ...output,
1128
- body: await parseErrorBody(output.body, context),
1129
- };
1130
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1131
- switch (errorCode) {
1132
- case "InvalidParameterException":
1133
- case "com.amazonaws.ecr#InvalidParameterException":
1134
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1135
- case "ServerException":
1136
- case "com.amazonaws.ecr#ServerException":
1137
- throw await de_ServerExceptionRes(parsedOutput, context);
1138
- default:
1139
- const parsedBody = parsedOutput.body;
1140
- return throwDefaultError({
1141
- output,
1142
- parsedBody,
1143
- errorCode,
1144
- });
1145
- }
1146
- };
1147
- const de_GetDownloadUrlForLayerCommand = async (output, context) => {
1148
- if (output.statusCode >= 300) {
1149
- return de_GetDownloadUrlForLayerCommandError(output, context);
1150
- }
1151
- const data = await parseBody(output.body, context);
1152
- let contents = {};
1153
- contents = (0, smithy_client_1._json)(data);
1154
- const response = {
1155
- $metadata: deserializeMetadata(output),
1156
- ...contents,
1157
- };
1158
- return response;
1159
- };
1160
- exports.de_GetDownloadUrlForLayerCommand = de_GetDownloadUrlForLayerCommand;
1161
- const de_GetDownloadUrlForLayerCommandError = async (output, context) => {
1162
- const parsedOutput = {
1163
- ...output,
1164
- body: await parseErrorBody(output.body, context),
1165
- };
1166
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1167
- switch (errorCode) {
1168
- case "InvalidParameterException":
1169
- case "com.amazonaws.ecr#InvalidParameterException":
1170
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1171
- case "LayerInaccessibleException":
1172
- case "com.amazonaws.ecr#LayerInaccessibleException":
1173
- throw await de_LayerInaccessibleExceptionRes(parsedOutput, context);
1174
- case "LayersNotFoundException":
1175
- case "com.amazonaws.ecr#LayersNotFoundException":
1176
- throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
1177
- case "RepositoryNotFoundException":
1178
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1179
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1180
- case "ServerException":
1181
- case "com.amazonaws.ecr#ServerException":
1182
- throw await de_ServerExceptionRes(parsedOutput, context);
1183
- case "UnableToGetUpstreamLayerException":
1184
- case "com.amazonaws.ecr#UnableToGetUpstreamLayerException":
1185
- throw await de_UnableToGetUpstreamLayerExceptionRes(parsedOutput, context);
1186
- default:
1187
- const parsedBody = parsedOutput.body;
1188
- return throwDefaultError({
1189
- output,
1190
- parsedBody,
1191
- errorCode,
1192
- });
1193
- }
1194
- };
1195
- const de_GetLifecyclePolicyCommand = async (output, context) => {
1196
- if (output.statusCode >= 300) {
1197
- return de_GetLifecyclePolicyCommandError(output, context);
1198
- }
1199
- const data = await parseBody(output.body, context);
1200
- let contents = {};
1201
- contents = de_GetLifecyclePolicyResponse(data, context);
1202
- const response = {
1203
- $metadata: deserializeMetadata(output),
1204
- ...contents,
1205
- };
1206
- return response;
1207
- };
1208
- exports.de_GetLifecyclePolicyCommand = de_GetLifecyclePolicyCommand;
1209
- const de_GetLifecyclePolicyCommandError = async (output, context) => {
1210
- const parsedOutput = {
1211
- ...output,
1212
- body: await parseErrorBody(output.body, context),
1213
- };
1214
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1215
- switch (errorCode) {
1216
- case "InvalidParameterException":
1217
- case "com.amazonaws.ecr#InvalidParameterException":
1218
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1219
- case "LifecyclePolicyNotFoundException":
1220
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
1221
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
1222
- case "RepositoryNotFoundException":
1223
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1224
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1225
- case "ServerException":
1226
- case "com.amazonaws.ecr#ServerException":
1227
- throw await de_ServerExceptionRes(parsedOutput, context);
1228
- case "ValidationException":
1229
- case "com.amazonaws.ecr#ValidationException":
1230
- throw await de_ValidationExceptionRes(parsedOutput, context);
1231
- default:
1232
- const parsedBody = parsedOutput.body;
1233
- return throwDefaultError({
1234
- output,
1235
- parsedBody,
1236
- errorCode,
1237
- });
1238
- }
1239
- };
1240
- const de_GetLifecyclePolicyPreviewCommand = async (output, context) => {
1241
- if (output.statusCode >= 300) {
1242
- return de_GetLifecyclePolicyPreviewCommandError(output, context);
1243
- }
1244
- const data = await parseBody(output.body, context);
1245
- let contents = {};
1246
- contents = de_GetLifecyclePolicyPreviewResponse(data, context);
1247
- const response = {
1248
- $metadata: deserializeMetadata(output),
1249
- ...contents,
1250
- };
1251
- return response;
1252
- };
1253
- exports.de_GetLifecyclePolicyPreviewCommand = de_GetLifecyclePolicyPreviewCommand;
1254
- const de_GetLifecyclePolicyPreviewCommandError = async (output, context) => {
1255
- const parsedOutput = {
1256
- ...output,
1257
- body: await parseErrorBody(output.body, context),
1258
- };
1259
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1260
- switch (errorCode) {
1261
- case "InvalidParameterException":
1262
- case "com.amazonaws.ecr#InvalidParameterException":
1263
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1264
- case "LifecyclePolicyPreviewNotFoundException":
1265
- case "com.amazonaws.ecr#LifecyclePolicyPreviewNotFoundException":
1266
- throw await de_LifecyclePolicyPreviewNotFoundExceptionRes(parsedOutput, context);
1267
- case "RepositoryNotFoundException":
1268
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1269
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1270
- case "ServerException":
1271
- case "com.amazonaws.ecr#ServerException":
1272
- throw await de_ServerExceptionRes(parsedOutput, context);
1273
- case "ValidationException":
1274
- case "com.amazonaws.ecr#ValidationException":
1275
- throw await de_ValidationExceptionRes(parsedOutput, context);
1276
- default:
1277
- const parsedBody = parsedOutput.body;
1278
- return throwDefaultError({
1279
- output,
1280
- parsedBody,
1281
- errorCode,
1282
- });
1283
- }
1284
- };
1285
- const de_GetRegistryPolicyCommand = async (output, context) => {
1286
- if (output.statusCode >= 300) {
1287
- return de_GetRegistryPolicyCommandError(output, context);
1288
- }
1289
- const data = await parseBody(output.body, context);
1290
- let contents = {};
1291
- contents = (0, smithy_client_1._json)(data);
1292
- const response = {
1293
- $metadata: deserializeMetadata(output),
1294
- ...contents,
1295
- };
1296
- return response;
1297
- };
1298
- exports.de_GetRegistryPolicyCommand = de_GetRegistryPolicyCommand;
1299
- const de_GetRegistryPolicyCommandError = async (output, context) => {
1300
- const parsedOutput = {
1301
- ...output,
1302
- body: await parseErrorBody(output.body, context),
1303
- };
1304
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1305
- switch (errorCode) {
1306
- case "InvalidParameterException":
1307
- case "com.amazonaws.ecr#InvalidParameterException":
1308
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1309
- case "RegistryPolicyNotFoundException":
1310
- case "com.amazonaws.ecr#RegistryPolicyNotFoundException":
1311
- throw await de_RegistryPolicyNotFoundExceptionRes(parsedOutput, context);
1312
- case "ServerException":
1313
- case "com.amazonaws.ecr#ServerException":
1314
- throw await de_ServerExceptionRes(parsedOutput, context);
1315
- case "ValidationException":
1316
- case "com.amazonaws.ecr#ValidationException":
1317
- throw await de_ValidationExceptionRes(parsedOutput, context);
1318
- default:
1319
- const parsedBody = parsedOutput.body;
1320
- return throwDefaultError({
1321
- output,
1322
- parsedBody,
1323
- errorCode,
1324
- });
1325
- }
1326
- };
1327
- const de_GetRegistryScanningConfigurationCommand = async (output, context) => {
1328
- if (output.statusCode >= 300) {
1329
- return de_GetRegistryScanningConfigurationCommandError(output, context);
1330
- }
1331
- const data = await parseBody(output.body, context);
1332
- let contents = {};
1333
- contents = (0, smithy_client_1._json)(data);
1334
- const response = {
1335
- $metadata: deserializeMetadata(output),
1336
- ...contents,
1337
- };
1338
- return response;
1339
- };
1340
- exports.de_GetRegistryScanningConfigurationCommand = de_GetRegistryScanningConfigurationCommand;
1341
- const de_GetRegistryScanningConfigurationCommandError = async (output, context) => {
1342
- const parsedOutput = {
1343
- ...output,
1344
- body: await parseErrorBody(output.body, context),
1345
- };
1346
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1347
- switch (errorCode) {
1348
- case "InvalidParameterException":
1349
- case "com.amazonaws.ecr#InvalidParameterException":
1350
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1351
- case "ServerException":
1352
- case "com.amazonaws.ecr#ServerException":
1353
- throw await de_ServerExceptionRes(parsedOutput, context);
1354
- case "ValidationException":
1355
- case "com.amazonaws.ecr#ValidationException":
1356
- throw await de_ValidationExceptionRes(parsedOutput, context);
1357
- default:
1358
- const parsedBody = parsedOutput.body;
1359
- return throwDefaultError({
1360
- output,
1361
- parsedBody,
1362
- errorCode,
1363
- });
1364
- }
1365
- };
1366
- const de_GetRepositoryPolicyCommand = async (output, context) => {
1367
- if (output.statusCode >= 300) {
1368
- return de_GetRepositoryPolicyCommandError(output, context);
1369
- }
1370
- const data = await parseBody(output.body, context);
1371
- let contents = {};
1372
- contents = (0, smithy_client_1._json)(data);
1373
- const response = {
1374
- $metadata: deserializeMetadata(output),
1375
- ...contents,
1376
- };
1377
- return response;
1378
- };
1379
- exports.de_GetRepositoryPolicyCommand = de_GetRepositoryPolicyCommand;
1380
- const de_GetRepositoryPolicyCommandError = async (output, context) => {
1381
- const parsedOutput = {
1382
- ...output,
1383
- body: await parseErrorBody(output.body, context),
1384
- };
1385
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1386
- switch (errorCode) {
1387
- case "InvalidParameterException":
1388
- case "com.amazonaws.ecr#InvalidParameterException":
1389
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1390
- case "RepositoryNotFoundException":
1391
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1392
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1393
- case "RepositoryPolicyNotFoundException":
1394
- case "com.amazonaws.ecr#RepositoryPolicyNotFoundException":
1395
- throw await de_RepositoryPolicyNotFoundExceptionRes(parsedOutput, context);
1396
- case "ServerException":
1397
- case "com.amazonaws.ecr#ServerException":
1398
- throw await de_ServerExceptionRes(parsedOutput, context);
1399
- default:
1400
- const parsedBody = parsedOutput.body;
1401
- return throwDefaultError({
1402
- output,
1403
- parsedBody,
1404
- errorCode,
1405
- });
1406
- }
1407
- };
1408
- const de_InitiateLayerUploadCommand = async (output, context) => {
1409
- if (output.statusCode >= 300) {
1410
- return de_InitiateLayerUploadCommandError(output, context);
1411
- }
1412
- const data = await parseBody(output.body, context);
1413
- let contents = {};
1414
- contents = (0, smithy_client_1._json)(data);
1415
- const response = {
1416
- $metadata: deserializeMetadata(output),
1417
- ...contents,
1418
- };
1419
- return response;
1420
- };
1421
- exports.de_InitiateLayerUploadCommand = de_InitiateLayerUploadCommand;
1422
- const de_InitiateLayerUploadCommandError = async (output, context) => {
1423
- const parsedOutput = {
1424
- ...output,
1425
- body: await parseErrorBody(output.body, context),
1426
- };
1427
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1428
- switch (errorCode) {
1429
- case "InvalidParameterException":
1430
- case "com.amazonaws.ecr#InvalidParameterException":
1431
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1432
- case "KmsException":
1433
- case "com.amazonaws.ecr#KmsException":
1434
- throw await de_KmsExceptionRes(parsedOutput, context);
1435
- case "RepositoryNotFoundException":
1436
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1437
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1438
- case "ServerException":
1439
- case "com.amazonaws.ecr#ServerException":
1440
- throw await de_ServerExceptionRes(parsedOutput, context);
1441
- default:
1442
- const parsedBody = parsedOutput.body;
1443
- return throwDefaultError({
1444
- output,
1445
- parsedBody,
1446
- errorCode,
1447
- });
1448
- }
1449
- };
1450
- const de_ListImagesCommand = async (output, context) => {
1451
- if (output.statusCode >= 300) {
1452
- return de_ListImagesCommandError(output, context);
1453
- }
1454
- const data = await parseBody(output.body, context);
1455
- let contents = {};
1456
- contents = (0, smithy_client_1._json)(data);
1457
- const response = {
1458
- $metadata: deserializeMetadata(output),
1459
- ...contents,
1460
- };
1461
- return response;
1462
- };
1463
- exports.de_ListImagesCommand = de_ListImagesCommand;
1464
- const de_ListImagesCommandError = async (output, context) => {
1465
- const parsedOutput = {
1466
- ...output,
1467
- body: await parseErrorBody(output.body, context),
1468
- };
1469
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1470
- switch (errorCode) {
1471
- case "InvalidParameterException":
1472
- case "com.amazonaws.ecr#InvalidParameterException":
1473
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1474
- case "RepositoryNotFoundException":
1475
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1476
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1477
- case "ServerException":
1478
- case "com.amazonaws.ecr#ServerException":
1479
- throw await de_ServerExceptionRes(parsedOutput, context);
1480
- default:
1481
- const parsedBody = parsedOutput.body;
1482
- return throwDefaultError({
1483
- output,
1484
- parsedBody,
1485
- errorCode,
1486
- });
1487
- }
1488
- };
1489
- const de_ListTagsForResourceCommand = async (output, context) => {
1490
- if (output.statusCode >= 300) {
1491
- return de_ListTagsForResourceCommandError(output, context);
1492
- }
1493
- const data = await parseBody(output.body, context);
1494
- let contents = {};
1495
- contents = (0, smithy_client_1._json)(data);
1496
- const response = {
1497
- $metadata: deserializeMetadata(output),
1498
- ...contents,
1499
- };
1500
- return response;
1501
- };
1502
- exports.de_ListTagsForResourceCommand = de_ListTagsForResourceCommand;
1503
- const de_ListTagsForResourceCommandError = async (output, context) => {
1504
- const parsedOutput = {
1505
- ...output,
1506
- body: await parseErrorBody(output.body, context),
1507
- };
1508
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1509
- switch (errorCode) {
1510
- case "InvalidParameterException":
1511
- case "com.amazonaws.ecr#InvalidParameterException":
1512
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1513
- case "RepositoryNotFoundException":
1514
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1515
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1516
- case "ServerException":
1517
- case "com.amazonaws.ecr#ServerException":
1518
- throw await de_ServerExceptionRes(parsedOutput, context);
1519
- default:
1520
- const parsedBody = parsedOutput.body;
1521
- return throwDefaultError({
1522
- output,
1523
- parsedBody,
1524
- errorCode,
1525
- });
1526
- }
1527
- };
1528
- const de_PutImageCommand = async (output, context) => {
1529
- if (output.statusCode >= 300) {
1530
- return de_PutImageCommandError(output, context);
1531
- }
1532
- const data = await parseBody(output.body, context);
1533
- let contents = {};
1534
- contents = (0, smithy_client_1._json)(data);
1535
- const response = {
1536
- $metadata: deserializeMetadata(output),
1537
- ...contents,
1538
- };
1539
- return response;
1540
- };
1541
- exports.de_PutImageCommand = de_PutImageCommand;
1542
- const de_PutImageCommandError = async (output, context) => {
1543
- const parsedOutput = {
1544
- ...output,
1545
- body: await parseErrorBody(output.body, context),
1546
- };
1547
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1548
- switch (errorCode) {
1549
- case "ImageAlreadyExistsException":
1550
- case "com.amazonaws.ecr#ImageAlreadyExistsException":
1551
- throw await de_ImageAlreadyExistsExceptionRes(parsedOutput, context);
1552
- case "ImageDigestDoesNotMatchException":
1553
- case "com.amazonaws.ecr#ImageDigestDoesNotMatchException":
1554
- throw await de_ImageDigestDoesNotMatchExceptionRes(parsedOutput, context);
1555
- case "ImageTagAlreadyExistsException":
1556
- case "com.amazonaws.ecr#ImageTagAlreadyExistsException":
1557
- throw await de_ImageTagAlreadyExistsExceptionRes(parsedOutput, context);
1558
- case "InvalidParameterException":
1559
- case "com.amazonaws.ecr#InvalidParameterException":
1560
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1561
- case "KmsException":
1562
- case "com.amazonaws.ecr#KmsException":
1563
- throw await de_KmsExceptionRes(parsedOutput, context);
1564
- case "LayersNotFoundException":
1565
- case "com.amazonaws.ecr#LayersNotFoundException":
1566
- throw await de_LayersNotFoundExceptionRes(parsedOutput, context);
1567
- case "LimitExceededException":
1568
- case "com.amazonaws.ecr#LimitExceededException":
1569
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1570
- case "ReferencedImagesNotFoundException":
1571
- case "com.amazonaws.ecr#ReferencedImagesNotFoundException":
1572
- throw await de_ReferencedImagesNotFoundExceptionRes(parsedOutput, context);
1573
- case "RepositoryNotFoundException":
1574
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1575
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1576
- case "ServerException":
1577
- case "com.amazonaws.ecr#ServerException":
1578
- throw await de_ServerExceptionRes(parsedOutput, context);
1579
- default:
1580
- const parsedBody = parsedOutput.body;
1581
- return throwDefaultError({
1582
- output,
1583
- parsedBody,
1584
- errorCode,
1585
- });
1586
- }
1587
- };
1588
- const de_PutImageScanningConfigurationCommand = async (output, context) => {
1589
- if (output.statusCode >= 300) {
1590
- return de_PutImageScanningConfigurationCommandError(output, context);
1591
- }
1592
- const data = await parseBody(output.body, context);
1593
- let contents = {};
1594
- contents = (0, smithy_client_1._json)(data);
1595
- const response = {
1596
- $metadata: deserializeMetadata(output),
1597
- ...contents,
1598
- };
1599
- return response;
1600
- };
1601
- exports.de_PutImageScanningConfigurationCommand = de_PutImageScanningConfigurationCommand;
1602
- const de_PutImageScanningConfigurationCommandError = async (output, context) => {
1603
- const parsedOutput = {
1604
- ...output,
1605
- body: await parseErrorBody(output.body, context),
1606
- };
1607
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1608
- switch (errorCode) {
1609
- case "InvalidParameterException":
1610
- case "com.amazonaws.ecr#InvalidParameterException":
1611
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1612
- case "RepositoryNotFoundException":
1613
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1614
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1615
- case "ServerException":
1616
- case "com.amazonaws.ecr#ServerException":
1617
- throw await de_ServerExceptionRes(parsedOutput, context);
1618
- case "ValidationException":
1619
- case "com.amazonaws.ecr#ValidationException":
1620
- throw await de_ValidationExceptionRes(parsedOutput, context);
1621
- default:
1622
- const parsedBody = parsedOutput.body;
1623
- return throwDefaultError({
1624
- output,
1625
- parsedBody,
1626
- errorCode,
1627
- });
1628
- }
1629
- };
1630
- const de_PutImageTagMutabilityCommand = async (output, context) => {
1631
- if (output.statusCode >= 300) {
1632
- return de_PutImageTagMutabilityCommandError(output, context);
1633
- }
1634
- const data = await parseBody(output.body, context);
1635
- let contents = {};
1636
- contents = (0, smithy_client_1._json)(data);
1637
- const response = {
1638
- $metadata: deserializeMetadata(output),
1639
- ...contents,
1640
- };
1641
- return response;
1642
- };
1643
- exports.de_PutImageTagMutabilityCommand = de_PutImageTagMutabilityCommand;
1644
- const de_PutImageTagMutabilityCommandError = async (output, context) => {
1645
- const parsedOutput = {
1646
- ...output,
1647
- body: await parseErrorBody(output.body, context),
1648
- };
1649
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1650
- switch (errorCode) {
1651
- case "InvalidParameterException":
1652
- case "com.amazonaws.ecr#InvalidParameterException":
1653
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1654
- case "RepositoryNotFoundException":
1655
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1656
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1657
- case "ServerException":
1658
- case "com.amazonaws.ecr#ServerException":
1659
- throw await de_ServerExceptionRes(parsedOutput, context);
1660
- default:
1661
- const parsedBody = parsedOutput.body;
1662
- return throwDefaultError({
1663
- output,
1664
- parsedBody,
1665
- errorCode,
1666
- });
1667
- }
1668
- };
1669
- const de_PutLifecyclePolicyCommand = async (output, context) => {
1670
- if (output.statusCode >= 300) {
1671
- return de_PutLifecyclePolicyCommandError(output, context);
1672
- }
1673
- const data = await parseBody(output.body, context);
1674
- let contents = {};
1675
- contents = (0, smithy_client_1._json)(data);
1676
- const response = {
1677
- $metadata: deserializeMetadata(output),
1678
- ...contents,
1679
- };
1680
- return response;
1681
- };
1682
- exports.de_PutLifecyclePolicyCommand = de_PutLifecyclePolicyCommand;
1683
- const de_PutLifecyclePolicyCommandError = async (output, context) => {
1684
- const parsedOutput = {
1685
- ...output,
1686
- body: await parseErrorBody(output.body, context),
1687
- };
1688
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1689
- switch (errorCode) {
1690
- case "InvalidParameterException":
1691
- case "com.amazonaws.ecr#InvalidParameterException":
1692
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1693
- case "RepositoryNotFoundException":
1694
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1695
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1696
- case "ServerException":
1697
- case "com.amazonaws.ecr#ServerException":
1698
- throw await de_ServerExceptionRes(parsedOutput, context);
1699
- case "ValidationException":
1700
- case "com.amazonaws.ecr#ValidationException":
1701
- throw await de_ValidationExceptionRes(parsedOutput, context);
1702
- default:
1703
- const parsedBody = parsedOutput.body;
1704
- return throwDefaultError({
1705
- output,
1706
- parsedBody,
1707
- errorCode,
1708
- });
1709
- }
1710
- };
1711
- const de_PutRegistryPolicyCommand = async (output, context) => {
1712
- if (output.statusCode >= 300) {
1713
- return de_PutRegistryPolicyCommandError(output, context);
1714
- }
1715
- const data = await parseBody(output.body, context);
1716
- let contents = {};
1717
- contents = (0, smithy_client_1._json)(data);
1718
- const response = {
1719
- $metadata: deserializeMetadata(output),
1720
- ...contents,
1721
- };
1722
- return response;
1723
- };
1724
- exports.de_PutRegistryPolicyCommand = de_PutRegistryPolicyCommand;
1725
- const de_PutRegistryPolicyCommandError = async (output, context) => {
1726
- const parsedOutput = {
1727
- ...output,
1728
- body: await parseErrorBody(output.body, context),
1729
- };
1730
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1731
- switch (errorCode) {
1732
- case "InvalidParameterException":
1733
- case "com.amazonaws.ecr#InvalidParameterException":
1734
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1735
- case "ServerException":
1736
- case "com.amazonaws.ecr#ServerException":
1737
- throw await de_ServerExceptionRes(parsedOutput, context);
1738
- case "ValidationException":
1739
- case "com.amazonaws.ecr#ValidationException":
1740
- throw await de_ValidationExceptionRes(parsedOutput, context);
1741
- default:
1742
- const parsedBody = parsedOutput.body;
1743
- return throwDefaultError({
1744
- output,
1745
- parsedBody,
1746
- errorCode,
1747
- });
1748
- }
1749
- };
1750
- const de_PutRegistryScanningConfigurationCommand = async (output, context) => {
1751
- if (output.statusCode >= 300) {
1752
- return de_PutRegistryScanningConfigurationCommandError(output, context);
1753
- }
1754
- const data = await parseBody(output.body, context);
1755
- let contents = {};
1756
- contents = (0, smithy_client_1._json)(data);
1757
- const response = {
1758
- $metadata: deserializeMetadata(output),
1759
- ...contents,
1760
- };
1761
- return response;
1762
- };
1763
- exports.de_PutRegistryScanningConfigurationCommand = de_PutRegistryScanningConfigurationCommand;
1764
- const de_PutRegistryScanningConfigurationCommandError = async (output, context) => {
1765
- const parsedOutput = {
1766
- ...output,
1767
- body: await parseErrorBody(output.body, context),
1768
- };
1769
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1770
- switch (errorCode) {
1771
- case "InvalidParameterException":
1772
- case "com.amazonaws.ecr#InvalidParameterException":
1773
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1774
- case "ServerException":
1775
- case "com.amazonaws.ecr#ServerException":
1776
- throw await de_ServerExceptionRes(parsedOutput, context);
1777
- case "ValidationException":
1778
- case "com.amazonaws.ecr#ValidationException":
1779
- throw await de_ValidationExceptionRes(parsedOutput, context);
1780
- default:
1781
- const parsedBody = parsedOutput.body;
1782
- return throwDefaultError({
1783
- output,
1784
- parsedBody,
1785
- errorCode,
1786
- });
1787
- }
1788
- };
1789
- const de_PutReplicationConfigurationCommand = async (output, context) => {
1790
- if (output.statusCode >= 300) {
1791
- return de_PutReplicationConfigurationCommandError(output, context);
1792
- }
1793
- const data = await parseBody(output.body, context);
1794
- let contents = {};
1795
- contents = (0, smithy_client_1._json)(data);
1796
- const response = {
1797
- $metadata: deserializeMetadata(output),
1798
- ...contents,
1799
- };
1800
- return response;
1801
- };
1802
- exports.de_PutReplicationConfigurationCommand = de_PutReplicationConfigurationCommand;
1803
- const de_PutReplicationConfigurationCommandError = async (output, context) => {
1804
- const parsedOutput = {
1805
- ...output,
1806
- body: await parseErrorBody(output.body, context),
1807
- };
1808
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1809
- switch (errorCode) {
1810
- case "InvalidParameterException":
1811
- case "com.amazonaws.ecr#InvalidParameterException":
1812
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1813
- case "ServerException":
1814
- case "com.amazonaws.ecr#ServerException":
1815
- throw await de_ServerExceptionRes(parsedOutput, context);
1816
- case "ValidationException":
1817
- case "com.amazonaws.ecr#ValidationException":
1818
- throw await de_ValidationExceptionRes(parsedOutput, context);
1819
- default:
1820
- const parsedBody = parsedOutput.body;
1821
- return throwDefaultError({
1822
- output,
1823
- parsedBody,
1824
- errorCode,
1825
- });
1826
- }
1827
- };
1828
- const de_SetRepositoryPolicyCommand = async (output, context) => {
1829
- if (output.statusCode >= 300) {
1830
- return de_SetRepositoryPolicyCommandError(output, context);
1831
- }
1832
- const data = await parseBody(output.body, context);
1833
- let contents = {};
1834
- contents = (0, smithy_client_1._json)(data);
1835
- const response = {
1836
- $metadata: deserializeMetadata(output),
1837
- ...contents,
1838
- };
1839
- return response;
1840
- };
1841
- exports.de_SetRepositoryPolicyCommand = de_SetRepositoryPolicyCommand;
1842
- const de_SetRepositoryPolicyCommandError = async (output, context) => {
1843
- const parsedOutput = {
1844
- ...output,
1845
- body: await parseErrorBody(output.body, context),
1846
- };
1847
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1848
- switch (errorCode) {
1849
- case "InvalidParameterException":
1850
- case "com.amazonaws.ecr#InvalidParameterException":
1851
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1852
- case "RepositoryNotFoundException":
1853
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1854
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1855
- case "ServerException":
1856
- case "com.amazonaws.ecr#ServerException":
1857
- throw await de_ServerExceptionRes(parsedOutput, context);
1858
- default:
1859
- const parsedBody = parsedOutput.body;
1860
- return throwDefaultError({
1861
- output,
1862
- parsedBody,
1863
- errorCode,
1864
- });
1865
- }
1866
- };
1867
- const de_StartImageScanCommand = async (output, context) => {
1868
- if (output.statusCode >= 300) {
1869
- return de_StartImageScanCommandError(output, context);
1870
- }
1871
- const data = await parseBody(output.body, context);
1872
- let contents = {};
1873
- contents = (0, smithy_client_1._json)(data);
1874
- const response = {
1875
- $metadata: deserializeMetadata(output),
1876
- ...contents,
1877
- };
1878
- return response;
1879
- };
1880
- exports.de_StartImageScanCommand = de_StartImageScanCommand;
1881
- const de_StartImageScanCommandError = async (output, context) => {
1882
- const parsedOutput = {
1883
- ...output,
1884
- body: await parseErrorBody(output.body, context),
1885
- };
1886
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1887
- switch (errorCode) {
1888
- case "ImageNotFoundException":
1889
- case "com.amazonaws.ecr#ImageNotFoundException":
1890
- throw await de_ImageNotFoundExceptionRes(parsedOutput, context);
1891
- case "InvalidParameterException":
1892
- case "com.amazonaws.ecr#InvalidParameterException":
1893
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1894
- case "LimitExceededException":
1895
- case "com.amazonaws.ecr#LimitExceededException":
1896
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
1897
- case "RepositoryNotFoundException":
1898
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1899
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1900
- case "ServerException":
1901
- case "com.amazonaws.ecr#ServerException":
1902
- throw await de_ServerExceptionRes(parsedOutput, context);
1903
- case "UnsupportedImageTypeException":
1904
- case "com.amazonaws.ecr#UnsupportedImageTypeException":
1905
- throw await de_UnsupportedImageTypeExceptionRes(parsedOutput, context);
1906
- case "ValidationException":
1907
- case "com.amazonaws.ecr#ValidationException":
1908
- throw await de_ValidationExceptionRes(parsedOutput, context);
1909
- default:
1910
- const parsedBody = parsedOutput.body;
1911
- return throwDefaultError({
1912
- output,
1913
- parsedBody,
1914
- errorCode,
1915
- });
1916
- }
1917
- };
1918
- const de_StartLifecyclePolicyPreviewCommand = async (output, context) => {
1919
- if (output.statusCode >= 300) {
1920
- return de_StartLifecyclePolicyPreviewCommandError(output, context);
1921
- }
1922
- const data = await parseBody(output.body, context);
1923
- let contents = {};
1924
- contents = (0, smithy_client_1._json)(data);
1925
- const response = {
1926
- $metadata: deserializeMetadata(output),
1927
- ...contents,
1928
- };
1929
- return response;
1930
- };
1931
- exports.de_StartLifecyclePolicyPreviewCommand = de_StartLifecyclePolicyPreviewCommand;
1932
- const de_StartLifecyclePolicyPreviewCommandError = async (output, context) => {
1933
- const parsedOutput = {
1934
- ...output,
1935
- body: await parseErrorBody(output.body, context),
1936
- };
1937
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1938
- switch (errorCode) {
1939
- case "InvalidParameterException":
1940
- case "com.amazonaws.ecr#InvalidParameterException":
1941
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1942
- case "LifecyclePolicyNotFoundException":
1943
- case "com.amazonaws.ecr#LifecyclePolicyNotFoundException":
1944
- throw await de_LifecyclePolicyNotFoundExceptionRes(parsedOutput, context);
1945
- case "LifecyclePolicyPreviewInProgressException":
1946
- case "com.amazonaws.ecr#LifecyclePolicyPreviewInProgressException":
1947
- throw await de_LifecyclePolicyPreviewInProgressExceptionRes(parsedOutput, context);
1948
- case "RepositoryNotFoundException":
1949
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1950
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1951
- case "ServerException":
1952
- case "com.amazonaws.ecr#ServerException":
1953
- throw await de_ServerExceptionRes(parsedOutput, context);
1954
- case "ValidationException":
1955
- case "com.amazonaws.ecr#ValidationException":
1956
- throw await de_ValidationExceptionRes(parsedOutput, context);
1957
- default:
1958
- const parsedBody = parsedOutput.body;
1959
- return throwDefaultError({
1960
- output,
1961
- parsedBody,
1962
- errorCode,
1963
- });
1964
- }
1965
- };
1966
- const de_TagResourceCommand = async (output, context) => {
1967
- if (output.statusCode >= 300) {
1968
- return de_TagResourceCommandError(output, context);
1969
- }
1970
- const data = await parseBody(output.body, context);
1971
- let contents = {};
1972
- contents = (0, smithy_client_1._json)(data);
1973
- const response = {
1974
- $metadata: deserializeMetadata(output),
1975
- ...contents,
1976
- };
1977
- return response;
1978
- };
1979
- exports.de_TagResourceCommand = de_TagResourceCommand;
1980
- const de_TagResourceCommandError = async (output, context) => {
1981
- const parsedOutput = {
1982
- ...output,
1983
- body: await parseErrorBody(output.body, context),
1984
- };
1985
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1986
- switch (errorCode) {
1987
- case "InvalidParameterException":
1988
- case "com.amazonaws.ecr#InvalidParameterException":
1989
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1990
- case "InvalidTagParameterException":
1991
- case "com.amazonaws.ecr#InvalidTagParameterException":
1992
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
1993
- case "RepositoryNotFoundException":
1994
- case "com.amazonaws.ecr#RepositoryNotFoundException":
1995
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
1996
- case "ServerException":
1997
- case "com.amazonaws.ecr#ServerException":
1998
- throw await de_ServerExceptionRes(parsedOutput, context);
1999
- case "TooManyTagsException":
2000
- case "com.amazonaws.ecr#TooManyTagsException":
2001
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2002
- default:
2003
- const parsedBody = parsedOutput.body;
2004
- return throwDefaultError({
2005
- output,
2006
- parsedBody,
2007
- errorCode,
2008
- });
2009
- }
2010
- };
2011
- const de_UntagResourceCommand = async (output, context) => {
2012
- if (output.statusCode >= 300) {
2013
- return de_UntagResourceCommandError(output, context);
2014
- }
2015
- const data = await parseBody(output.body, context);
2016
- let contents = {};
2017
- contents = (0, smithy_client_1._json)(data);
2018
- const response = {
2019
- $metadata: deserializeMetadata(output),
2020
- ...contents,
2021
- };
2022
- return response;
2023
- };
2024
- exports.de_UntagResourceCommand = de_UntagResourceCommand;
2025
- const de_UntagResourceCommandError = async (output, context) => {
2026
- const parsedOutput = {
2027
- ...output,
2028
- body: await parseErrorBody(output.body, context),
2029
- };
2030
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2031
- switch (errorCode) {
2032
- case "InvalidParameterException":
2033
- case "com.amazonaws.ecr#InvalidParameterException":
2034
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2035
- case "InvalidTagParameterException":
2036
- case "com.amazonaws.ecr#InvalidTagParameterException":
2037
- throw await de_InvalidTagParameterExceptionRes(parsedOutput, context);
2038
- case "RepositoryNotFoundException":
2039
- case "com.amazonaws.ecr#RepositoryNotFoundException":
2040
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
2041
- case "ServerException":
2042
- case "com.amazonaws.ecr#ServerException":
2043
- throw await de_ServerExceptionRes(parsedOutput, context);
2044
- case "TooManyTagsException":
2045
- case "com.amazonaws.ecr#TooManyTagsException":
2046
- throw await de_TooManyTagsExceptionRes(parsedOutput, context);
2047
- default:
2048
- const parsedBody = parsedOutput.body;
2049
- return throwDefaultError({
2050
- output,
2051
- parsedBody,
2052
- errorCode,
2053
- });
2054
- }
2055
- };
2056
- const de_UpdatePullThroughCacheRuleCommand = async (output, context) => {
2057
- if (output.statusCode >= 300) {
2058
- return de_UpdatePullThroughCacheRuleCommandError(output, context);
2059
- }
2060
- const data = await parseBody(output.body, context);
2061
- let contents = {};
2062
- contents = de_UpdatePullThroughCacheRuleResponse(data, context);
2063
- const response = {
2064
- $metadata: deserializeMetadata(output),
2065
- ...contents,
2066
- };
2067
- return response;
2068
- };
2069
- exports.de_UpdatePullThroughCacheRuleCommand = de_UpdatePullThroughCacheRuleCommand;
2070
- const de_UpdatePullThroughCacheRuleCommandError = async (output, context) => {
2071
- const parsedOutput = {
2072
- ...output,
2073
- body: await parseErrorBody(output.body, context),
2074
- };
2075
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2076
- switch (errorCode) {
2077
- case "InvalidParameterException":
2078
- case "com.amazonaws.ecr#InvalidParameterException":
2079
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2080
- case "PullThroughCacheRuleNotFoundException":
2081
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
2082
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
2083
- case "SecretNotFoundException":
2084
- case "com.amazonaws.ecr#SecretNotFoundException":
2085
- throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
2086
- case "ServerException":
2087
- case "com.amazonaws.ecr#ServerException":
2088
- throw await de_ServerExceptionRes(parsedOutput, context);
2089
- case "UnableToAccessSecretException":
2090
- case "com.amazonaws.ecr#UnableToAccessSecretException":
2091
- throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
2092
- case "UnableToDecryptSecretValueException":
2093
- case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
2094
- throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
2095
- case "ValidationException":
2096
- case "com.amazonaws.ecr#ValidationException":
2097
- throw await de_ValidationExceptionRes(parsedOutput, context);
2098
- default:
2099
- const parsedBody = parsedOutput.body;
2100
- return throwDefaultError({
2101
- output,
2102
- parsedBody,
2103
- errorCode,
2104
- });
2105
- }
2106
- };
2107
- const de_UploadLayerPartCommand = async (output, context) => {
2108
- if (output.statusCode >= 300) {
2109
- return de_UploadLayerPartCommandError(output, context);
2110
- }
2111
- const data = await parseBody(output.body, context);
2112
- let contents = {};
2113
- contents = (0, smithy_client_1._json)(data);
2114
- const response = {
2115
- $metadata: deserializeMetadata(output),
2116
- ...contents,
2117
- };
2118
- return response;
2119
- };
2120
- exports.de_UploadLayerPartCommand = de_UploadLayerPartCommand;
2121
- const de_UploadLayerPartCommandError = async (output, context) => {
2122
- const parsedOutput = {
2123
- ...output,
2124
- body: await parseErrorBody(output.body, context),
2125
- };
2126
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2127
- switch (errorCode) {
2128
- case "InvalidLayerPartException":
2129
- case "com.amazonaws.ecr#InvalidLayerPartException":
2130
- throw await de_InvalidLayerPartExceptionRes(parsedOutput, context);
2131
- case "InvalidParameterException":
2132
- case "com.amazonaws.ecr#InvalidParameterException":
2133
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2134
- case "KmsException":
2135
- case "com.amazonaws.ecr#KmsException":
2136
- throw await de_KmsExceptionRes(parsedOutput, context);
2137
- case "LimitExceededException":
2138
- case "com.amazonaws.ecr#LimitExceededException":
2139
- throw await de_LimitExceededExceptionRes(parsedOutput, context);
2140
- case "RepositoryNotFoundException":
2141
- case "com.amazonaws.ecr#RepositoryNotFoundException":
2142
- throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
2143
- case "ServerException":
2144
- case "com.amazonaws.ecr#ServerException":
2145
- throw await de_ServerExceptionRes(parsedOutput, context);
2146
- case "UploadNotFoundException":
2147
- case "com.amazonaws.ecr#UploadNotFoundException":
2148
- throw await de_UploadNotFoundExceptionRes(parsedOutput, context);
2149
- default:
2150
- const parsedBody = parsedOutput.body;
2151
- return throwDefaultError({
2152
- output,
2153
- parsedBody,
2154
- errorCode,
2155
- });
2156
- }
2157
- };
2158
- const de_ValidatePullThroughCacheRuleCommand = async (output, context) => {
2159
- if (output.statusCode >= 300) {
2160
- return de_ValidatePullThroughCacheRuleCommandError(output, context);
2161
- }
2162
- const data = await parseBody(output.body, context);
2163
- let contents = {};
2164
- contents = (0, smithy_client_1._json)(data);
2165
- const response = {
2166
- $metadata: deserializeMetadata(output),
2167
- ...contents,
2168
- };
2169
- return response;
2170
- };
2171
- exports.de_ValidatePullThroughCacheRuleCommand = de_ValidatePullThroughCacheRuleCommand;
2172
- const de_ValidatePullThroughCacheRuleCommandError = async (output, context) => {
2173
- const parsedOutput = {
2174
- ...output,
2175
- body: await parseErrorBody(output.body, context),
2176
- };
2177
- const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2178
- switch (errorCode) {
2179
- case "InvalidParameterException":
2180
- case "com.amazonaws.ecr#InvalidParameterException":
2181
- throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2182
- case "PullThroughCacheRuleNotFoundException":
2183
- case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
2184
- throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
2185
- case "ServerException":
2186
- case "com.amazonaws.ecr#ServerException":
2187
- throw await de_ServerExceptionRes(parsedOutput, context);
2188
- case "ValidationException":
2189
- case "com.amazonaws.ecr#ValidationException":
2190
- throw await de_ValidationExceptionRes(parsedOutput, context);
2191
- default:
2192
- const parsedBody = parsedOutput.body;
2193
- return throwDefaultError({
2194
- output,
2195
- parsedBody,
2196
- errorCode,
2197
- });
2198
- }
2199
- };
2200
- const de_EmptyUploadExceptionRes = async (parsedOutput, context) => {
2201
- const body = parsedOutput.body;
2202
- const deserialized = (0, smithy_client_1._json)(body);
2203
- const exception = new models_0_1.EmptyUploadException({
2204
- $metadata: deserializeMetadata(parsedOutput),
2205
- ...deserialized,
2206
- });
2207
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2208
- };
2209
- const de_ImageAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2210
- const body = parsedOutput.body;
2211
- const deserialized = (0, smithy_client_1._json)(body);
2212
- const exception = new models_0_1.ImageAlreadyExistsException({
2213
- $metadata: deserializeMetadata(parsedOutput),
2214
- ...deserialized,
2215
- });
2216
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2217
- };
2218
- const de_ImageDigestDoesNotMatchExceptionRes = async (parsedOutput, context) => {
2219
- const body = parsedOutput.body;
2220
- const deserialized = (0, smithy_client_1._json)(body);
2221
- const exception = new models_0_1.ImageDigestDoesNotMatchException({
2222
- $metadata: deserializeMetadata(parsedOutput),
2223
- ...deserialized,
2224
- });
2225
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2226
- };
2227
- const de_ImageNotFoundExceptionRes = async (parsedOutput, context) => {
2228
- const body = parsedOutput.body;
2229
- const deserialized = (0, smithy_client_1._json)(body);
2230
- const exception = new models_0_1.ImageNotFoundException({
2231
- $metadata: deserializeMetadata(parsedOutput),
2232
- ...deserialized,
2233
- });
2234
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2235
- };
2236
- const de_ImageTagAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2237
- const body = parsedOutput.body;
2238
- const deserialized = (0, smithy_client_1._json)(body);
2239
- const exception = new models_0_1.ImageTagAlreadyExistsException({
2240
- $metadata: deserializeMetadata(parsedOutput),
2241
- ...deserialized,
2242
- });
2243
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2244
- };
2245
- const de_InvalidLayerExceptionRes = async (parsedOutput, context) => {
2246
- const body = parsedOutput.body;
2247
- const deserialized = (0, smithy_client_1._json)(body);
2248
- const exception = new models_0_1.InvalidLayerException({
2249
- $metadata: deserializeMetadata(parsedOutput),
2250
- ...deserialized,
2251
- });
2252
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2253
- };
2254
- const de_InvalidLayerPartExceptionRes = async (parsedOutput, context) => {
2255
- const body = parsedOutput.body;
2256
- const deserialized = (0, smithy_client_1._json)(body);
2257
- const exception = new models_0_1.InvalidLayerPartException({
2258
- $metadata: deserializeMetadata(parsedOutput),
2259
- ...deserialized,
2260
- });
2261
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2262
- };
2263
- const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
2264
- const body = parsedOutput.body;
2265
- const deserialized = (0, smithy_client_1._json)(body);
2266
- const exception = new models_0_1.InvalidParameterException({
2267
- $metadata: deserializeMetadata(parsedOutput),
2268
- ...deserialized,
2269
- });
2270
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2271
- };
2272
- const de_InvalidTagParameterExceptionRes = async (parsedOutput, context) => {
2273
- const body = parsedOutput.body;
2274
- const deserialized = (0, smithy_client_1._json)(body);
2275
- const exception = new models_0_1.InvalidTagParameterException({
2276
- $metadata: deserializeMetadata(parsedOutput),
2277
- ...deserialized,
2278
- });
2279
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2280
- };
2281
- const de_KmsExceptionRes = async (parsedOutput, context) => {
2282
- const body = parsedOutput.body;
2283
- const deserialized = (0, smithy_client_1._json)(body);
2284
- const exception = new models_0_1.KmsException({
2285
- $metadata: deserializeMetadata(parsedOutput),
2286
- ...deserialized,
2287
- });
2288
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2289
- };
2290
- const de_LayerAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2291
- const body = parsedOutput.body;
2292
- const deserialized = (0, smithy_client_1._json)(body);
2293
- const exception = new models_0_1.LayerAlreadyExistsException({
2294
- $metadata: deserializeMetadata(parsedOutput),
2295
- ...deserialized,
2296
- });
2297
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2298
- };
2299
- const de_LayerInaccessibleExceptionRes = async (parsedOutput, context) => {
2300
- const body = parsedOutput.body;
2301
- const deserialized = (0, smithy_client_1._json)(body);
2302
- const exception = new models_0_1.LayerInaccessibleException({
2303
- $metadata: deserializeMetadata(parsedOutput),
2304
- ...deserialized,
2305
- });
2306
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2307
- };
2308
- const de_LayerPartTooSmallExceptionRes = async (parsedOutput, context) => {
2309
- const body = parsedOutput.body;
2310
- const deserialized = (0, smithy_client_1._json)(body);
2311
- const exception = new models_0_1.LayerPartTooSmallException({
2312
- $metadata: deserializeMetadata(parsedOutput),
2313
- ...deserialized,
2314
- });
2315
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2316
- };
2317
- const de_LayersNotFoundExceptionRes = async (parsedOutput, context) => {
2318
- const body = parsedOutput.body;
2319
- const deserialized = (0, smithy_client_1._json)(body);
2320
- const exception = new models_0_1.LayersNotFoundException({
2321
- $metadata: deserializeMetadata(parsedOutput),
2322
- ...deserialized,
2323
- });
2324
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2325
- };
2326
- const de_LifecyclePolicyNotFoundExceptionRes = async (parsedOutput, context) => {
2327
- const body = parsedOutput.body;
2328
- const deserialized = (0, smithy_client_1._json)(body);
2329
- const exception = new models_0_1.LifecyclePolicyNotFoundException({
2330
- $metadata: deserializeMetadata(parsedOutput),
2331
- ...deserialized,
2332
- });
2333
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2334
- };
2335
- const de_LifecyclePolicyPreviewInProgressExceptionRes = async (parsedOutput, context) => {
2336
- const body = parsedOutput.body;
2337
- const deserialized = (0, smithy_client_1._json)(body);
2338
- const exception = new models_0_1.LifecyclePolicyPreviewInProgressException({
2339
- $metadata: deserializeMetadata(parsedOutput),
2340
- ...deserialized,
2341
- });
2342
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2343
- };
2344
- const de_LifecyclePolicyPreviewNotFoundExceptionRes = async (parsedOutput, context) => {
2345
- const body = parsedOutput.body;
2346
- const deserialized = (0, smithy_client_1._json)(body);
2347
- const exception = new models_0_1.LifecyclePolicyPreviewNotFoundException({
2348
- $metadata: deserializeMetadata(parsedOutput),
2349
- ...deserialized,
2350
- });
2351
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2352
- };
2353
- const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
2354
- const body = parsedOutput.body;
2355
- const deserialized = (0, smithy_client_1._json)(body);
2356
- const exception = new models_0_1.LimitExceededException({
2357
- $metadata: deserializeMetadata(parsedOutput),
2358
- ...deserialized,
2359
- });
2360
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2361
- };
2362
- const de_PullThroughCacheRuleAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2363
- const body = parsedOutput.body;
2364
- const deserialized = (0, smithy_client_1._json)(body);
2365
- const exception = new models_0_1.PullThroughCacheRuleAlreadyExistsException({
2366
- $metadata: deserializeMetadata(parsedOutput),
2367
- ...deserialized,
2368
- });
2369
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2370
- };
2371
- const de_PullThroughCacheRuleNotFoundExceptionRes = async (parsedOutput, context) => {
2372
- const body = parsedOutput.body;
2373
- const deserialized = (0, smithy_client_1._json)(body);
2374
- const exception = new models_0_1.PullThroughCacheRuleNotFoundException({
2375
- $metadata: deserializeMetadata(parsedOutput),
2376
- ...deserialized,
2377
- });
2378
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2379
- };
2380
- const de_ReferencedImagesNotFoundExceptionRes = async (parsedOutput, context) => {
2381
- const body = parsedOutput.body;
2382
- const deserialized = (0, smithy_client_1._json)(body);
2383
- const exception = new models_0_1.ReferencedImagesNotFoundException({
2384
- $metadata: deserializeMetadata(parsedOutput),
2385
- ...deserialized,
2386
- });
2387
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2388
- };
2389
- const de_RegistryPolicyNotFoundExceptionRes = async (parsedOutput, context) => {
2390
- const body = parsedOutput.body;
2391
- const deserialized = (0, smithy_client_1._json)(body);
2392
- const exception = new models_0_1.RegistryPolicyNotFoundException({
2393
- $metadata: deserializeMetadata(parsedOutput),
2394
- ...deserialized,
2395
- });
2396
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2397
- };
2398
- const de_RepositoryAlreadyExistsExceptionRes = async (parsedOutput, context) => {
2399
- const body = parsedOutput.body;
2400
- const deserialized = (0, smithy_client_1._json)(body);
2401
- const exception = new models_0_1.RepositoryAlreadyExistsException({
2402
- $metadata: deserializeMetadata(parsedOutput),
2403
- ...deserialized,
2404
- });
2405
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2406
- };
2407
- const de_RepositoryNotEmptyExceptionRes = async (parsedOutput, context) => {
2408
- const body = parsedOutput.body;
2409
- const deserialized = (0, smithy_client_1._json)(body);
2410
- const exception = new models_0_1.RepositoryNotEmptyException({
2411
- $metadata: deserializeMetadata(parsedOutput),
2412
- ...deserialized,
2413
- });
2414
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2415
- };
2416
- const de_RepositoryNotFoundExceptionRes = async (parsedOutput, context) => {
2417
- const body = parsedOutput.body;
2418
- const deserialized = (0, smithy_client_1._json)(body);
2419
- const exception = new models_0_1.RepositoryNotFoundException({
2420
- $metadata: deserializeMetadata(parsedOutput),
2421
- ...deserialized,
2422
- });
2423
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2424
- };
2425
- const de_RepositoryPolicyNotFoundExceptionRes = async (parsedOutput, context) => {
2426
- const body = parsedOutput.body;
2427
- const deserialized = (0, smithy_client_1._json)(body);
2428
- const exception = new models_0_1.RepositoryPolicyNotFoundException({
2429
- $metadata: deserializeMetadata(parsedOutput),
2430
- ...deserialized,
2431
- });
2432
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2433
- };
2434
- const de_ScanNotFoundExceptionRes = async (parsedOutput, context) => {
2435
- const body = parsedOutput.body;
2436
- const deserialized = (0, smithy_client_1._json)(body);
2437
- const exception = new models_0_1.ScanNotFoundException({
2438
- $metadata: deserializeMetadata(parsedOutput),
2439
- ...deserialized,
2440
- });
2441
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2442
- };
2443
- const de_SecretNotFoundExceptionRes = async (parsedOutput, context) => {
2444
- const body = parsedOutput.body;
2445
- const deserialized = (0, smithy_client_1._json)(body);
2446
- const exception = new models_0_1.SecretNotFoundException({
2447
- $metadata: deserializeMetadata(parsedOutput),
2448
- ...deserialized,
2449
- });
2450
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2451
- };
2452
- const de_ServerExceptionRes = async (parsedOutput, context) => {
2453
- const body = parsedOutput.body;
2454
- const deserialized = (0, smithy_client_1._json)(body);
2455
- const exception = new models_0_1.ServerException({
2456
- $metadata: deserializeMetadata(parsedOutput),
2457
- ...deserialized,
2458
- });
2459
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2460
- };
2461
- const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2462
- const body = parsedOutput.body;
2463
- const deserialized = (0, smithy_client_1._json)(body);
2464
- const exception = new models_0_1.TooManyTagsException({
2465
- $metadata: deserializeMetadata(parsedOutput),
2466
- ...deserialized,
2467
- });
2468
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2469
- };
2470
- const de_UnableToAccessSecretExceptionRes = async (parsedOutput, context) => {
2471
- const body = parsedOutput.body;
2472
- const deserialized = (0, smithy_client_1._json)(body);
2473
- const exception = new models_0_1.UnableToAccessSecretException({
2474
- $metadata: deserializeMetadata(parsedOutput),
2475
- ...deserialized,
2476
- });
2477
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2478
- };
2479
- const de_UnableToDecryptSecretValueExceptionRes = async (parsedOutput, context) => {
2480
- const body = parsedOutput.body;
2481
- const deserialized = (0, smithy_client_1._json)(body);
2482
- const exception = new models_0_1.UnableToDecryptSecretValueException({
2483
- $metadata: deserializeMetadata(parsedOutput),
2484
- ...deserialized,
2485
- });
2486
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2487
- };
2488
- const de_UnableToGetUpstreamImageExceptionRes = async (parsedOutput, context) => {
2489
- const body = parsedOutput.body;
2490
- const deserialized = (0, smithy_client_1._json)(body);
2491
- const exception = new models_0_1.UnableToGetUpstreamImageException({
2492
- $metadata: deserializeMetadata(parsedOutput),
2493
- ...deserialized,
2494
- });
2495
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2496
- };
2497
- const de_UnableToGetUpstreamLayerExceptionRes = async (parsedOutput, context) => {
2498
- const body = parsedOutput.body;
2499
- const deserialized = (0, smithy_client_1._json)(body);
2500
- const exception = new models_0_1.UnableToGetUpstreamLayerException({
2501
- $metadata: deserializeMetadata(parsedOutput),
2502
- ...deserialized,
2503
- });
2504
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2505
- };
2506
- const de_UnsupportedImageTypeExceptionRes = async (parsedOutput, context) => {
2507
- const body = parsedOutput.body;
2508
- const deserialized = (0, smithy_client_1._json)(body);
2509
- const exception = new models_0_1.UnsupportedImageTypeException({
2510
- $metadata: deserializeMetadata(parsedOutput),
2511
- ...deserialized,
2512
- });
2513
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2514
- };
2515
- const de_UnsupportedUpstreamRegistryExceptionRes = async (parsedOutput, context) => {
2516
- const body = parsedOutput.body;
2517
- const deserialized = (0, smithy_client_1._json)(body);
2518
- const exception = new models_0_1.UnsupportedUpstreamRegistryException({
2519
- $metadata: deserializeMetadata(parsedOutput),
2520
- ...deserialized,
2521
- });
2522
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2523
- };
2524
- const de_UploadNotFoundExceptionRes = async (parsedOutput, context) => {
2525
- const body = parsedOutput.body;
2526
- const deserialized = (0, smithy_client_1._json)(body);
2527
- const exception = new models_0_1.UploadNotFoundException({
2528
- $metadata: deserializeMetadata(parsedOutput),
2529
- ...deserialized,
2530
- });
2531
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2532
- };
2533
- const de_ValidationExceptionRes = async (parsedOutput, context) => {
2534
- const body = parsedOutput.body;
2535
- const deserialized = (0, smithy_client_1._json)(body);
2536
- const exception = new models_0_1.ValidationException({
2537
- $metadata: deserializeMetadata(parsedOutput),
2538
- ...deserialized,
2539
- });
2540
- return (0, smithy_client_1.decorateServiceException)(exception, body);
2541
- };
2542
- const se_UploadLayerPartRequest = (input, context) => {
2543
- return (0, smithy_client_1.take)(input, {
2544
- layerPartBlob: context.base64Encoder,
2545
- partFirstByte: [],
2546
- partLastByte: [],
2547
- registryId: [],
2548
- repositoryName: [],
2549
- uploadId: [],
2550
- });
2551
- };
2552
- const de_AuthorizationData = (output, context) => {
2553
- return (0, smithy_client_1.take)(output, {
2554
- authorizationToken: smithy_client_1.expectString,
2555
- expiresAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2556
- proxyEndpoint: smithy_client_1.expectString,
2557
- });
2558
- };
2559
- const de_AuthorizationDataList = (output, context) => {
2560
- const retVal = (output || [])
2561
- .filter((e) => e != null)
2562
- .map((entry) => {
2563
- return de_AuthorizationData(entry, context);
2564
- });
2565
- return retVal;
2566
- };
2567
- const de_AwsEcrContainerImageDetails = (output, context) => {
2568
- return (0, smithy_client_1.take)(output, {
2569
- architecture: smithy_client_1.expectString,
2570
- author: smithy_client_1.expectString,
2571
- imageHash: smithy_client_1.expectString,
2572
- imageTags: smithy_client_1._json,
2573
- platform: smithy_client_1.expectString,
2574
- pushedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2575
- registry: smithy_client_1.expectString,
2576
- repositoryName: smithy_client_1.expectString,
2577
- });
2578
- };
2579
- const de_CreatePullThroughCacheRuleResponse = (output, context) => {
2580
- return (0, smithy_client_1.take)(output, {
2581
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2582
- credentialArn: smithy_client_1.expectString,
2583
- ecrRepositoryPrefix: smithy_client_1.expectString,
2584
- registryId: smithy_client_1.expectString,
2585
- upstreamRegistry: smithy_client_1.expectString,
2586
- upstreamRegistryUrl: smithy_client_1.expectString,
2587
- });
2588
- };
2589
- const de_CreateRepositoryResponse = (output, context) => {
2590
- return (0, smithy_client_1.take)(output, {
2591
- repository: (_) => de_Repository(_, context),
2592
- });
2593
- };
2594
- const de_CvssScore = (output, context) => {
2595
- return (0, smithy_client_1.take)(output, {
2596
- baseScore: smithy_client_1.limitedParseDouble,
2597
- scoringVector: smithy_client_1.expectString,
2598
- source: smithy_client_1.expectString,
2599
- version: smithy_client_1.expectString,
2600
- });
2601
- };
2602
- const de_CvssScoreDetails = (output, context) => {
2603
- return (0, smithy_client_1.take)(output, {
2604
- adjustments: smithy_client_1._json,
2605
- score: smithy_client_1.limitedParseDouble,
2606
- scoreSource: smithy_client_1.expectString,
2607
- scoringVector: smithy_client_1.expectString,
2608
- version: smithy_client_1.expectString,
2609
- });
2610
- };
2611
- const de_CvssScoreList = (output, context) => {
2612
- const retVal = (output || [])
2613
- .filter((e) => e != null)
2614
- .map((entry) => {
2615
- return de_CvssScore(entry, context);
2616
- });
2617
- return retVal;
2618
- };
2619
- const de_DeleteLifecyclePolicyResponse = (output, context) => {
2620
- return (0, smithy_client_1.take)(output, {
2621
- lastEvaluatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2622
- lifecyclePolicyText: smithy_client_1.expectString,
2623
- registryId: smithy_client_1.expectString,
2624
- repositoryName: smithy_client_1.expectString,
2625
- });
2626
- };
2627
- const de_DeletePullThroughCacheRuleResponse = (output, context) => {
2628
- return (0, smithy_client_1.take)(output, {
2629
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2630
- credentialArn: smithy_client_1.expectString,
2631
- ecrRepositoryPrefix: smithy_client_1.expectString,
2632
- registryId: smithy_client_1.expectString,
2633
- upstreamRegistryUrl: smithy_client_1.expectString,
2634
- });
2635
- };
2636
- const de_DeleteRepositoryResponse = (output, context) => {
2637
- return (0, smithy_client_1.take)(output, {
2638
- repository: (_) => de_Repository(_, context),
2639
- });
2640
- };
2641
- const de_DescribeImageScanFindingsResponse = (output, context) => {
2642
- return (0, smithy_client_1.take)(output, {
2643
- imageId: smithy_client_1._json,
2644
- imageScanFindings: (_) => de_ImageScanFindings(_, context),
2645
- imageScanStatus: smithy_client_1._json,
2646
- nextToken: smithy_client_1.expectString,
2647
- registryId: smithy_client_1.expectString,
2648
- repositoryName: smithy_client_1.expectString,
2649
- });
2650
- };
2651
- const de_DescribeImagesResponse = (output, context) => {
2652
- return (0, smithy_client_1.take)(output, {
2653
- imageDetails: (_) => de_ImageDetailList(_, context),
2654
- nextToken: smithy_client_1.expectString,
2655
- });
2656
- };
2657
- const de_DescribePullThroughCacheRulesResponse = (output, context) => {
2658
- return (0, smithy_client_1.take)(output, {
2659
- nextToken: smithy_client_1.expectString,
2660
- pullThroughCacheRules: (_) => de_PullThroughCacheRuleList(_, context),
2661
- });
2662
- };
2663
- const de_DescribeRepositoriesResponse = (output, context) => {
2664
- return (0, smithy_client_1.take)(output, {
2665
- nextToken: smithy_client_1.expectString,
2666
- repositories: (_) => de_RepositoryList(_, context),
2667
- });
2668
- };
2669
- const de_EnhancedImageScanFinding = (output, context) => {
2670
- return (0, smithy_client_1.take)(output, {
2671
- awsAccountId: smithy_client_1.expectString,
2672
- description: smithy_client_1.expectString,
2673
- findingArn: smithy_client_1.expectString,
2674
- firstObservedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2675
- lastObservedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2676
- packageVulnerabilityDetails: (_) => de_PackageVulnerabilityDetails(_, context),
2677
- remediation: smithy_client_1._json,
2678
- resources: (_) => de_ResourceList(_, context),
2679
- score: smithy_client_1.limitedParseDouble,
2680
- scoreDetails: (_) => de_ScoreDetails(_, context),
2681
- severity: smithy_client_1.expectString,
2682
- status: smithy_client_1.expectString,
2683
- title: smithy_client_1.expectString,
2684
- type: smithy_client_1.expectString,
2685
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2686
- });
2687
- };
2688
- const de_EnhancedImageScanFindingList = (output, context) => {
2689
- const retVal = (output || [])
2690
- .filter((e) => e != null)
2691
- .map((entry) => {
2692
- return de_EnhancedImageScanFinding(entry, context);
2693
- });
2694
- return retVal;
2695
- };
2696
- const de_GetAuthorizationTokenResponse = (output, context) => {
2697
- return (0, smithy_client_1.take)(output, {
2698
- authorizationData: (_) => de_AuthorizationDataList(_, context),
2699
- });
2700
- };
2701
- const de_GetLifecyclePolicyPreviewResponse = (output, context) => {
2702
- return (0, smithy_client_1.take)(output, {
2703
- lifecyclePolicyText: smithy_client_1.expectString,
2704
- nextToken: smithy_client_1.expectString,
2705
- previewResults: (_) => de_LifecyclePolicyPreviewResultList(_, context),
2706
- registryId: smithy_client_1.expectString,
2707
- repositoryName: smithy_client_1.expectString,
2708
- status: smithy_client_1.expectString,
2709
- summary: smithy_client_1._json,
2710
- });
2711
- };
2712
- const de_GetLifecyclePolicyResponse = (output, context) => {
2713
- return (0, smithy_client_1.take)(output, {
2714
- lastEvaluatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2715
- lifecyclePolicyText: smithy_client_1.expectString,
2716
- registryId: smithy_client_1.expectString,
2717
- repositoryName: smithy_client_1.expectString,
2718
- });
2719
- };
2720
- const de_ImageDetail = (output, context) => {
2721
- return (0, smithy_client_1.take)(output, {
2722
- artifactMediaType: smithy_client_1.expectString,
2723
- imageDigest: smithy_client_1.expectString,
2724
- imageManifestMediaType: smithy_client_1.expectString,
2725
- imagePushedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2726
- imageScanFindingsSummary: (_) => de_ImageScanFindingsSummary(_, context),
2727
- imageScanStatus: smithy_client_1._json,
2728
- imageSizeInBytes: smithy_client_1.expectLong,
2729
- imageTags: smithy_client_1._json,
2730
- lastRecordedPullTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2731
- registryId: smithy_client_1.expectString,
2732
- repositoryName: smithy_client_1.expectString,
2733
- });
2734
- };
2735
- const de_ImageDetailList = (output, context) => {
2736
- const retVal = (output || [])
2737
- .filter((e) => e != null)
2738
- .map((entry) => {
2739
- return de_ImageDetail(entry, context);
2740
- });
2741
- return retVal;
2742
- };
2743
- const de_ImageScanFindings = (output, context) => {
2744
- return (0, smithy_client_1.take)(output, {
2745
- enhancedFindings: (_) => de_EnhancedImageScanFindingList(_, context),
2746
- findingSeverityCounts: smithy_client_1._json,
2747
- findings: smithy_client_1._json,
2748
- imageScanCompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2749
- vulnerabilitySourceUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2750
- });
2751
- };
2752
- const de_ImageScanFindingsSummary = (output, context) => {
2753
- return (0, smithy_client_1.take)(output, {
2754
- findingSeverityCounts: smithy_client_1._json,
2755
- imageScanCompletedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2756
- vulnerabilitySourceUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2757
- });
2758
- };
2759
- const de_LifecyclePolicyPreviewResult = (output, context) => {
2760
- return (0, smithy_client_1.take)(output, {
2761
- action: smithy_client_1._json,
2762
- appliedRulePriority: smithy_client_1.expectInt32,
2763
- imageDigest: smithy_client_1.expectString,
2764
- imagePushedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2765
- imageTags: smithy_client_1._json,
2766
- });
2767
- };
2768
- const de_LifecyclePolicyPreviewResultList = (output, context) => {
2769
- const retVal = (output || [])
2770
- .filter((e) => e != null)
2771
- .map((entry) => {
2772
- return de_LifecyclePolicyPreviewResult(entry, context);
2773
- });
2774
- return retVal;
2775
- };
2776
- const de_PackageVulnerabilityDetails = (output, context) => {
2777
- return (0, smithy_client_1.take)(output, {
2778
- cvss: (_) => de_CvssScoreList(_, context),
2779
- referenceUrls: smithy_client_1._json,
2780
- relatedVulnerabilities: smithy_client_1._json,
2781
- source: smithy_client_1.expectString,
2782
- sourceUrl: smithy_client_1.expectString,
2783
- vendorCreatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2784
- vendorSeverity: smithy_client_1.expectString,
2785
- vendorUpdatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2786
- vulnerabilityId: smithy_client_1.expectString,
2787
- vulnerablePackages: smithy_client_1._json,
2788
- });
2789
- };
2790
- const de_PullThroughCacheRule = (output, context) => {
2791
- return (0, smithy_client_1.take)(output, {
2792
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2793
- credentialArn: smithy_client_1.expectString,
2794
- ecrRepositoryPrefix: smithy_client_1.expectString,
2795
- registryId: smithy_client_1.expectString,
2796
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2797
- upstreamRegistry: smithy_client_1.expectString,
2798
- upstreamRegistryUrl: smithy_client_1.expectString,
2799
- });
2800
- };
2801
- const de_PullThroughCacheRuleList = (output, context) => {
2802
- const retVal = (output || [])
2803
- .filter((e) => e != null)
2804
- .map((entry) => {
2805
- return de_PullThroughCacheRule(entry, context);
2806
- });
2807
- return retVal;
2808
- };
2809
- const de_Repository = (output, context) => {
2810
- return (0, smithy_client_1.take)(output, {
2811
- createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2812
- encryptionConfiguration: smithy_client_1._json,
2813
- imageScanningConfiguration: smithy_client_1._json,
2814
- imageTagMutability: smithy_client_1.expectString,
2815
- registryId: smithy_client_1.expectString,
2816
- repositoryArn: smithy_client_1.expectString,
2817
- repositoryName: smithy_client_1.expectString,
2818
- repositoryUri: smithy_client_1.expectString,
2819
- });
2820
- };
2821
- const de_RepositoryList = (output, context) => {
2822
- const retVal = (output || [])
2823
- .filter((e) => e != null)
2824
- .map((entry) => {
2825
- return de_Repository(entry, context);
2826
- });
2827
- return retVal;
2828
- };
2829
- const de_Resource = (output, context) => {
2830
- return (0, smithy_client_1.take)(output, {
2831
- details: (_) => de_ResourceDetails(_, context),
2832
- id: smithy_client_1.expectString,
2833
- tags: smithy_client_1._json,
2834
- type: smithy_client_1.expectString,
2835
- });
2836
- };
2837
- const de_ResourceDetails = (output, context) => {
2838
- return (0, smithy_client_1.take)(output, {
2839
- awsEcrContainerImage: (_) => de_AwsEcrContainerImageDetails(_, context),
2840
- });
2841
- };
2842
- const de_ResourceList = (output, context) => {
2843
- const retVal = (output || [])
2844
- .filter((e) => e != null)
2845
- .map((entry) => {
2846
- return de_Resource(entry, context);
2847
- });
2848
- return retVal;
2849
- };
2850
- const de_ScoreDetails = (output, context) => {
2851
- return (0, smithy_client_1.take)(output, {
2852
- cvss: (_) => de_CvssScoreDetails(_, context),
2853
- });
2854
- };
2855
- const de_UpdatePullThroughCacheRuleResponse = (output, context) => {
2856
- return (0, smithy_client_1.take)(output, {
2857
- credentialArn: smithy_client_1.expectString,
2858
- ecrRepositoryPrefix: smithy_client_1.expectString,
2859
- registryId: smithy_client_1.expectString,
2860
- updatedAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
2861
- });
2862
- };
2863
- const deserializeMetadata = (output) => ({
2864
- httpStatusCode: output.statusCode,
2865
- requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
2866
- extendedRequestId: output.headers["x-amz-id-2"],
2867
- cfId: output.headers["x-amz-cf-id"],
2868
- });
2869
- const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body));
2870
- const throwDefaultError = (0, smithy_client_1.withBaseException)(ECRServiceException_1.ECRServiceException);
2871
- const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2872
- const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2873
- const contents = {
2874
- protocol,
2875
- hostname,
2876
- port,
2877
- method: "POST",
2878
- path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
2879
- headers,
2880
- };
2881
- if (resolvedHostname !== undefined) {
2882
- contents.hostname = resolvedHostname;
2883
- }
2884
- if (body !== undefined) {
2885
- contents.body = body;
2886
- }
2887
- return new protocol_http_1.HttpRequest(contents);
2888
- };
2889
- function sharedHeaders(operation) {
2890
- return {
2891
- "content-type": "application/x-amz-json-1.1",
2892
- "x-amz-target": `AmazonEC2ContainerRegistry_V20150921.${operation}`,
2893
- };
2894
- }
2895
- const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
2896
- if (encoded.length) {
2897
- return JSON.parse(encoded);
2898
- }
2899
- return {};
2900
- });
2901
- const parseErrorBody = async (errorBody, context) => {
2902
- const value = await parseBody(errorBody, context);
2903
- value.message = value.message ?? value.Message;
2904
- return value;
2905
- };
2906
- const loadRestJsonErrorCode = (output, data) => {
2907
- const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
2908
- const sanitizeErrorCode = (rawValue) => {
2909
- let cleanValue = rawValue;
2910
- if (typeof cleanValue === "number") {
2911
- cleanValue = cleanValue.toString();
2912
- }
2913
- if (cleanValue.indexOf(",") >= 0) {
2914
- cleanValue = cleanValue.split(",")[0];
2915
- }
2916
- if (cleanValue.indexOf(":") >= 0) {
2917
- cleanValue = cleanValue.split(":")[0];
2918
- }
2919
- if (cleanValue.indexOf("#") >= 0) {
2920
- cleanValue = cleanValue.split("#")[1];
2921
- }
2922
- return cleanValue;
2923
- };
2924
- const headerKey = findKey(output.headers, "x-amzn-errortype");
2925
- if (headerKey !== undefined) {
2926
- return sanitizeErrorCode(output.headers[headerKey]);
2927
- }
2928
- if (data.code !== undefined) {
2929
- return sanitizeErrorCode(data.code);
2930
- }
2931
- if (data["__type"] !== undefined) {
2932
- return sanitizeErrorCode(data["__type"]);
2933
- }
2934
- };
1
+ module.exports = require("../index.js");