"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.InspectorEcrImageScanAction=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var scan_action_base_1=()=>{var tmp=require("./scan-action-base");return scan_action_base_1=()=>tmp,tmp},ecr=()=>{var tmp=require("../../../aws-ecr");return ecr=()=>tmp,tmp},iam=()=>{var tmp=require("../../../aws-iam");return iam=()=>tmp,tmp};class InspectorEcrImageScanAction extends scan_action_base_1().InspectorScanActionBase{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.InspectorEcrImageScanAction",version:"2.256.1"};ecrProps;constructor(props){super(props);try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_actions_InspectorEcrImageScanActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,InspectorEcrImageScanAction),error}this.ecrProps=props}renderActionConfiguration(){return{InspectorRunMode:"ECRImageScan",ECRRepositoryName:this.ecrProps.repository.repositoryRef.repositoryName,ImageTag:this.ecrProps.imageTag}}bound(scope,stage,options){try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_IStage(stage),jsiiDeprecationWarnings().aws_cdk_lib_aws_codepipeline_ActionBindOptions(options)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.bound),error}const config=super.bound(scope,stage,options);return options.role.addToPrincipalPolicy(new(iam()).PolicyStatement({resources:[this.ecrProps.repository.repositoryRef.repositoryArn],actions:["ecr:GetDownloadUrlForLayer","ecr:BatchGetImage","ecr:BatchCheckLayerAvailability"]})),ecr().AuthorizationToken.grantRead(options.role),config}}exports.InspectorEcrImageScanAction=InspectorEcrImageScanAction;
