"use strict";var _a;Object.defineProperty(exports,"__esModule",{value:!0}),exports.FargateTaskDefinition=void 0;const jsiiDeprecationWarnings=require("../../../.warnings.jsii.js"),JSII_RTTI_SYMBOL_1=Symbol.for("jsii.rtti"),core_1=require("../../../core"),_imported_task_definition_1=require("../base/_imported-task-definition"),task_definition_1=require("../base/task-definition");class FargateTaskDefinition extends task_definition_1.TaskDefinition{static fromFargateTaskDefinitionArn(scope,id,fargateTaskDefinitionArn){return new _imported_task_definition_1.ImportedTaskDefinition(scope,id,{taskDefinitionArn:fargateTaskDefinitionArn})}static fromFargateTaskDefinitionAttributes(scope,id,attrs){try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_FargateTaskDefinitionAttributes(attrs)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,this.fromFargateTaskDefinitionAttributes),error}return new _imported_task_definition_1.ImportedTaskDefinition(scope,id,{taskDefinitionArn:attrs.taskDefinitionArn,compatibility:task_definition_1.Compatibility.FARGATE,networkMode:attrs.networkMode,taskRole:attrs.taskRole,executionRole:attrs.executionRole})}constructor(scope,id,props={}){super(scope,id,{...props,cpu:props.cpu!==void 0?core_1.Tokenization.stringifyNumber(props.cpu):"256",memoryMiB:props.memoryLimitMiB!==void 0?core_1.Tokenization.stringifyNumber(props.memoryLimitMiB):"512",compatibility:task_definition_1.Compatibility.FARGATE,networkMode:task_definition_1.NetworkMode.AWS_VPC}),this.networkMode=task_definition_1.NetworkMode.AWS_VPC;try{jsiiDeprecationWarnings.aws_cdk_lib_aws_ecs_FargateTaskDefinitionProps(props)}catch(error){throw process.env.JSII_DEBUG!=="1"&&error.name==="DeprecationError"&&Error.captureStackTrace(error,FargateTaskDefinition),error}if(props.ephemeralStorageGiB&&!core_1.Token.isUnresolved(props.ephemeralStorageGiB)&&(props.ephemeralStorageGiB<21||props.ephemeralStorageGiB>200))throw new Error("Ephemeral storage size must be between 21GiB and 200GiB");this.ephemeralStorageGiB=props.ephemeralStorageGiB}}exports.FargateTaskDefinition=FargateTaskDefinition,_a=JSII_RTTI_SYMBOL_1,FargateTaskDefinition[_a]={fqn:"aws-cdk-lib.aws_ecs.FargateTaskDefinition",version:"2.96.1"};
