@aws-sdk/client-ecr 3.451.0 → 3.454.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 +16 -0
  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 +2 -2
@@ -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
  *
@@ -0,0 +1,104 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient";
5
+ import { UpdatePullThroughCacheRuleRequest, UpdatePullThroughCacheRuleResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link UpdatePullThroughCacheRuleCommand}.
14
+ */
15
+ export interface UpdatePullThroughCacheRuleCommandInput extends UpdatePullThroughCacheRuleRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link UpdatePullThroughCacheRuleCommand}.
21
+ */
22
+ export interface UpdatePullThroughCacheRuleCommandOutput extends UpdatePullThroughCacheRuleResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Updates an existing pull through cache rule.</p>
27
+ * @example
28
+ * Use a bare-bones client and the command you need to make an API call.
29
+ * ```javascript
30
+ * import { ECRClient, UpdatePullThroughCacheRuleCommand } from "@aws-sdk/client-ecr"; // ES Modules import
31
+ * // const { ECRClient, UpdatePullThroughCacheRuleCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
32
+ * const client = new ECRClient(config);
33
+ * const input = { // UpdatePullThroughCacheRuleRequest
34
+ * registryId: "STRING_VALUE",
35
+ * ecrRepositoryPrefix: "STRING_VALUE", // required
36
+ * credentialArn: "STRING_VALUE", // required
37
+ * };
38
+ * const command = new UpdatePullThroughCacheRuleCommand(input);
39
+ * const response = await client.send(command);
40
+ * // { // UpdatePullThroughCacheRuleResponse
41
+ * // ecrRepositoryPrefix: "STRING_VALUE",
42
+ * // registryId: "STRING_VALUE",
43
+ * // updatedAt: new Date("TIMESTAMP"),
44
+ * // credentialArn: "STRING_VALUE",
45
+ * // };
46
+ *
47
+ * ```
48
+ *
49
+ * @param UpdatePullThroughCacheRuleCommandInput - {@link UpdatePullThroughCacheRuleCommandInput}
50
+ * @returns {@link UpdatePullThroughCacheRuleCommandOutput}
51
+ * @see {@link UpdatePullThroughCacheRuleCommandInput} for command's `input` shape.
52
+ * @see {@link UpdatePullThroughCacheRuleCommandOutput} for command's `response` shape.
53
+ * @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape.
54
+ *
55
+ * @throws {@link InvalidParameterException} (client fault)
56
+ * <p>The specified parameter is invalid. Review the available parameters for the API
57
+ * request.</p>
58
+ *
59
+ * @throws {@link PullThroughCacheRuleNotFoundException} (client fault)
60
+ * <p>The pull through cache rule was not found. Specify a valid pull through cache rule and
61
+ * try again.</p>
62
+ *
63
+ * @throws {@link SecretNotFoundException} (client fault)
64
+ * <p>The ARN of the secret specified in the pull through cache rule was not found. Update
65
+ * the pull through cache rule with a valid secret ARN and try again.</p>
66
+ *
67
+ * @throws {@link ServerException} (server fault)
68
+ * <p>These errors are usually caused by a server-side issue.</p>
69
+ *
70
+ * @throws {@link UnableToAccessSecretException} (client fault)
71
+ * <p>The secret is unable to be accessed. Verify the resource permissions for the secret
72
+ * and try again.</p>
73
+ *
74
+ * @throws {@link UnableToDecryptSecretValueException} (client fault)
75
+ * <p>The secret is accessible but is unable to be decrypted. Verify the resource
76
+ * permisisons and try again.</p>
77
+ *
78
+ * @throws {@link ValidationException} (client fault)
79
+ * <p>There was an exception validating this request.</p>
80
+ *
81
+ * @throws {@link ECRServiceException}
82
+ * <p>Base exception class for all service exceptions from ECR service.</p>
83
+ *
84
+ */
85
+ export declare class UpdatePullThroughCacheRuleCommand extends $Command<UpdatePullThroughCacheRuleCommandInput, UpdatePullThroughCacheRuleCommandOutput, ECRClientResolvedConfig> {
86
+ readonly input: UpdatePullThroughCacheRuleCommandInput;
87
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
88
+ /**
89
+ * @public
90
+ */
91
+ constructor(input: UpdatePullThroughCacheRuleCommandInput);
92
+ /**
93
+ * @internal
94
+ */
95
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ECRClientResolvedConfig, options?: __HttpHandlerOptions): Handler<UpdatePullThroughCacheRuleCommandInput, UpdatePullThroughCacheRuleCommandOutput>;
96
+ /**
97
+ * @internal
98
+ */
99
+ private serialize;
100
+ /**
101
+ * @internal
102
+ */
103
+ private deserialize;
104
+ }
@@ -0,0 +1,96 @@
1
+ import { EndpointParameterInstructions } from "@smithy/middleware-endpoint";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@smithy/types";
4
+ import { ECRClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ECRClient";
5
+ import { ValidatePullThroughCacheRuleRequest, ValidatePullThroughCacheRuleResponse } from "../models/models_0";
6
+ /**
7
+ * @public
8
+ */
9
+ export { __MetadataBearer, $Command };
10
+ /**
11
+ * @public
12
+ *
13
+ * The input for {@link ValidatePullThroughCacheRuleCommand}.
14
+ */
15
+ export interface ValidatePullThroughCacheRuleCommandInput extends ValidatePullThroughCacheRuleRequest {
16
+ }
17
+ /**
18
+ * @public
19
+ *
20
+ * The output of {@link ValidatePullThroughCacheRuleCommand}.
21
+ */
22
+ export interface ValidatePullThroughCacheRuleCommandOutput extends ValidatePullThroughCacheRuleResponse, __MetadataBearer {
23
+ }
24
+ /**
25
+ * @public
26
+ * <p>Validates an existing pull through cache rule for an upstream registry that requires
27
+ * authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the
28
+ * syntax, and then validate that authentication to the upstream registry is
29
+ * successful.</p>
30
+ * @example
31
+ * Use a bare-bones client and the command you need to make an API call.
32
+ * ```javascript
33
+ * import { ECRClient, ValidatePullThroughCacheRuleCommand } from "@aws-sdk/client-ecr"; // ES Modules import
34
+ * // const { ECRClient, ValidatePullThroughCacheRuleCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
35
+ * const client = new ECRClient(config);
36
+ * const input = { // ValidatePullThroughCacheRuleRequest
37
+ * ecrRepositoryPrefix: "STRING_VALUE", // required
38
+ * registryId: "STRING_VALUE",
39
+ * };
40
+ * const command = new ValidatePullThroughCacheRuleCommand(input);
41
+ * const response = await client.send(command);
42
+ * // { // ValidatePullThroughCacheRuleResponse
43
+ * // ecrRepositoryPrefix: "STRING_VALUE",
44
+ * // registryId: "STRING_VALUE",
45
+ * // upstreamRegistryUrl: "STRING_VALUE",
46
+ * // credentialArn: "STRING_VALUE",
47
+ * // isValid: true || false,
48
+ * // failure: "STRING_VALUE",
49
+ * // };
50
+ *
51
+ * ```
52
+ *
53
+ * @param ValidatePullThroughCacheRuleCommandInput - {@link ValidatePullThroughCacheRuleCommandInput}
54
+ * @returns {@link ValidatePullThroughCacheRuleCommandOutput}
55
+ * @see {@link ValidatePullThroughCacheRuleCommandInput} for command's `input` shape.
56
+ * @see {@link ValidatePullThroughCacheRuleCommandOutput} for command's `response` shape.
57
+ * @see {@link ECRClientResolvedConfig | config} for ECRClient's `config` shape.
58
+ *
59
+ * @throws {@link InvalidParameterException} (client fault)
60
+ * <p>The specified parameter is invalid. Review the available parameters for the API
61
+ * request.</p>
62
+ *
63
+ * @throws {@link PullThroughCacheRuleNotFoundException} (client fault)
64
+ * <p>The pull through cache rule was not found. Specify a valid pull through cache rule and
65
+ * try again.</p>
66
+ *
67
+ * @throws {@link ServerException} (server fault)
68
+ * <p>These errors are usually caused by a server-side issue.</p>
69
+ *
70
+ * @throws {@link ValidationException} (client fault)
71
+ * <p>There was an exception validating this request.</p>
72
+ *
73
+ * @throws {@link ECRServiceException}
74
+ * <p>Base exception class for all service exceptions from ECR service.</p>
75
+ *
76
+ */
77
+ export declare class ValidatePullThroughCacheRuleCommand extends $Command<ValidatePullThroughCacheRuleCommandInput, ValidatePullThroughCacheRuleCommandOutput, ECRClientResolvedConfig> {
78
+ readonly input: ValidatePullThroughCacheRuleCommandInput;
79
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
80
+ /**
81
+ * @public
82
+ */
83
+ constructor(input: ValidatePullThroughCacheRuleCommandInput);
84
+ /**
85
+ * @internal
86
+ */
87
+ resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ECRClientResolvedConfig, options?: __HttpHandlerOptions): Handler<ValidatePullThroughCacheRuleCommandInput, ValidatePullThroughCacheRuleCommandOutput>;
88
+ /**
89
+ * @internal
90
+ */
91
+ private serialize;
92
+ /**
93
+ * @internal
94
+ */
95
+ private deserialize;
96
+ }
@@ -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";