@aws-sdk/client-ecr 3.451.0 → 3.458.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.
- package/README.md +57 -41
- package/dist-cjs/ECR.js +4 -0
- package/dist-cjs/commands/UpdatePullThroughCacheRuleCommand.js +51 -0
- package/dist-cjs/commands/ValidatePullThroughCacheRuleCommand.js +51 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/models_0.js +88 -11
- package/dist-cjs/protocols/Aws_json1_1.js +186 -2
- package/dist-es/ECR.js +4 -0
- package/dist-es/commands/UpdatePullThroughCacheRuleCommand.js +47 -0
- package/dist-es/commands/ValidatePullThroughCacheRuleCommand.js +47 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/models_0.js +79 -8
- package/dist-es/protocols/Aws_json1_1.js +181 -1
- package/dist-types/ECR.d.ts +14 -0
- package/dist-types/ECRClient.d.ts +4 -2
- package/dist-types/commands/BatchDeleteImageCommand.d.ts +1 -1
- package/dist-types/commands/BatchGetImageCommand.d.ts +11 -1
- package/dist-types/commands/CreatePullThroughCacheRuleCommand.d.ts +19 -1
- package/dist-types/commands/DeletePullThroughCacheRuleCommand.d.ts +1 -0
- package/dist-types/commands/DeleteRepositoryCommand.d.ts +3 -3
- package/dist-types/commands/DescribePullThroughCacheRulesCommand.d.ts +3 -0
- package/dist-types/commands/GetDownloadUrlForLayerCommand.d.ts +4 -0
- package/dist-types/commands/UpdatePullThroughCacheRuleCommand.d.ts +104 -0
- package/dist-types/commands/ValidatePullThroughCacheRuleCommand.d.ts +96 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/models_0.d.ts +280 -13
- package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
- package/dist-types/ts3.4/ECR.d.ts +34 -0
- package/dist-types/ts3.4/ECRClient.d.ts +14 -2
- package/dist-types/ts3.4/commands/UpdatePullThroughCacheRuleCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ValidatePullThroughCacheRuleCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/models_0.d.ts +94 -6
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ImageDigestDoesNotMatchException = exports.ImageAlreadyExistsException = exports.ScanType = exports.LifecyclePolicyPreviewNotFoundException = exports.LifecyclePolicyPreviewStatus = exports.ImageActionType = exports.UnableToGetUpstreamLayerException = exports.LayersNotFoundException = exports.LayerInaccessibleException = exports.RepositoryFilterType = exports.ScanNotFoundException = exports.ScanStatus = exports.FindingSeverity = exports.TagStatus = exports.ImageNotFoundException = exports.ReplicationStatus = exports.RepositoryPolicyNotFoundException = exports.RepositoryNotEmptyException = exports.RegistryPolicyNotFoundException = exports.PullThroughCacheRuleNotFoundException = exports.LifecyclePolicyNotFoundException = exports.TooManyTagsException = exports.RepositoryAlreadyExistsException = exports.InvalidTagParameterException = exports.ImageTagMutability = exports.EncryptionType = exports.UnsupportedUpstreamRegistryException = exports.UnableToDecryptSecretValueException = exports.UnableToAccessSecretException = exports.SecretNotFoundException = exports.PullThroughCacheRuleAlreadyExistsException = exports.UpstreamRegistry = exports.UploadNotFoundException = exports.LayerPartTooSmallException = exports.LayerAlreadyExistsException = exports.KmsException = exports.InvalidLayerException = exports.EmptyUploadException = exports.ValidationException = exports.ScanFrequency = exports.ScanningRepositoryFilterType = exports.ScanningConfigurationFailureCode = exports.UnableToGetUpstreamImageException = exports.LimitExceededException = exports.ImageFailureCode = exports.ServerException = exports.RepositoryNotFoundException = exports.InvalidParameterException = exports.LayerAvailability = exports.LayerFailureCode = void 0;
|
|
4
|
+
exports.InvalidLayerPartException = exports.LifecyclePolicyPreviewInProgressException = exports.UnsupportedImageTypeException = exports.ReferencedImagesNotFoundException = exports.ImageTagAlreadyExistsException = void 0;
|
|
4
5
|
const ECRServiceException_1 = require("./ECRServiceException");
|
|
5
6
|
exports.LayerFailureCode = {
|
|
6
7
|
InvalidLayerDigest: "InvalidLayerDigest",
|
|
@@ -57,7 +58,36 @@ exports.ImageFailureCode = {
|
|
|
57
58
|
InvalidImageTag: "InvalidImageTag",
|
|
58
59
|
KmsError: "KmsError",
|
|
59
60
|
MissingDigestAndTag: "MissingDigestAndTag",
|
|
61
|
+
UpstreamAccessDenied: "UpstreamAccessDenied",
|
|
62
|
+
UpstreamTooManyRequests: "UpstreamTooManyRequests",
|
|
63
|
+
UpstreamUnavailable: "UpstreamUnavailable",
|
|
60
64
|
};
|
|
65
|
+
class LimitExceededException extends ECRServiceException_1.ECRServiceException {
|
|
66
|
+
constructor(opts) {
|
|
67
|
+
super({
|
|
68
|
+
name: "LimitExceededException",
|
|
69
|
+
$fault: "client",
|
|
70
|
+
...opts,
|
|
71
|
+
});
|
|
72
|
+
this.name = "LimitExceededException";
|
|
73
|
+
this.$fault = "client";
|
|
74
|
+
Object.setPrototypeOf(this, LimitExceededException.prototype);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.LimitExceededException = LimitExceededException;
|
|
78
|
+
class UnableToGetUpstreamImageException extends ECRServiceException_1.ECRServiceException {
|
|
79
|
+
constructor(opts) {
|
|
80
|
+
super({
|
|
81
|
+
name: "UnableToGetUpstreamImageException",
|
|
82
|
+
$fault: "client",
|
|
83
|
+
...opts,
|
|
84
|
+
});
|
|
85
|
+
this.name = "UnableToGetUpstreamImageException";
|
|
86
|
+
this.$fault = "client";
|
|
87
|
+
Object.setPrototypeOf(this, UnableToGetUpstreamImageException.prototype);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
exports.UnableToGetUpstreamImageException = UnableToGetUpstreamImageException;
|
|
61
91
|
exports.ScanningConfigurationFailureCode = {
|
|
62
92
|
REPOSITORY_NOT_FOUND: "REPOSITORY_NOT_FOUND",
|
|
63
93
|
};
|
|
@@ -161,32 +191,66 @@ class UploadNotFoundException extends ECRServiceException_1.ECRServiceException
|
|
|
161
191
|
}
|
|
162
192
|
}
|
|
163
193
|
exports.UploadNotFoundException = UploadNotFoundException;
|
|
164
|
-
|
|
194
|
+
exports.UpstreamRegistry = {
|
|
195
|
+
AzureContainerRegistry: "azure-container-registry",
|
|
196
|
+
DockerHub: "docker-hub",
|
|
197
|
+
EcrPublic: "ecr-public",
|
|
198
|
+
GitHubContainerRegistry: "github-container-registry",
|
|
199
|
+
K8s: "k8s",
|
|
200
|
+
Quay: "quay",
|
|
201
|
+
};
|
|
202
|
+
class PullThroughCacheRuleAlreadyExistsException extends ECRServiceException_1.ECRServiceException {
|
|
165
203
|
constructor(opts) {
|
|
166
204
|
super({
|
|
167
|
-
name: "
|
|
205
|
+
name: "PullThroughCacheRuleAlreadyExistsException",
|
|
168
206
|
$fault: "client",
|
|
169
207
|
...opts,
|
|
170
208
|
});
|
|
171
|
-
this.name = "
|
|
209
|
+
this.name = "PullThroughCacheRuleAlreadyExistsException";
|
|
172
210
|
this.$fault = "client";
|
|
173
|
-
Object.setPrototypeOf(this,
|
|
211
|
+
Object.setPrototypeOf(this, PullThroughCacheRuleAlreadyExistsException.prototype);
|
|
174
212
|
}
|
|
175
213
|
}
|
|
176
|
-
exports.
|
|
177
|
-
class
|
|
214
|
+
exports.PullThroughCacheRuleAlreadyExistsException = PullThroughCacheRuleAlreadyExistsException;
|
|
215
|
+
class SecretNotFoundException extends ECRServiceException_1.ECRServiceException {
|
|
178
216
|
constructor(opts) {
|
|
179
217
|
super({
|
|
180
|
-
name: "
|
|
218
|
+
name: "SecretNotFoundException",
|
|
181
219
|
$fault: "client",
|
|
182
220
|
...opts,
|
|
183
221
|
});
|
|
184
|
-
this.name = "
|
|
222
|
+
this.name = "SecretNotFoundException";
|
|
185
223
|
this.$fault = "client";
|
|
186
|
-
Object.setPrototypeOf(this,
|
|
224
|
+
Object.setPrototypeOf(this, SecretNotFoundException.prototype);
|
|
187
225
|
}
|
|
188
226
|
}
|
|
189
|
-
exports.
|
|
227
|
+
exports.SecretNotFoundException = SecretNotFoundException;
|
|
228
|
+
class UnableToAccessSecretException extends ECRServiceException_1.ECRServiceException {
|
|
229
|
+
constructor(opts) {
|
|
230
|
+
super({
|
|
231
|
+
name: "UnableToAccessSecretException",
|
|
232
|
+
$fault: "client",
|
|
233
|
+
...opts,
|
|
234
|
+
});
|
|
235
|
+
this.name = "UnableToAccessSecretException";
|
|
236
|
+
this.$fault = "client";
|
|
237
|
+
Object.setPrototypeOf(this, UnableToAccessSecretException.prototype);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
exports.UnableToAccessSecretException = UnableToAccessSecretException;
|
|
241
|
+
class UnableToDecryptSecretValueException extends ECRServiceException_1.ECRServiceException {
|
|
242
|
+
constructor(opts) {
|
|
243
|
+
super({
|
|
244
|
+
name: "UnableToDecryptSecretValueException",
|
|
245
|
+
$fault: "client",
|
|
246
|
+
...opts,
|
|
247
|
+
});
|
|
248
|
+
this.name = "UnableToDecryptSecretValueException";
|
|
249
|
+
this.$fault = "client";
|
|
250
|
+
Object.setPrototypeOf(this, UnableToDecryptSecretValueException.prototype);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
exports.UnableToDecryptSecretValueException = UnableToDecryptSecretValueException;
|
|
190
254
|
class UnsupportedUpstreamRegistryException extends ECRServiceException_1.ECRServiceException {
|
|
191
255
|
constructor(opts) {
|
|
192
256
|
super({
|
|
@@ -395,6 +459,19 @@ class LayersNotFoundException extends ECRServiceException_1.ECRServiceException
|
|
|
395
459
|
}
|
|
396
460
|
}
|
|
397
461
|
exports.LayersNotFoundException = LayersNotFoundException;
|
|
462
|
+
class UnableToGetUpstreamLayerException extends ECRServiceException_1.ECRServiceException {
|
|
463
|
+
constructor(opts) {
|
|
464
|
+
super({
|
|
465
|
+
name: "UnableToGetUpstreamLayerException",
|
|
466
|
+
$fault: "client",
|
|
467
|
+
...opts,
|
|
468
|
+
});
|
|
469
|
+
this.name = "UnableToGetUpstreamLayerException";
|
|
470
|
+
this.$fault = "client";
|
|
471
|
+
Object.setPrototypeOf(this, UnableToGetUpstreamLayerException.prototype);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
exports.UnableToGetUpstreamLayerException = UnableToGetUpstreamLayerException;
|
|
398
475
|
exports.ImageActionType = {
|
|
399
476
|
EXPIRE: "EXPIRE",
|
|
400
477
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.de_UploadLayerPartCommand = 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 = void 0;
|
|
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
5
|
const protocol_http_1 = require("@smithy/protocol-http");
|
|
6
6
|
const smithy_client_1 = require("@smithy/smithy-client");
|
|
7
7
|
const ECRServiceException_1 = require("../models/ECRServiceException");
|
|
@@ -286,6 +286,13 @@ const se_UntagResourceCommand = async (input, context) => {
|
|
|
286
286
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
287
287
|
};
|
|
288
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;
|
|
289
296
|
const se_UploadLayerPartCommand = async (input, context) => {
|
|
290
297
|
const headers = sharedHeaders("UploadLayerPart");
|
|
291
298
|
let body;
|
|
@@ -293,6 +300,13 @@ const se_UploadLayerPartCommand = async (input, context) => {
|
|
|
293
300
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
294
301
|
};
|
|
295
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;
|
|
296
310
|
const de_BatchCheckLayerAvailabilityCommand = async (output, context) => {
|
|
297
311
|
if (output.statusCode >= 300) {
|
|
298
312
|
return de_BatchCheckLayerAvailabilityCommandError(output, context);
|
|
@@ -395,12 +409,18 @@ const de_BatchGetImageCommandError = async (output, context) => {
|
|
|
395
409
|
case "InvalidParameterException":
|
|
396
410
|
case "com.amazonaws.ecr#InvalidParameterException":
|
|
397
411
|
throw await de_InvalidParameterExceptionRes(parsedOutput, context);
|
|
412
|
+
case "LimitExceededException":
|
|
413
|
+
case "com.amazonaws.ecr#LimitExceededException":
|
|
414
|
+
throw await de_LimitExceededExceptionRes(parsedOutput, context);
|
|
398
415
|
case "RepositoryNotFoundException":
|
|
399
416
|
case "com.amazonaws.ecr#RepositoryNotFoundException":
|
|
400
417
|
throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
|
|
401
418
|
case "ServerException":
|
|
402
419
|
case "com.amazonaws.ecr#ServerException":
|
|
403
420
|
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
421
|
+
case "UnableToGetUpstreamImageException":
|
|
422
|
+
case "com.amazonaws.ecr#UnableToGetUpstreamImageException":
|
|
423
|
+
throw await de_UnableToGetUpstreamImageExceptionRes(parsedOutput, context);
|
|
404
424
|
default:
|
|
405
425
|
const parsedBody = parsedOutput.body;
|
|
406
426
|
return throwDefaultError({
|
|
@@ -539,9 +559,18 @@ const de_CreatePullThroughCacheRuleCommandError = async (output, context) => {
|
|
|
539
559
|
case "PullThroughCacheRuleAlreadyExistsException":
|
|
540
560
|
case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
|
|
541
561
|
throw await de_PullThroughCacheRuleAlreadyExistsExceptionRes(parsedOutput, context);
|
|
562
|
+
case "SecretNotFoundException":
|
|
563
|
+
case "com.amazonaws.ecr#SecretNotFoundException":
|
|
564
|
+
throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
|
|
542
565
|
case "ServerException":
|
|
543
566
|
case "com.amazonaws.ecr#ServerException":
|
|
544
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);
|
|
545
574
|
case "UnsupportedUpstreamRegistryException":
|
|
546
575
|
case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
|
|
547
576
|
throw await de_UnsupportedUpstreamRegistryExceptionRes(parsedOutput, context);
|
|
@@ -1151,6 +1180,9 @@ const de_GetDownloadUrlForLayerCommandError = async (output, context) => {
|
|
|
1151
1180
|
case "ServerException":
|
|
1152
1181
|
case "com.amazonaws.ecr#ServerException":
|
|
1153
1182
|
throw await de_ServerExceptionRes(parsedOutput, context);
|
|
1183
|
+
case "UnableToGetUpstreamLayerException":
|
|
1184
|
+
case "com.amazonaws.ecr#UnableToGetUpstreamLayerException":
|
|
1185
|
+
throw await de_UnableToGetUpstreamLayerExceptionRes(parsedOutput, context);
|
|
1154
1186
|
default:
|
|
1155
1187
|
const parsedBody = parsedOutput.body;
|
|
1156
1188
|
return throwDefaultError({
|
|
@@ -2021,6 +2053,57 @@ const de_UntagResourceCommandError = async (output, context) => {
|
|
|
2021
2053
|
});
|
|
2022
2054
|
}
|
|
2023
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
|
+
};
|
|
2024
2107
|
const de_UploadLayerPartCommand = async (output, context) => {
|
|
2025
2108
|
if (output.statusCode >= 300) {
|
|
2026
2109
|
return de_UploadLayerPartCommandError(output, context);
|
|
@@ -2072,6 +2155,48 @@ const de_UploadLayerPartCommandError = async (output, context) => {
|
|
|
2072
2155
|
});
|
|
2073
2156
|
}
|
|
2074
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
|
+
};
|
|
2075
2200
|
const de_EmptyUploadExceptionRes = async (parsedOutput, context) => {
|
|
2076
2201
|
const body = parsedOutput.body;
|
|
2077
2202
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -2315,6 +2440,15 @@ const de_ScanNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
|
2315
2440
|
});
|
|
2316
2441
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2317
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
|
+
};
|
|
2318
2452
|
const de_ServerExceptionRes = async (parsedOutput, context) => {
|
|
2319
2453
|
const body = parsedOutput.body;
|
|
2320
2454
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -2333,6 +2467,42 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
|
|
|
2333
2467
|
});
|
|
2334
2468
|
return (0, smithy_client_1.decorateServiceException)(exception, body);
|
|
2335
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
|
+
};
|
|
2336
2506
|
const de_UnsupportedImageTypeExceptionRes = async (parsedOutput, context) => {
|
|
2337
2507
|
const body = parsedOutput.body;
|
|
2338
2508
|
const deserialized = (0, smithy_client_1._json)(body);
|
|
@@ -2409,8 +2579,10 @@ const de_AwsEcrContainerImageDetails = (output, context) => {
|
|
|
2409
2579
|
const de_CreatePullThroughCacheRuleResponse = (output, context) => {
|
|
2410
2580
|
return (0, smithy_client_1.take)(output, {
|
|
2411
2581
|
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2582
|
+
credentialArn: smithy_client_1.expectString,
|
|
2412
2583
|
ecrRepositoryPrefix: smithy_client_1.expectString,
|
|
2413
2584
|
registryId: smithy_client_1.expectString,
|
|
2585
|
+
upstreamRegistry: smithy_client_1.expectString,
|
|
2414
2586
|
upstreamRegistryUrl: smithy_client_1.expectString,
|
|
2415
2587
|
});
|
|
2416
2588
|
};
|
|
@@ -2455,6 +2627,7 @@ const de_DeleteLifecyclePolicyResponse = (output, context) => {
|
|
|
2455
2627
|
const de_DeletePullThroughCacheRuleResponse = (output, context) => {
|
|
2456
2628
|
return (0, smithy_client_1.take)(output, {
|
|
2457
2629
|
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2630
|
+
credentialArn: smithy_client_1.expectString,
|
|
2458
2631
|
ecrRepositoryPrefix: smithy_client_1.expectString,
|
|
2459
2632
|
registryId: smithy_client_1.expectString,
|
|
2460
2633
|
upstreamRegistryUrl: smithy_client_1.expectString,
|
|
@@ -2617,8 +2790,11 @@ const de_PackageVulnerabilityDetails = (output, context) => {
|
|
|
2617
2790
|
const de_PullThroughCacheRule = (output, context) => {
|
|
2618
2791
|
return (0, smithy_client_1.take)(output, {
|
|
2619
2792
|
createdAt: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
|
|
2793
|
+
credentialArn: smithy_client_1.expectString,
|
|
2620
2794
|
ecrRepositoryPrefix: smithy_client_1.expectString,
|
|
2621
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,
|
|
2622
2798
|
upstreamRegistryUrl: smithy_client_1.expectString,
|
|
2623
2799
|
});
|
|
2624
2800
|
};
|
|
@@ -2676,6 +2852,14 @@ const de_ScoreDetails = (output, context) => {
|
|
|
2676
2852
|
cvss: (_) => de_CvssScoreDetails(_, context),
|
|
2677
2853
|
});
|
|
2678
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
|
+
};
|
|
2679
2863
|
const deserializeMetadata = (output) => ({
|
|
2680
2864
|
httpStatusCode: output.statusCode,
|
|
2681
2865
|
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
package/dist-es/ECR.js
CHANGED
|
@@ -39,7 +39,9 @@ import { StartImageScanCommand, } from "./commands/StartImageScanCommand";
|
|
|
39
39
|
import { StartLifecyclePolicyPreviewCommand, } from "./commands/StartLifecyclePolicyPreviewCommand";
|
|
40
40
|
import { TagResourceCommand } from "./commands/TagResourceCommand";
|
|
41
41
|
import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
|
|
42
|
+
import { UpdatePullThroughCacheRuleCommand, } from "./commands/UpdatePullThroughCacheRuleCommand";
|
|
42
43
|
import { UploadLayerPartCommand, } from "./commands/UploadLayerPartCommand";
|
|
44
|
+
import { ValidatePullThroughCacheRuleCommand, } from "./commands/ValidatePullThroughCacheRuleCommand";
|
|
43
45
|
import { ECRClient } from "./ECRClient";
|
|
44
46
|
const commands = {
|
|
45
47
|
BatchCheckLayerAvailabilityCommand,
|
|
@@ -82,7 +84,9 @@ const commands = {
|
|
|
82
84
|
StartLifecyclePolicyPreviewCommand,
|
|
83
85
|
TagResourceCommand,
|
|
84
86
|
UntagResourceCommand,
|
|
87
|
+
UpdatePullThroughCacheRuleCommand,
|
|
85
88
|
UploadLayerPartCommand,
|
|
89
|
+
ValidatePullThroughCacheRuleCommand,
|
|
86
90
|
};
|
|
87
91
|
export class ECR extends ECRClient {
|
|
88
92
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_UpdatePullThroughCacheRuleCommand, se_UpdatePullThroughCacheRuleCommand } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class UpdatePullThroughCacheRuleCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, UpdatePullThroughCacheRuleCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "ECRClient";
|
|
26
|
+
const commandName = "UpdatePullThroughCacheRuleCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonEC2ContainerRegistry_V20150921",
|
|
35
|
+
operation: "UpdatePullThroughCacheRule",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_UpdatePullThroughCacheRuleCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_UpdatePullThroughCacheRuleCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
|
|
5
|
+
import { de_ValidatePullThroughCacheRuleCommand, se_ValidatePullThroughCacheRuleCommand, } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ValidatePullThroughCacheRuleCommand extends $Command {
|
|
8
|
+
static getEndpointParameterInstructions() {
|
|
9
|
+
return {
|
|
10
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
11
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
12
|
+
Region: { type: "builtInParams", name: "region" },
|
|
13
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
constructor(input) {
|
|
17
|
+
super();
|
|
18
|
+
this.input = input;
|
|
19
|
+
}
|
|
20
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
21
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
22
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, ValidatePullThroughCacheRuleCommand.getEndpointParameterInstructions()));
|
|
23
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
24
|
+
const { logger } = configuration;
|
|
25
|
+
const clientName = "ECRClient";
|
|
26
|
+
const commandName = "ValidatePullThroughCacheRuleCommand";
|
|
27
|
+
const handlerExecutionContext = {
|
|
28
|
+
logger,
|
|
29
|
+
clientName,
|
|
30
|
+
commandName,
|
|
31
|
+
inputFilterSensitiveLog: (_) => _,
|
|
32
|
+
outputFilterSensitiveLog: (_) => _,
|
|
33
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
34
|
+
service: "AmazonEC2ContainerRegistry_V20150921",
|
|
35
|
+
operation: "ValidatePullThroughCacheRule",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const { requestHandler } = configuration;
|
|
39
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
40
|
+
}
|
|
41
|
+
serialize(input, context) {
|
|
42
|
+
return se_ValidatePullThroughCacheRuleCommand(input, context);
|
|
43
|
+
}
|
|
44
|
+
deserialize(output, context) {
|
|
45
|
+
return de_ValidatePullThroughCacheRuleCommand(output, context);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -38,4 +38,6 @@ export * from "./StartImageScanCommand";
|
|
|
38
38
|
export * from "./StartLifecyclePolicyPreviewCommand";
|
|
39
39
|
export * from "./TagResourceCommand";
|
|
40
40
|
export * from "./UntagResourceCommand";
|
|
41
|
+
export * from "./UpdatePullThroughCacheRuleCommand";
|
|
41
42
|
export * from "./UploadLayerPartCommand";
|
|
43
|
+
export * from "./ValidatePullThroughCacheRuleCommand";
|