"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ElasticBeanstalkDeployAction=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codepipeline=()=>{var tmp=require("../../../aws-codepipeline");return codepipeline=()=>tmp,tmp},core_1=()=>{var tmp=require("../../../core");return core_1=()=>tmp,tmp},detached_construct_1=()=>{var tmp=require("../../../core/lib/private/detached-construct");return detached_construct_1=()=>tmp,tmp},action_1=()=>{var tmp=require("../action");return action_1=()=>tmp,tmp},common_1=()=>{var tmp=require("../common");return common_1=()=>tmp,tmp};class ElasticBeanstalkDeployAction extends action_1().Action{static[JSII_RTTI_SYMBOL_1]={fqn:"aws-cdk-lib.aws_codepipeline_actions.ElasticBeanstalkDeployAction",version:"2.256.1"};applicationName;environmentName;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}const policyArn=`arn:${core_1().Aws.PARTITION}:iam::aws:policy/AdministratorAccess-AWSElasticBeanstalk`;return options.role.addManagedPolicy(new class extends detached_construct_1().DetachedConstruct{managedPolicyArn=policyArn;managedPolicyRef={policyArn};constructor(){super("This object can not be used in this API")}}),options.bucket.grantRead(options.role),{configuration:{ApplicationName:this.applicationName,EnvironmentName:this.environmentName}}}}exports.ElasticBeanstalkDeployAction=ElasticBeanstalkDeployAction;
