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