"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.ElasticBeanstalkDeployAction=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),codepipeline=require("../../../aws-codepipeline"),core_1=require("../../../core"),action_1=require("../action"),common_1=require("../common");class ElasticBeanstalkDeployAction extends action_1.Action{constructor(props){super({...props,category:codepipeline.ActionCategory.DEPLOY,provider:"ElasticBeanstalk",artifactBounds:(0,common_1.deployArtifactBounds)(),inputs:[props.input]});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_codepipeline_actions_ElasticBeanstalkDeployActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,ElasticBeanstalkDeployAction),error}this.applicationName=props.applicationName,this.environmentName=props.environmentName}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}return options.role.addManagedPolicy({managedPolicyArn:`arn:${core_1.Aws.PARTITION}:iam::aws:policy/AdministratorAccess-AWSElasticBeanstalk`}),options.bucket.grantRead(options.role),{configuration:{ApplicationName:this.applicationName,EnvironmentName:this.environmentName}}}}exports.ElasticBeanstalkDeployAction=ElasticBeanstalkDeployAction,_a=JSII_RTTI_SYMBOL_1,ElasticBeanstalkDeployAction[_a]={fqn:"aws-cdk-lib.aws_codepipeline_actions.ElasticBeanstalkDeployAction",version:"2.96.1"};
