Class EcsFargateLaunchTarget
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.stepfunctions.tasks.EcsFargateLaunchTarget
- All Implemented Interfaces:
IEcsLaunchTarget
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-10-25T14:21:24.490Z")
@Stability(Stable)
public class EcsFargateLaunchTarget
extends software.amazon.jsii.JsiiObject
implements IEcsLaunchTarget
Configuration for running an ECS task on Fargate.
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(); ContainerDefinition containerDefinition = taskDefinition.addContainer("TheContainer", ContainerDefinitionOptions.builder() .image(ContainerImage.fromRegistry("foo/bar")) .memoryLimitMiB(256) .build()); EcsRunTask runTask = EcsRunTask.Builder.create(this, "RunFargate") .integrationPattern(IntegrationPattern.RUN_JOB) .cluster(cluster) .taskDefinition(taskDefinition) .assignPublicIp(true) .containerOverrides(List.of(ContainerOverride.builder() .containerDefinition(containerDefinition) .environment(List.of(TaskEnvironmentVariable.builder().name("SOME_KEY").value(JsonPath.stringAt("$.SomeKey")).build())) .build())) .launchTarget(new EcsFargateLaunchTarget()) .propagatedTagSource(PropagatedTagSource.TASK_DEFINITION) .build();
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.stepfunctions.tasks.IEcsLaunchTarget
IEcsLaunchTarget.Jsii$Default, IEcsLaunchTarget.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
EcsFargateLaunchTarget
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
EcsFargateLaunchTarget
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionbind
(EcsRunTask _task, LaunchTargetBindOptions launchTargetOptions) Called when the Fargate launch type configured on RunTask.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
EcsFargateLaunchTarget
protected EcsFargateLaunchTarget(software.amazon.jsii.JsiiObjectRef objRef) -
EcsFargateLaunchTarget
protected EcsFargateLaunchTarget(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EcsFargateLaunchTarget
- Parameters:
options
-
-
EcsFargateLaunchTarget
@Stability(Stable) public EcsFargateLaunchTarget()
-
-
Method Details
-
bind
@Stability(Stable) @NotNull public EcsLaunchTargetConfig bind(@NotNull EcsRunTask _task, @NotNull LaunchTargetBindOptions launchTargetOptions) Called when the Fargate launch type configured on RunTask.- Specified by:
bind
in interfaceIEcsLaunchTarget
- Parameters:
_task
- This parameter is required.launchTargetOptions
- This parameter is required.
-