@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.
Files changed (35) hide show
  1. package/README.md +57 -41
  2. package/dist-cjs/ECR.js +4 -0
  3. package/dist-cjs/commands/UpdatePullThroughCacheRuleCommand.js +51 -0
  4. package/dist-cjs/commands/ValidatePullThroughCacheRuleCommand.js +51 -0
  5. package/dist-cjs/commands/index.js +2 -0
  6. package/dist-cjs/models/models_0.js +88 -11
  7. package/dist-cjs/protocols/Aws_json1_1.js +186 -2
  8. package/dist-es/ECR.js +4 -0
  9. package/dist-es/commands/UpdatePullThroughCacheRuleCommand.js +47 -0
  10. package/dist-es/commands/ValidatePullThroughCacheRuleCommand.js +47 -0
  11. package/dist-es/commands/index.js +2 -0
  12. package/dist-es/models/models_0.js +79 -8
  13. package/dist-es/protocols/Aws_json1_1.js +181 -1
  14. package/dist-types/ECR.d.ts +14 -0
  15. package/dist-types/ECRClient.d.ts +4 -2
  16. package/dist-types/commands/BatchDeleteImageCommand.d.ts +1 -1
  17. package/dist-types/commands/BatchGetImageCommand.d.ts +11 -1
  18. package/dist-types/commands/CreatePullThroughCacheRuleCommand.d.ts +19 -1
  19. package/dist-types/commands/DeletePullThroughCacheRuleCommand.d.ts +1 -0
  20. package/dist-types/commands/DeleteRepositoryCommand.d.ts +3 -3
  21. package/dist-types/commands/DescribePullThroughCacheRulesCommand.d.ts +3 -0
  22. package/dist-types/commands/GetDownloadUrlForLayerCommand.d.ts +4 -0
  23. package/dist-types/commands/UpdatePullThroughCacheRuleCommand.d.ts +104 -0
  24. package/dist-types/commands/ValidatePullThroughCacheRuleCommand.d.ts +96 -0
  25. package/dist-types/commands/index.d.ts +2 -0
  26. package/dist-types/models/models_0.d.ts +280 -13
  27. package/dist-types/protocols/Aws_json1_1.d.ts +18 -0
  28. package/dist-types/ts3.4/ECR.d.ts +34 -0
  29. package/dist-types/ts3.4/ECRClient.d.ts +14 -2
  30. package/dist-types/ts3.4/commands/UpdatePullThroughCacheRuleCommand.d.ts +42 -0
  31. package/dist-types/ts3.4/commands/ValidatePullThroughCacheRuleCommand.d.ts +42 -0
  32. package/dist-types/ts3.4/commands/index.d.ts +2 -0
  33. package/dist-types/ts3.4/models/models_0.d.ts +94 -6
  34. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +24 -0
  35. package/package.json +3 -3
@@ -51,7 +51,34 @@ export const ImageFailureCode = {
51
51
  InvalidImageTag: "InvalidImageTag",
52
52
  KmsError: "KmsError",
53
53
  MissingDigestAndTag: "MissingDigestAndTag",
54
+ UpstreamAccessDenied: "UpstreamAccessDenied",
55
+ UpstreamTooManyRequests: "UpstreamTooManyRequests",
56
+ UpstreamUnavailable: "UpstreamUnavailable",
54
57
  };
58
+ export class LimitExceededException extends __BaseException {
59
+ constructor(opts) {
60
+ super({
61
+ name: "LimitExceededException",
62
+ $fault: "client",
63
+ ...opts,
64
+ });
65
+ this.name = "LimitExceededException";
66
+ this.$fault = "client";
67
+ Object.setPrototypeOf(this, LimitExceededException.prototype);
68
+ }
69
+ }
70
+ export class UnableToGetUpstreamImageException extends __BaseException {
71
+ constructor(opts) {
72
+ super({
73
+ name: "UnableToGetUpstreamImageException",
74
+ $fault: "client",
75
+ ...opts,
76
+ });
77
+ this.name = "UnableToGetUpstreamImageException";
78
+ this.$fault = "client";
79
+ Object.setPrototypeOf(this, UnableToGetUpstreamImageException.prototype);
80
+ }
81
+ }
55
82
  export const ScanningConfigurationFailureCode = {
56
83
  REPOSITORY_NOT_FOUND: "REPOSITORY_NOT_FOUND",
57
84
  };
@@ -148,28 +175,60 @@ export class UploadNotFoundException extends __BaseException {
148
175
  Object.setPrototypeOf(this, UploadNotFoundException.prototype);
149
176
  }
150
177
  }
