"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseDeploymentConfig=exports.ComputePlatform=void 0;var jsiiDeprecationWarnings=()=>{var tmp=require("../../.warnings.jsii.js");return jsiiDeprecationWarnings=()=>tmp,tmp};const JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti");var codedeploy_generated_1=()=>{var tmp=require("./codedeploy.generated");return codedeploy_generated_1=()=>tmp,tmp},utils_1=()=>{var tmp=require("./private/utils");return utils_1=()=>tmp,tmp},core_1=()=>{var tmp=require("../../core");return core_1=()=>tmp,tmp},ComputePlatform;(function(ComputePlatform2){ComputePlatform2.SERVER="Server",ComputePlatform2.LAMBDA="Lambda",ComputePlatform2.ECS="ECS"})(ComputePlatform||(exports.ComputePlatform=ComputePlatform={}));class BaseDeploymentConfig extends core_1().Resource{static fromDeploymentConfigName(scope,id,deploymentConfigName){const arn=core_1().Stack.of(scope).formatArn({service:"codedeploy",resource:"deploymentconfig",resourceName:deploymentConfigName,arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME});return{deploymentConfigName,deploymentConfigArn:arn}}constructor(scope,id,props){super(scope,id,{physicalName:props?.deploymentConfigName});try{jsiiDeprecationWarnings().aws_cdk_lib_aws_codedeploy_BaseDeploymentConfigProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,BaseDeploymentConfig),error}if(props?.trafficRouting&&(props?.computePlatform===void 0||props?.computePlatform===ComputePlatform.SERVER))throw new Error("Traffic routing config must not be specified for a Server-base deployment configuration");if(props?.minimumHealthyHosts&&props?.computePlatform&&props?.computePlatform!==ComputePlatform.SERVER)throw new Error("Minimum healthy hosts config must only be specified for a Server-base deployment configuration");const resource=new(codedeploy_generated_1()).CfnDeploymentConfig(this,"Resource",{deploymentConfigName:this.physicalName,computePlatform:props?.computePlatform,trafficRoutingConfig:props?.trafficRouting?.bind(this),minimumHealthyHosts:props?.minimumHealthyHosts?._json});this.deploymentConfigName=this.getResourceNameAttribute(resource.ref),this.deploymentConfigArn=this.getResourceArnAttribute((0,utils_1().arnForDeploymentConfig)(resource.ref),{service:"codedeploy",resource:"deploymentconfig",resourceName:this.physicalName,arnFormat:core_1().ArnFormat.COLON_RESOURCE_NAME}),this.node.addValidation({validate:()=>(0,utils_1().validateName)("Deployment config",this.physicalName)})}}exports.BaseDeploymentConfig=BaseDeploymentConfig,_a=JSII_RTTI_SYMBOL_1,BaseDeploymentConfig[_a]={fqn:"aws-cdk-lib.aws_codedeploy.BaseDeploymentConfig",version:"2.148.1"};function ignore(_x){}
