Interface EcsFargateLaunchTargetOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
EcsFargateLaunchTargetOptions.Jsii$Proxy

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-03T13:58:32.219Z") @Stability(Stable) public interface EcsFargateLaunchTargetOptions extends software.amazon.jsii.JsiiSerializable
Properties to define an ECS service.

Example:

 IVpc vpc = Vpc.fromLookup(this, "Vpc", VpcLookupOptions.builder()
         .isDefault(true)
         .build());
 Cluster cluster = Cluster.Builder.create(this, "FargateCluster").vpc(vpc).build();
 TaskDefinition taskDefinition = TaskDefinition.Builder.create(this, "TD")
         .memoryMiB("512")
         .cpu("256")
         .compatibility(Compatibility.FARGATE)
         .build();
 // Use custom() option - specify custom capacity provider strategy
 EcsRunTask runTaskWithCustom = EcsRunTask.Builder.create(this, "RunTaskWithCustom")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .launchTarget(EcsFargateLaunchTarget.Builder.create()
                 .platformVersion(FargatePlatformVersion.VERSION1_4)
                 .capacityProviderOptions(CapacityProviderOptions.custom(List.of(CapacityProviderStrategy.builder().capacityProvider("FARGATE_SPOT").weight(2).base(1).build(), CapacityProviderStrategy.builder().capacityProvider("FARGATE").weight(1).build())))
                 .build())
         .build();
 // Use default() option - uses cluster's default capacity provider strategy
 EcsRunTask runTaskWithDefault = EcsRunTask.Builder.create(this, "RunTaskWithDefault")
         .cluster(cluster)
         .taskDefinition(taskDefinition)
         .launchTarget(EcsFargateLaunchTarget.Builder.create()
                 .platformVersion(FargatePlatformVersion.VERSION1_4)
                 .capacityProviderOptions(CapacityProviderOptions.default())
                 .build())
         .build();