"use strict";var _a,_b;Object.defineProperty(exports,"__esModule",{value:!0}),exports.PublicGalleryAuthorizationToken=exports.AuthorizationToken=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var iam=()=>{var tmp=require("../../aws-iam");return iam=()=>tmp,tmp};class AuthorizationToken{static grantRead(grantee){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}grantee.grantPrincipal.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["ecr:GetAuthorizationToken"],resources:["*"]}))}constructor(){}}exports.AuthorizationToken=AuthorizationToken,_a=JSII_RTTI_SYMBOL_1,AuthorizationToken[_a]={fqn:"aws-cdk-lib.aws_ecr.AuthorizationToken",version:"2.159.0"};class PublicGalleryAuthorizationToken{static grantRead(grantee){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_iam_IGrantable(grantee)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.grantRead),error}grantee.grantPrincipal.addToPrincipalPolicy(new(iam()).PolicyStatement({actions:["ecr-public:GetAuthorizationToken","sts:GetServiceBearerToken"],resources:["*"]}))}constructor(){}}exports.PublicGalleryAuthorizationToken=PublicGalleryAuthorizationToken,_b=JSII_RTTI_SYMBOL_1,PublicGalleryAuthorizationToken[_b]={fqn:"aws-cdk-lib.aws_ecr.PublicGalleryAuthorizationToken",version:"2.159.0"};