151
- export class LimitExceededException extends __BaseException {
178
+ export const UpstreamRegistry = {
179
+ AzureContainerRegistry: "azure-container-registry",
180
+ DockerHub: "docker-hub",
181
+ EcrPublic: "ecr-public",
182
+ GitHubContainerRegistry: "github-container-registry",
183
+ K8s: "k8s",
184
+ Quay: "quay",
185
+ };
186
+ export class PullThroughCacheRuleAlreadyExistsException extends __BaseException {
152
187
  constructor(opts) {
153
188
  super({
154
- name: "LimitExceededException",
189
+ name: "PullThroughCacheRuleAlreadyExistsException",
155
190
  $fault: "client",
156
191
  ...opts,
157
192
  });
158
- this.name = "LimitExceededException";
193
+ this.name = "PullThroughCacheRuleAlreadyExistsException";
159
194
  this.$fault = "client";
160
- Object.setPrototypeOf(this, LimitExceededException.prototype);
195
+ Object.setPrototypeOf(this, PullThroughCacheRuleAlreadyExistsException.prototype);
161
196
  }
162
197
  }
163
- export class PullThroughCacheRuleAlreadyExistsException extends __BaseException {
198
+ export class SecretNotFoundException extends __BaseException {
164
199
  constructor(opts) {
165
200
  super({
166
- name: "PullThroughCacheRuleAlreadyExistsException",
201
+ name: "SecretNotFoundException",
167
202
  $fault: "client",
168
203
  ...opts,
169
204
  });
170
- this.name = "PullThroughCacheRuleAlreadyExistsException";
205
+ this.name = "SecretNotFoundException";
171
206
  this.$fault = "client";
172
- Object.setPrototypeOf(this, PullThroughCacheRuleAlreadyExistsException.prototype);
207
+ Object.setPrototypeOf(this, SecretNotFoundException.prototype);
208
+ }
209
+ }
210
+ export class UnableToAccessSecretException extends __BaseException {
211
+ constructor(opts) {
212
+ super({
213
+ name: "UnableToAccessSecretException",
214
+ $fault: "client",
215
+ ...opts,
216
+ });
217
+ this.name = "UnableToAccessSecretException";
218
+ this.$fault = "client";
219
+ Object.setPrototypeOf(this, UnableToAccessSecretException.prototype);
220
+ }
221
+ }
222
+ export class UnableToDecryptSecretValueException extends __BaseException {
223
+ constructor(opts) {
224
+ super({
225
+ name: "UnableToDecryptSecretValueException",
226
+ $fault: "client",
227
+ ...opts,
228
+ });
229
+ this.name = "UnableToDecryptSecretValueException";
230
+ this.$fault = "client";
231
+ Object.setPrototypeOf(this, UnableToDecryptSecretValueException.prototype);
173
232
  }
174
233
  }
175
234
  export class UnsupportedUpstreamRegistryException extends __BaseException {
@@ -367,6 +426,18 @@ export class LayersNotFoundException extends __BaseException {
367
426
  Object.setPrototypeOf(this, LayersNotFoundException.prototype);
368
427
  }
369
428
  }
429
+ export class UnableToGetUpstreamLayerException extends __BaseException {
430
+ constructor(opts) {
431
+ super({
432
+ name: "UnableToGetUpstreamLayerException",
433
+ $fault: "client",
434
+ ...opts,
435
+ });
436
+ this.name = "UnableToGetUpstreamLayerException";
437
+ this.$fault = "client";
438
+ Object.setPrototypeOf(this, UnableToGetUpstreamLayerException.prototype);
439
+ }
440
+ }
370
441
  export const ImageActionType = {
371
442
  EXPIRE: "EXPIRE",
372
443
  };
@@ -1,7 +1,7 @@
1
1
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
2
2
  import { _json, collectBody, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
3
3
  import { ECRServiceException as __BaseException } from "../models/ECRServiceException";
4
- import { EmptyUploadException, ImageAlreadyExistsException, ImageDigestDoesNotMatchException, ImageNotFoundException, ImageTagAlreadyExistsException, InvalidLayerException, InvalidLayerPartException, InvalidParameterException, InvalidTagParameterException, KmsException, LayerAlreadyExistsException, LayerInaccessibleException, LayerPartTooSmallException, LayersNotFoundException, LifecyclePolicyNotFoundException, LifecyclePolicyPreviewInProgressException, LifecyclePolicyPreviewNotFoundException, LimitExceededException, PullThroughCacheRuleAlreadyExistsException, PullThroughCacheRuleNotFoundException, ReferencedImagesNotFoundException, RegistryPolicyNotFoundException, RepositoryAlreadyExistsException, RepositoryNotEmptyException, RepositoryNotFoundException, RepositoryPolicyNotFoundException, ScanNotFoundException, ServerException, TooManyTagsException, UnsupportedImageTypeException, UnsupportedUpstreamRegistryException, UploadNotFoundException, ValidationException, } from "../models/models_0";
4
+ import { EmptyUploadException, ImageAlreadyExistsException, ImageDigestDoesNotMatchException, ImageNotFoundException, ImageTagAlreadyExistsException, InvalidLayerException, InvalidLayerPartException, InvalidParameterException, InvalidTagParameterException, KmsException, LayerAlreadyExistsException, LayerInaccessibleException, LayerPartTooSmallException, LayersNotFoundException, LifecyclePolicyNotFoundException, LifecyclePolicyPreviewInProgressException, LifecyclePolicyPreviewNotFoundException, LimitExceededException, PullThroughCacheRuleAlreadyExistsException, PullThroughCacheRuleNotFoundException, ReferencedImagesNotFoundException, RegistryPolicyNotFoundException, RepositoryAlreadyExistsException, RepositoryNotEmptyException, RepositoryNotFoundException, RepositoryPolicyNotFoundException, ScanNotFoundException, SecretNotFoundException, ServerException, TooManyTagsException, UnableToAccessSecretException, UnableToDecryptSecretValueException, UnableToGetUpstreamImageException, UnableToGetUpstreamLayerException, UnsupportedImageTypeException, UnsupportedUpstreamRegistryException, UploadNotFoundException, ValidationException, } from "../models/models_0";
5
5
  export const se_BatchCheckLayerAvailabilityCommand = async (input, context) => {
6
6
  const headers = sharedHeaders("BatchCheckLayerAvailability");
7
7
  let body;
@@ -242,12 +242,24 @@ export const se_UntagResourceCommand = async (input, context) => {
242
242
  body = JSON.stringify(_json(input));
243
243
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
244
244
  };
245
+ export const se_UpdatePullThroughCacheRuleCommand = async (input, context) => {
246
+ const headers = sharedHeaders("UpdatePullThroughCacheRule");
247
+ let body;
248
+ body = JSON.stringify(_json(input));
249
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
250
+ };
245
251
  export const se_UploadLayerPartCommand = async (input, context) => {
246
252
  const headers = sharedHeaders("UploadLayerPart");
247
253
  let body;
248
254
  body = JSON.stringify(se_UploadLayerPartRequest(input, context));
249
255
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
250
256
  };
257
+ export const se_ValidatePullThroughCacheRuleCommand = async (input, context) => {
258
+ const headers = sharedHeaders("ValidatePullThroughCacheRule");
259
+ let body;
260
+ body = JSON.stringify(_json(input));
261
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
262
+ };
251
263
  export const de_BatchCheckLayerAvailabilityCommand = async (output, context) => {
252
264
  if (output.statusCode >= 300) {
253
265
  return de_BatchCheckLayerAvailabilityCommandError(output, context);
@@ -347,12 +359,18 @@ const de_BatchGetImageCommandError = async (output, context) => {
347
359
  case "InvalidParameterException":
348
360
  case "com.amazonaws.ecr#InvalidParameterException":
349
361
  throw await de_InvalidParameterExceptionRes(parsedOutput, context);
362
+ case "LimitExceededException":
363
+ case "com.amazonaws.ecr#LimitExceededException":
364
+ throw await de_LimitExceededExceptionRes(parsedOutput, context);
350
365
  case "RepositoryNotFoundException":
351
366
  case "com.amazonaws.ecr#RepositoryNotFoundException":
352
367
  throw await de_RepositoryNotFoundExceptionRes(parsedOutput, context);
353
368
  case "ServerException":
354
369
  case "com.amazonaws.ecr#ServerException":
355
370
  throw await de_ServerExceptionRes(parsedOutput, context);
371
+ case "UnableToGetUpstreamImageException":
372
+ case "com.amazonaws.ecr#UnableToGetUpstreamImageException":
373
+ throw await de_UnableToGetUpstreamImageExceptionRes(parsedOutput, context);
356
374
  default:
357
375
  const parsedBody = parsedOutput.body;
358
376
  return throwDefaultError({
@@ -488,9 +506,18 @@ const de_CreatePullThroughCacheRuleCommandError = async (output, context) => {
488
506
  case "PullThroughCacheRuleAlreadyExistsException":
489
507
  case "com.amazonaws.ecr#PullThroughCacheRuleAlreadyExistsException":
490
508
  throw await de_PullThroughCacheRuleAlreadyExistsExceptionRes(parsedOutput, context);
509
+ case "SecretNotFoundException":
510
+ case "com.amazonaws.ecr#SecretNotFoundException":
511
+ throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
491
512
  case "ServerException":
492
513
  case "com.amazonaws.ecr#ServerException":
493
514
  throw await de_ServerExceptionRes(parsedOutput, context);
515
+ case "UnableToAccessSecretException":
516
+ case "com.amazonaws.ecr#UnableToAccessSecretException":
517
+ throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
518
+ case "UnableToDecryptSecretValueException":
519
+ case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
520
+ throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
494
521
  case "UnsupportedUpstreamRegistryException":
495
522
  case "com.amazonaws.ecr#UnsupportedUpstreamRegistryException":
496
523
  throw await de_UnsupportedUpstreamRegistryExceptionRes(parsedOutput, context);
@@ -1086,6 +1113,9 @@ const de_GetDownloadUrlForLayerCommandError = async (output, context) => {
1086
1113
  case "ServerException":
1087
1114
  case "com.amazonaws.ecr#ServerException":
1088
1115
  throw await de_ServerExceptionRes(parsedOutput, context);
1116
+ case "UnableToGetUpstreamLayerException":
1117
+ case "com.amazonaws.ecr#UnableToGetUpstreamLayerException":
1118
+ throw await de_UnableToGetUpstreamLayerExceptionRes(parsedOutput, context);
1089
1119
  default:
1090
1120
  const parsedBody = parsedOutput.body;
1091
1121
  return throwDefaultError({
@@ -1936,6 +1966,56 @@ const de_UntagResourceCommandError = async (output, context) => {
1936
1966
  });
1937
1967
  }
1938
1968
  };
1969
+ export const de_UpdatePullThroughCacheRuleCommand = async (output, context) => {
1970
+ if (output.statusCode >= 300) {
1971
+ return de_UpdatePullThroughCacheRuleCommandError(output, context);
1972
+ }
1973
+ const data = await parseBody(output.body, context);
1974
+ let contents = {};
1975
+ contents = de_UpdatePullThroughCacheRuleResponse(data, context);
1976
+ const response = {
1977
+ $metadata: deserializeMetadata(output),
1978
+ ...contents,
1979
+ };
1980
+ return response;
1981
+ };
1982
+ const de_UpdatePullThroughCacheRuleCommandError = async (output, context) => {
1983
+ const parsedOutput = {
1984
+ ...output,
1985
+ body: await parseErrorBody(output.body, context),
1986
+ };
1987
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1988
+ switch (errorCode) {
1989
+ case "InvalidParameterException":
1990
+ case "com.amazonaws.ecr#InvalidParameterException":
1991
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1992
+ case "PullThroughCacheRuleNotFoundException":
1993
+ case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
1994
+ throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
1995
+ case "SecretNotFoundException":
1996
+ case "com.amazonaws.ecr#SecretNotFoundException":
1997
+ throw await de_SecretNotFoundExceptionRes(parsedOutput, context);
1998
+ case "ServerException":
1999
+ case "com.amazonaws.ecr#ServerException":
2000
+ throw await de_ServerExceptionRes(parsedOutput, context);
2001
+ case "UnableToAccessSecretException":
2002
+ case "com.amazonaws.ecr#UnableToAccessSecretException":
2003
+ throw await de_UnableToAccessSecretExceptionRes(parsedOutput, context);
2004
+ case "UnableToDecryptSecretValueException":
2005
+ case "com.amazonaws.ecr#UnableToDecryptSecretValueException":
2006
+ throw await de_UnableToDecryptSecretValueExceptionRes(parsedOutput, context);
2007
+ case "ValidationException":
2008
+ case "com.amazonaws.ecr#ValidationException":
2009
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2010
+ default:
2011
+ const parsedBody = parsedOutput.body;
2012
+ return throwDefaultError({
2013
+ output,
2014
+ parsedBody,
2015
+ errorCode,
2016
+ });
2017
+ }
2018
+ };
1939
2019
  export const de_UploadLayerPartCommand = async (output, context) => {
1940
2020
  if (output.statusCode >= 300) {
1941
2021
  return de_UploadLayerPartCommandError(output, context);
@@ -1986,6 +2066,47 @@ const de_UploadLayerPartCommandError = async (output, context) => {
1986
2066
  });
1987
2067
  }
1988
2068
  };
2069
+ export const de_ValidatePullThroughCacheRuleCommand = async (output, context) => {
2070
+ if (output.statusCode >= 300) {
2071
+ return de_ValidatePullThroughCacheRuleCommandError(output, context);
2072
+ }
2073
+ const data = await parseBody(output.body, context);
2074
+ let contents = {};
2075
+ contents = _json(data);
2076
+ const response = {
2077
+ $metadata: deserializeMetadata(output),
2078
+ ...contents,
2079
+ };
2080
+ return response;
2081
+ };
2082
+ const de_ValidatePullThroughCacheRuleCommandError = async (output, context) => {
2083
+ const parsedOutput = {
2084
+ ...output,
2085
+ body: await parseErrorBody(output.body, context),
2086
+ };
2087
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2088
+ switch (errorCode) {
2089
+ case "InvalidParameterException":
2090
+ case "com.amazonaws.ecr#InvalidParameterException":
2091
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2092
+ case "PullThroughCacheRuleNotFoundException":
2093
+ case "com.amazonaws.ecr#PullThroughCacheRuleNotFoundException":
2094
+ throw await de_PullThroughCacheRuleNotFoundExceptionRes(parsedOutput, context);
2095
+ case "ServerException":
2096
+ case "com.amazonaws.ecr#ServerException":
2097
+ throw await de_ServerExceptionRes(parsedOutput, context);
2098
+ case "ValidationException":
2099
+ case "com.amazonaws.ecr#ValidationException":
2100
+ throw await de_ValidationExceptionRes(parsedOutput, context);
2101
+ default:
2102
+ const parsedBody = parsedOutput.body;
2103
+ return throwDefaultError({
2104
+ output,
2105
+ parsedBody,
2106
+ errorCode,
2107
+ });
2108
+ }
2109
+ };
1989
2110
  const de_EmptyUploadExceptionRes = async (parsedOutput, context) => {
1990
2111
  const body = parsedOutput.body;
1991
2112
  const deserialized = _json(body);
@@ -2229,6 +2350,15 @@ const de_ScanNotFoundExceptionRes = async (parsedOutput, context) => {
2229
2350
  });
2230
2351
  return __decorateServiceException(exception, body);
2231
2352
  };
2353
+ const de_SecretNotFoundExceptionRes = async (parsedOutput, context) => {
2354
+ const body = parsedOutput.body;
2355
+ const deserialized = _json(body);
2356
+ const exception = new SecretNotFoundException({
2357
+ $metadata: deserializeMetadata(parsedOutput),
2358
+ ...deserialized,
2359
+ });
2360
+ return __decorateServiceException(exception, body);
2361
+ };
2232
2362
  const de_ServerExceptionRes = async (parsedOutput, context) => {
2233
2363
  const body = parsedOutput.body;
2234
2364
  const deserialized = _json(body);
@@ -2247,6 +2377,42 @@ const de_TooManyTagsExceptionRes = async (parsedOutput, context) => {
2247
2377
  });
2248
2378
  return __decorateServiceException(exception, body);
2249
2379
  };
2380
+ const de_UnableToAccessSecretExceptionRes = async (parsedOutput, context) => {
2381
+ const body = parsedOutput.body;
2382
+ const deserialized = _json(body);
2383
+ const exception = new UnableToAccessSecretException({
2384
+ $metadata: deserializeMetadata(parsedOutput),
2385
+ ...deserialized,
2386
+ });
2387
+ return __decorateServiceException(exception, body);
2388
+ };
2389
+ const de_UnableToDecryptSecretValueExceptionRes = async (parsedOutput, context) => {
2390
+ const body = parsedOutput.body;
2391
+ const deserialized = _json(body);
2392
+ const exception = new UnableToDecryptSecretValueException({
2393
+ $metadata: deserializeMetadata(parsedOutput),
2394
+ ...deserialized,
2395
+ });
2396
+ return __decorateServiceException(exception, body);
2397
+ };
2398
+ const de_UnableToGetUpstreamImageExceptionRes = async (parsedOutput, context) => {
2399
+ const body = parsedOutput.body;
2400
+ const deserialized = _json(body);
2401
+ const exception = new UnableToGetUpstreamImageException({
2402
+ $metadata: deserializeMetadata(parsedOutput),
2403
+ ...deserialized,
2404
+ });
2405
+ return __decorateServiceException(exception, body);
2406
+ };
2407
+ const de_UnableToGetUpstreamLayerExceptionRes = async (parsedOutput, context) => {
2408
+ const body = parsedOutput.body;
2409
+ const deserialized = _json(body);
2410
+ const exception = new UnableToGetUpstreamLayerException({
2411
+ $metadata: deserializeMetadata(parsedOutput),
2412
+ ...deserialized,
2413
+ });
2414
+ return __decorateServiceException(exception, body);
2415
+ };
2250
2416
  const de_UnsupportedImageTypeExceptionRes = async (parsedOutput, context) => {
2251
2417
  const body = parsedOutput.body;
2252
2418
  const deserialized = _json(body);
@@ -2323,8 +2489,10 @@ const de_AwsEcrContainerImageDetails = (output, context) => {
2323
2489
  const de_CreatePullThroughCacheRuleResponse = (output, context) => {
2324
2490
  return take(output, {
2325
2491
  createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2492
+ credentialArn: __expectString,
2326
2493
  ecrRepositoryPrefix: __expectString,
2327
2494
  registryId: __expectString,
2495
+ upstreamRegistry: __expectString,
2328
2496
  upstreamRegistryUrl: __expectString,
2329
2497
  });
2330
2498
  };
@@ -2369,6 +2537,7 @@ const de_DeleteLifecyclePolicyResponse = (output, context) => {
2369
2537
  const de_DeletePullThroughCacheRuleResponse = (output, context) => {
2370
2538
  return take(output, {
2371
2539
  createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2540
+ credentialArn: __expectString,
2372
2541
  ecrRepositoryPrefix: __expectString,
2373
2542
  registryId: __expectString,
2374
2543
  upstreamRegistryUrl: __expectString,
@@ -2531,8 +2700,11 @@ const de_PackageVulnerabilityDetails = (output, context) => {
2531
2700
  const de_PullThroughCacheRule = (output, context) => {
2532
2701
  return take(output, {
2533
2702
  createdAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2703
+ credentialArn: __expectString,
2534
2704
  ecrRepositoryPrefix: __expectString,
2535
2705
  registryId: __expectString,
2706
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2707
+ upstreamRegistry: __expectString,
2536
2708
  upstreamRegistryUrl: __expectString,
2537
2709
  });
2538
2710
  };
@@ -2590,6 +2762,14 @@ const de_ScoreDetails = (output, context) => {
2590
2762
  cvss: (_) => de_CvssScoreDetails(_, context),
2591
2763
  });
2592
2764
  };
2765
+ const de_UpdatePullThroughCacheRuleResponse = (output, context) => {
2766
+ return take(output, {
2767
+ credentialArn: __expectString,
2768
+ ecrRepositoryPrefix: __expectString,
2769
+ registryId: __expectString,
2770
+ updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
2771
+ });
2772
+ };
2593
2773
  const deserializeMetadata = (output) => ({
2594
2774
  httpStatusCode: output.statusCode,
2595
2775
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -39,7 +39,9 @@ import { StartImageScanCommandInput, StartImageScanCommandOutput } from "./comma
39
39
  import { StartLifecyclePolicyPreviewCommandInput, StartLifecyclePolicyPreviewCommandOutput } from "./commands/StartLifecyclePolicyPreviewCommand";
40
40
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
41
41
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
42
+ import { UpdatePullThroughCacheRuleCommandInput, UpdatePullThroughCacheRuleCommandOutput } from "./commands/UpdatePullThroughCacheRuleCommand";
42
43
  import { UploadLayerPartCommandInput, UploadLayerPartCommandOutput } from "./commands/UploadLayerPartCommand";
44
+ import { ValidatePullThroughCacheRuleCommandInput, ValidatePullThroughCacheRuleCommandOutput } from "./commands/ValidatePullThroughCacheRuleCommand";
43
45
  import { ECRClient } from "./ECRClient";
44
46
  export interface ECR {
45
47
  /**
@@ -282,12 +284,24 @@ export interface ECR {
282
284
  untagResource(args: UntagResourceCommandInput, options?: __HttpHandlerOptions): Promise<UntagResourceCommandOutput>;
283
285
  untagResource(args: UntagResourceCommandInput, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
284
286
  untagResource(args: UntagResourceCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UntagResourceCommandOutput) => void): void;
287
+ /**
288
+ * @see {@link UpdatePullThroughCacheRuleCommand}
289
+ */
290
+ updatePullThroughCacheRule(args: UpdatePullThroughCacheRuleCommandInput, options?: __HttpHandlerOptions): Promise<UpdatePullThroughCacheRuleCommandOutput>;
291
+ updatePullThroughCacheRule(args: UpdatePullThroughCacheRuleCommandInput, cb: (err: any, data?: UpdatePullThroughCacheRuleCommandOutput) => void): void;
292
+ updatePullThroughCacheRule(args: UpdatePullThroughCacheRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UpdatePullThroughCacheRuleCommandOutput) => void): void;
285
293
  /**
286
294
  * @see {@link UploadLayerPartCommand}
287
295
  */
288
296
  uploadLayerPart(args: UploadLayerPartCommandInput, options?: __HttpHandlerOptions): Promise<UploadLayerPartCommandOutput>;
289
297
  uploadLayerPart(args: UploadLayerPartCommandInput, cb: (err: any, data?: UploadLayerPartCommandOutput) => void): void;
290
298
  uploadLayerPart(args: UploadLayerPartCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: UploadLayerPartCommandOutput) => void): void;
299
+ /**
300
+ * @see {@link ValidatePullThroughCacheRuleCommand}
301
+ */
302
+ validatePullThroughCacheRule(args: ValidatePullThroughCacheRuleCommandInput, options?: __HttpHandlerOptions): Promise<ValidatePullThroughCacheRuleCommandOutput>;
303
+ validatePullThroughCacheRule(args: ValidatePullThroughCacheRuleCommandInput, cb: (err: any, data?: ValidatePullThroughCacheRuleCommandOutput) => void): void;
304
+ validatePullThroughCacheRule(args: ValidatePullThroughCacheRuleCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ValidatePullThroughCacheRuleCommandOutput) => void): void;
291
305
  }
292
306
  /**
293
307
  * @public
@@ -48,18 +48,20 @@ import { StartImageScanCommandInput, StartImageScanCommandOutput } from "./comma
48
48
  import { StartLifecyclePolicyPreviewCommandInput, StartLifecyclePolicyPreviewCommandOutput } from "./commands/StartLifecyclePolicyPreviewCommand";
49
49
  import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand";
50
50
  import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand";
51
+ import { UpdatePullThroughCacheRuleCommandInput, UpdatePullThroughCacheRuleCommandOutput } from "./commands/UpdatePullThroughCacheRuleCommand";
51
52
  import { UploadLayerPartCommandInput, UploadLayerPartCommandOutput } from "./commands/UploadLayerPartCommand";
53
+ import { ValidatePullThroughCacheRuleCommandInput, ValidatePullThroughCacheRuleCommandOutput } from "./commands/ValidatePullThroughCacheRuleCommand";
52
54
  import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
53
55
  import { RuntimeExtension, RuntimeExtensionsConfig } from "./runtimeExtensions";
54
56
  export { __Client };
55
57
  /**
56
58
  * @public
57
59
  */
58
- export type ServiceInputTypes = BatchCheckLayerAvailabilityCommandInput | BatchDeleteImageCommandInput | BatchGetImageCommandInput | BatchGetRepositoryScanningConfigurationCommandInput | CompleteLayerUploadCommandInput | CreatePullThroughCacheRuleCommandInput | CreateRepositoryCommandInput | DeleteLifecyclePolicyCommandInput | DeletePullThroughCacheRuleCommandInput | DeleteRegistryPolicyCommandInput | DeleteRepositoryCommandInput | DeleteRepositoryPolicyCommandInput | DescribeImageReplicationStatusCommandInput | DescribeImageScanFindingsCommandInput | DescribeImagesCommandInput | DescribePullThroughCacheRulesCommandInput | DescribeRegistryCommandInput | DescribeRepositoriesCommandInput | GetAuthorizationTokenCommandInput | GetDownloadUrlForLayerCommandInput | GetLifecyclePolicyCommandInput | GetLifecyclePolicyPreviewCommandInput | GetRegistryPolicyCommandInput | GetRegistryScanningConfigurationCommandInput | GetRepositoryPolicyCommandInput | InitiateLayerUploadCommandInput | ListImagesCommandInput | ListTagsForResourceCommandInput | PutImageCommandInput | PutImageScanningConfigurationCommandInput | PutImageTagMutabilityCommandInput | PutLifecyclePolicyCommandInput | PutRegistryPolicyCommandInput | PutRegistryScanningConfigurationCommandInput | PutReplicationConfigurationCommandInput | SetRepositoryPolicyCommandInput | StartImageScanCommandInput | StartLifecyclePolicyPreviewCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UploadLayerPartCommandInput;
60
+ export type ServiceInputTypes = BatchCheckLayerAvailabilityCommandInput | BatchDeleteImageCommandInput | BatchGetImageCommandInput | BatchGetRepositoryScanningConfigurationCommandInput | CompleteLayerUploadCommandInput | CreatePullThroughCacheRuleCommandInput | CreateRepositoryCommandInput | DeleteLifecyclePolicyCommandInput | DeletePullThroughCacheRuleCommandInput | DeleteRegistryPolicyCommandInput | DeleteRepositoryCommandInput | DeleteRepositoryPolicyCommandInput | DescribeImageReplicationStatusCommandInput | DescribeImageScanFindingsCommandInput | DescribeImagesCommandInput | DescribePullThroughCacheRulesCommandInput | DescribeRegistryCommandInput | DescribeRepositoriesCommandInput | GetAuthorizationTokenCommandInput | GetDownloadUrlForLayerCommandInput | GetLifecyclePolicyCommandInput | GetLifecyclePolicyPreviewCommandInput | GetRegistryPolicyCommandInput | GetRegistryScanningConfigurationCommandInput | GetRepositoryPolicyCommandInput | InitiateLayerUploadCommandInput | ListImagesCommandInput | ListTagsForResourceCommandInput | PutImageCommandInput | PutImageScanningConfigurationCommandInput | PutImageTagMutabilityCommandInput | PutLifecyclePolicyCommandInput | PutRegistryPolicyCommandInput | PutRegistryScanningConfigurationCommandInput | PutReplicationConfigurationCommandInput | SetRepositoryPolicyCommandInput | StartImageScanCommandInput | StartLifecyclePolicyPreviewCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdatePullThroughCacheRuleCommandInput | UploadLayerPartCommandInput | ValidatePullThroughCacheRuleCommandInput;
59
61
  /**
60
62
  * @public
61
63
  */
62
- export type ServiceOutputTypes = BatchCheckLayerAvailabilityCommandOutput | BatchDeleteImageCommandOutput | BatchGetImageCommandOutput | BatchGetRepositoryScanningConfigurationCommandOutput | CompleteLayerUploadCommandOutput | CreatePullThroughCacheRuleCommandOutput | CreateRepositoryCommandOutput | DeleteLifecyclePolicyCommandOutput | DeletePullThroughCacheRuleCommandOutput | DeleteRegistryPolicyCommandOutput | DeleteRepositoryCommandOutput | DeleteRepositoryPolicyCommandOutput | DescribeImageReplicationStatusCommandOutput | DescribeImageScanFindingsCommandOutput | DescribeImagesCommandOutput | DescribePullThroughCacheRulesCommandOutput | DescribeRegistryCommandOutput | DescribeRepositoriesCommandOutput | GetAuthorizationTokenCommandOutput | GetDownloadUrlForLayerCommandOutput | GetLifecyclePolicyCommandOutput | GetLifecyclePolicyPreviewCommandOutput | GetRegistryPolicyCommandOutput | GetRegistryScanningConfigurationCommandOutput | GetRepositoryPolicyCommandOutput | InitiateLayerUploadCommandOutput | ListImagesCommandOutput | ListTagsForResourceCommandOutput | PutImageCommandOutput | PutImageScanningConfigurationCommandOutput | PutImageTagMutabilityCommandOutput | PutLifecyclePolicyCommandOutput | PutRegistryPolicyCommandOutput | PutRegistryScanningConfigurationCommandOutput | PutReplicationConfigurationCommandOutput | SetRepositoryPolicyCommandOutput | StartImageScanCommandOutput | StartLifecyclePolicyPreviewCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UploadLayerPartCommandOutput;
64
+ export type ServiceOutputTypes = BatchCheckLayerAvailabilityCommandOutput | BatchDeleteImageCommandOutput | BatchGetImageCommandOutput | BatchGetRepositoryScanningConfigurationCommandOutput | CompleteLayerUploadCommandOutput | CreatePullThroughCacheRuleCommandOutput | CreateRepositoryCommandOutput | DeleteLifecyclePolicyCommandOutput | DeletePullThroughCacheRuleCommandOutput | DeleteRegistryPolicyCommandOutput | DeleteRepositoryCommandOutput | DeleteRepositoryPolicyCommandOutput | DescribeImageReplicationStatusCommandOutput | DescribeImageScanFindingsCommandOutput | DescribeImagesCommandOutput | DescribePullThroughCacheRulesCommandOutput | DescribeRegistryCommandOutput | DescribeRepositoriesCommandOutput | GetAuthorizationTokenCommandOutput | GetDownloadUrlForLayerCommandOutput | GetLifecyclePolicyCommandOutput | GetLifecyclePolicyPreviewCommandOutput | GetRegistryPolicyCommandOutput | GetRegistryScanningConfigurationCommandOutput | GetRepositoryPolicyCommandOutput | InitiateLayerUploadCommandOutput | ListImagesCommandOutput | ListTagsForResourceCommandOutput | PutImageCommandOutput | PutImageScanningConfigurationCommandOutput | PutImageTagMutabilityCommandOutput | PutLifecyclePolicyCommandOutput | PutRegistryPolicyCommandOutput | PutRegistryScanningConfigurationCommandOutput | PutReplicationConfigurationCommandOutput | SetRepositoryPolicyCommandOutput | StartImageScanCommandOutput | StartLifecyclePolicyPreviewCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdatePullThroughCacheRuleCommandOutput | UploadLayerPartCommandOutput | ValidatePullThroughCacheRuleCommandOutput;
63
65
  /**
64
66
  * @public
65
67
  */
@@ -60,7 +60,7 @@ export interface BatchDeleteImageCommandOutput extends BatchDeleteImageResponse,
60
60
  * // imageDigest: "STRING_VALUE",
61
61
  * // imageTag: "STRING_VALUE",
62
62
  * // },
63
- * // failureCode: "InvalidImageDigest" || "InvalidImageTag" || "ImageTagDoesNotMatchDigest" || "ImageNotFound" || "MissingDigestAndTag" || "ImageReferencedByManifestList" || "KmsError",
63
+ * // failureCode: "InvalidImageDigest" || "InvalidImageTag" || "ImageTagDoesNotMatchDigest" || "ImageNotFound" || "MissingDigestAndTag" || "ImageReferencedByManifestList" || "KmsError" || "UpstreamAccessDenied" || "UpstreamTooManyRequests" || "UpstreamUnavailable",
64
64
  * // failureReason: "STRING_VALUE",
65
65
  * // },
66
66
  * // ],
@@ -67,7 +67,7 @@ export interface BatchGetImageCommandOutput extends BatchGetImageResponse, __Met
67
67
  * // imageDigest: "STRING_VALUE",
68
68
  * // imageTag: "STRING_VALUE",
69
69
  * // },
70
- * // failureCode: "InvalidImageDigest" || "InvalidImageTag" || "ImageTagDoesNotMatchDigest" || "ImageNotFound" || "MissingDigestAndTag" || "ImageReferencedByManifestList" || "KmsError",
70
+ * // failureCode: "InvalidImageDigest" || "InvalidImageTag" || "ImageTagDoesNotMatchDigest" || "ImageNotFound" || "MissingDigestAndTag" || "ImageReferencedByManifestList" || "KmsError" || "UpstreamAccessDenied" || "UpstreamTooManyRequests" || "UpstreamUnavailable",
71
71
  * // failureReason: "STRING_VALUE",
72
72
  * // },
73
73
  * // ],
@@ -85,6 +85,11 @@ export interface BatchGetImageCommandOutput extends BatchGetImageResponse, __Met
85
85
  * <p>The specified parameter is invalid. Review the available parameters for the API
86
86
  * request.</p>
87
87
  *
88
+ * @throws {@link LimitExceededException} (client fault)
89
+ * <p>The operation did not succeed because it would have exceeded a service limit for your
90
+ * account. For more information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/service-quotas.html">Amazon ECR service quotas</a> in
91
+ * the Amazon Elastic Container Registry User Guide.</p>
92
+ *
88
93
  * @throws {@link RepositoryNotFoundException} (client fault)
89
94
  * <p>The specified repository could not be found. Check the spelling of the specified
90
95
  * repository and ensure that you are performing operations on the correct registry.</p>
@@ -92,6 +97,11 @@ export interface BatchGetImageCommandOutput extends BatchGetImageResponse, __Met
92
97
  * @throws {@link ServerException} (server fault)
93
98
  * <p>These errors are usually caused by a server-side issue.</p>
94
99
  *
100
+ * @throws {@link UnableToGetUpstreamImageException} (client fault)
101
+ * <p>The image or images were unable to be pulled using the pull through cache rule. This
102
+ * is usually caused because of an issue with the Secrets Manager secret containing the credentials
103
+ * for the upstream registry.</p>
104
+ *
95
105
  * @throws {@link ECRServiceException}
96
106
  * <p>Base exception class for all service exceptions from ECR service.</p>
97
107
  *
@@ -24,7 +24,9 @@ export interface CreatePullThroughCacheRuleCommandOutput extends CreatePullThrou
24
24
  /**
25
25
  * @public
26
26
  * <p>Creates a pull through cache rule. A pull through cache rule provides a way to cache
27
- * images from an external public registry in your Amazon ECR private registry.</p>
27
+ * images from an upstream registry source in your Amazon ECR private registry. For more
28
+ * information, see <a href="https://docs.aws.amazon.com/AmazonECR/latest/userguide/pull-through-cache.html">Using pull through cache
29
+ * rules</a> in the <i>Amazon Elastic Container Registry User Guide</i>.</p>
28
30
  * @example
29
31
  * Use a bare-bones client and the command you need to make an API call.
30
32
  * ```javascript
@@ -35,6 +37,8 @@ export interface CreatePullThroughCacheRuleCommandOutput extends CreatePullThrou
35
37
  * ecrRepositoryPrefix: "STRING_VALUE", // required
36
38
  * upstreamRegistryUrl: "STRING_VALUE", // required
37
39
  * registryId: "STRING_VALUE",
40
+ * upstreamRegistry: "ecr-public" || "quay" || "k8s" || "docker-hub" || "github-container-registry" || "azure-container-registry",
41
+ * credentialArn: "STRING_VALUE",
38
42
  * };
39
43
  * const command = new CreatePullThroughCacheRuleCommand(input);
40
44
  * const response = await client.send(command);
@@ -43,6 +47,8 @@ export interface CreatePullThroughCacheRuleCommandOutput extends CreatePullThrou
43
47
  * // upstreamRegistryUrl: "STRING_VALUE",
44
48
  * // createdAt: new Date("TIMESTAMP"),
45
49
  * // registryId: "STRING_VALUE",
50
+ * // upstreamRegistry: "ecr-public" || "quay" || "k8s" || "docker-hub" || "github-container-registry" || "azure-container-registry",
51
+ * // credentialArn: "STRING_VALUE",
46
52
  * // };
47
53
  *
48
54
  * ```
@@ -66,9 +72,21 @@ export interface CreatePullThroughCacheRuleCommandOutput extends CreatePullThrou
66
72
  * <p>A pull through cache rule with these settings already exists for the private
67
73
  * registry.</p>
68
74
  *
75
+ * @throws {@link SecretNotFoundException} (client fault)
76
+ * <p>The ARN of the secret specified in the pull through cache rule was not found. Update
77
+ * the pull through cache rule with a valid secret ARN and try again.</p>
78
+ *
69
79
  * @throws {@link ServerException} (server fault)
70
80
  * <p>These errors are usually caused by a server-side issue.</p>
71
81
  *
82
+ * @throws {@link UnableToAccessSecretException} (client fault)
83
+ * <p>The secret is unable to be accessed. Verify the resource permissions for the secret
84
+ * and try again.</p>
85
+ *
86
+ * @throws {@link UnableToDecryptSecretValueException} (client fault)
87
+ * <p>The secret is accessible but is unable to be decrypted. Verify the resource
88
+ * permisisons and try again.</p>
89
+ *
72
90
  * @throws {@link UnsupportedUpstreamRegistryException} (client fault)
73
91
  * <p>The specified upstream registry isn't supported.</p>
74
92
  *
@@ -41,6 +41,7 @@ export interface DeletePullThroughCacheRuleCommandOutput extends DeletePullThrou
41
41
  * // upstreamRegistryUrl: "STRING_VALUE",
42
42
  * // createdAt: new Date("TIMESTAMP"),
43
43
  * // registryId: "STRING_VALUE",
44
+ * // credentialArn: "STRING_VALUE",
44
45
  * // };
45
46
  *
46
47
  * ```
@@ -23,9 +23,9 @@ export interface DeleteRepositoryCommandOutput extends DeleteRepositoryResponse,
23
23
  }
24
24
  /**
25
25
  * @public
26
- * <p>Deletes a repository. If the repository contains images, you must either delete all
27
- * images in the repository or use the <code>force</code> option to delete the
28
- * repository.</p>
26
+ * <p>Deletes a repository. If the repository isn't empty, you must either delete the
27
+ * contents of the repository or use the <code>force</code> option to delete the repository
28
+ * and have Amazon ECR delete all of its contents on your behalf.</p>
29
29
  * @example
30
30
  * Use a bare-bones client and the command you need to make an API call.
31
31
  * ```javascript
@@ -47,6 +47,9 @@ export interface DescribePullThroughCacheRulesCommandOutput extends DescribePull
47
47
  * // upstreamRegistryUrl: "STRING_VALUE",
48
48
  * // createdAt: new Date("TIMESTAMP"),
49
49
  * // registryId: "STRING_VALUE",
50
+ * // credentialArn: "STRING_VALUE",
51
+ * // upstreamRegistry: "ecr-public" || "quay" || "k8s" || "docker-hub" || "github-container-registry" || "azure-container-registry",
52
+ * // updatedAt: new Date("TIMESTAMP"),
50
53
  * // },
51
54
  * // ],
52
55
  * // nextToken: "STRING_VALUE",
@@ -76,6 +76,10 @@ export interface GetDownloadUrlForLayerCommandOutput extends GetDownloadUrlForLa
76
76
  * @throws {@link ServerException} (server fault)
77
77
  * <p>These errors are usually caused by a server-side issue.</p>
78
78
  *
79
+ * @throws {@link UnableToGetUpstreamLayerException} (client fault)
80
+ * <p>There was an issue getting the upstream layer matching the pull through cache
81
+ * rule.</p>
82
+ *
79
83
  * @throws {@link ECRServiceException}
80
84
  * <p>Base exception class for all service exceptions from ECR service.</p>
81
85
  *