1 | ;
|
2 | var _a;
|
3 | Object.defineProperty(exports, "__esModule", { value: true });
|
4 | exports.EcrImage = void 0;
|
5 | const jsiiDeprecationWarnings = require("../../.warnings.jsii.js");
|
6 | const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
|
7 | const container_image_1 = require("../container-image");
|
8 | /**
|
9 | * An image from an Amazon ECR repository.
|
10 | */
|
11 | class EcrImage extends container_image_1.ContainerImage {
|
12 | /**
|
13 | * Constructs a new instance of the EcrImage class.
|
14 | */
|
15 | constructor(repository, tagOrDigest) {
|
16 | super();
|
17 | this.repository = repository;
|
18 | this.tagOrDigest = tagOrDigest;
|
19 | this.imageName = this.repository.repositoryUriForTagOrDigest(this.tagOrDigest);
|
20 | }
|
21 | bind(_scope, containerDefinition) {
|
22 | try {
|
23 | jsiiDeprecationWarnings._aws_cdk_aws_ecs_ContainerDefinition(containerDefinition);
|
24 | }
|
25 | catch (error) {
|
26 | if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
|
27 | Error.captureStackTrace(error, this.bind);
|
28 | }
|
29 | throw error;
|
30 | }
|
31 | this.repository.grantPull(containerDefinition.taskDefinition.obtainExecutionRole());
|
32 | return {
|
33 | imageName: this.imageName,
|
34 | };
|
35 | }
|
36 | }
|
37 | exports.EcrImage = EcrImage;
|
38 | _a = JSII_RTTI_SYMBOL_1;
|
39 | EcrImage[_a] = { fqn: "@aws-cdk/aws-ecs.EcrImage", version: "1.204.0" };
|
40 | //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZWNyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZWNyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUVBLHdEQUEwRTtBQU0xRTs7R0FFRztBQUNILE1BQWEsUUFBUyxTQUFRLGdDQUFjO0lBVTFDOztPQUVHO0lBQ0gsWUFBNkIsVUFBMkIsRUFBbUIsV0FBbUI7UUFD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