"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.QueueProcessingFargateService=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),aws_ecs_1=require("../../../aws-ecs"),core_1=require("../../../core"),cxapi=require("../../../cx-api"),queue_processing_service_base_1=require("../base/queue-processing-service-base");class QueueProcessingFargateService extends queue_processing_service_base_1.QueueProcessingServiceBase{constructor(scope,id,props){super(scope,id,props);try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_patterns_QueueProcessingFargateServiceProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,QueueProcessingFargateService),error}this.taskDefinition=new aws_ecs_1.FargateTaskDefinition(this,"QueueProcessingTaskDef",{memoryLimitMiB:props.memoryLimitMiB||512,cpu:props.cpu||256,family:props.family,runtimePlatform:props.runtimePlatform});const containerName=props.containerName??"QueueProcessingContainer";this.taskDefinition.addContainer(containerName,{image:props.image,command:props.command,environment:this.environment,secrets:this.secrets,logging:this.logDriver,healthCheck:props.healthCheck});const desiredCount=core_1.FeatureFlags.of(this).isEnabled(cxapi.ECS_REMOVE_DEFAULT_DESIRED_COUNT)?void 0:this.desiredCount;this.service=new aws_ecs_1.FargateService(this,"QueueProcessingFargateService",{cluster:this.cluster,desiredCount,taskDefinition:this.taskDefinition,serviceName:props.serviceName,minHealthyPercent:props.minHealthyPercent,maxHealthyPercent:props.maxHealthyPercent,propagateTags:props.propagateTags,enableECSManagedTags:props.enableECSManagedTags,platformVersion:props.platformVersion,deploymentController:props.deploymentController,securityGroups:props.securityGroups,vpcSubnets:props.taskSubnets,assignPublicIp:props.assignPublicIp,circuitBreaker:props.circuitBreaker,capacityProviderStrategies:props.capacityProviderStrategies,enableExecuteCommand:props.enableExecuteCommand}),this.configureAutoscalingForService(this.service),this.grantPermissionsToService(this.service)}}exports.QueueProcessingFargateService=QueueProcessingFargateService,_a=JSII_RTTI_SYMBOL_1,QueueProcessingFargateService[_a]={fqn:"aws-cdk-lib.aws_ecs_patterns.QueueProcessingFargateService",version:"2.46.0"};
//# sourceMappingURL=queue-processing-fargate-service.js.map
