"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.CloudFormationDeployStackInstancesAction=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),codepipeline=require("../../../aws-codepipeline"),action_1=require("../action"),common_1=require("../common"),singleton_policy_1=require("./private/singleton-policy");class CloudFormationDeployStackInstancesAction extends action_1.Action{constructor(props){var _b,_c,_d,_e;super({...props,region:props.stackSetRegion,provider:"CloudFormationStackInstances",category:codepipeline.ActionCategory.DEPLOY,artifactBounds:{minInputs:0,maxInputs:3,minOutputs:0,maxOutputs:0},inputs:[...(_c=(_b=props.parameterOverrides)===null||_b===void 0?void 0:_b._artifactsReferenced)!==null&&_c!==void 0?_c:[],...(_e=(_d=props.stackInstances)===null||_d===void 0?void 0:_d._artifactsReferenced)!==null&&_e!==void 0?_e:[]]});try{jsiiDeprecationWarnings.aws_cdk_lib_aws_codepipeline_actions_CloudFormationDeployStackInstancesActionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.constructor),error}this.props=props,common_1.validatePercentage("failureTolerancePercentage",props.failureTolerancePercentage),common_1.validatePercentage("maxAccountConcurrencyPercentage",props.maxAccountConcurrencyPercentage)}bound(scope,_stage,options){var _b,_c;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 singletonPolicy=singleton_policy_1.SingletonPolicy.forRole(options.role);singletonPolicy.grantCreateUpdateStackSet(this.props);const instancesResult=(_b=this.props.stackInstances)===null||_b===void 0?void 0:_b._bind(scope);return(this.actionProperties.inputs||[]).length>0&&options.bucket.grantRead(singletonPolicy),{configuration:{StackSetName:this.props.stackSetName,ParameterOverrides:(_c=this.props.parameterOverrides)===null||_c===void 0?void 0:_c._render(),FailureTolerancePercentage:this.props.failureTolerancePercentage,MaxConcurrentPercentage:this.props.maxAccountConcurrencyPercentage,...instancesResult==null?void 0:instancesResult.stackSetConfiguration}}}}exports.CloudFormationDeployStackInstancesAction=CloudFormationDeployStackInstancesAction,_a=JSII_RTTI_SYMBOL_1,CloudFormationDeployStackInstancesAction[_a]={fqn:"aws-cdk-lib.aws_codepipeline_actions.CloudFormationDeployStackInstancesAction",version:"2.21.0"};
//# sourceMappingURL=stackinstances-action.js.map
