Class ExternalTaskDefinition
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.ecs.TaskDefinition
software.amazon.awscdk.services.ecs.ExternalTaskDefinition
- All Implemented Interfaces:
IResource
,IExternalTaskDefinition
,ITaskDefinition
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-12-17T21:37:30.500Z")
@Stability(Stable)
public class ExternalTaskDefinition
extends TaskDefinition
implements IExternalTaskDefinition
The details of a task definition run on an External cluster.
Example:
ExternalTaskDefinition externalTaskDefinition = new ExternalTaskDefinition(this, "TaskDef"); ContainerDefinition container = externalTaskDefinition.addContainer("WebContainer", ContainerDefinitionOptions.builder() // Use an image from DockerHub .image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample")) .memoryLimitMiB(1024) .build());
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.IExternalTaskDefinition
IExternalTaskDefinition.Jsii$Default, IExternalTaskDefinition.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.ITaskDefinition
ITaskDefinition.Jsii$Default, ITaskDefinition.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
ExternalTaskDefinition
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
ExternalTaskDefinition
(software.amazon.jsii.JsiiObjectRef objRef) ExternalTaskDefinition
(software.constructs.Construct scope, String id) Constructs a new instance of the ExternalTaskDefinition class.ExternalTaskDefinition
(software.constructs.Construct scope, String id, ExternalTaskDefinitionProps props) Constructs a new instance of the ExternalTaskDefinition class. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addInferenceAccelerator
(InferenceAccelerator _inferenceAccelerator) Overriden method to throw error as interface accelerators are not supported for external tasks.static IExternalTaskDefinition
fromEc2TaskDefinitionArn
(software.constructs.Construct scope, String id, String externalTaskDefinitionArn) Imports a task definition from the specified task definition ARN.static IExternalTaskDefinition
fromExternalTaskDefinitionAttributes
(software.constructs.Construct scope, String id, ExternalTaskDefinitionAttributes attrs) Imports an existing External task definition from its attributes.Methods inherited from class software.amazon.awscdk.services.ecs.TaskDefinition
addContainer, addExtension, addFirelensLogRouter, addPlacementConstraint, addToExecutionRolePolicy, addToTaskRolePolicy, addVolume, findContainer, findPortMappingByName, fromTaskDefinitionArn, fromTaskDefinitionAttributes, getCompatibility, getContainers, getDefaultContainer, getEphemeralStorageGiB, getExecutionRole, getFamily, getInferenceAccelerators, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getPidMode, getReferencesSecretJsonField, getTaskDefinitionArn, getTaskRole, grantRun, obtainExecutionRole, setDefaultContainer
Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
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, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.awscdk.services.ecs.ITaskDefinition
getCompatibility, getExecutionRole, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getTaskDefinitionArn, getTaskRole
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
ExternalTaskDefinition
protected ExternalTaskDefinition(software.amazon.jsii.JsiiObjectRef objRef) -
ExternalTaskDefinition
protected ExternalTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
ExternalTaskDefinition
@Stability(Stable) public ExternalTaskDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ExternalTaskDefinitionProps props) Constructs a new instance of the ExternalTaskDefinition class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
ExternalTaskDefinition
@Stability(Stable) public ExternalTaskDefinition(@NotNull software.constructs.Construct scope, @NotNull String id) Constructs a new instance of the ExternalTaskDefinition class.- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Details
-
fromEc2TaskDefinitionArn
@Stability(Stable) @NotNull public static IExternalTaskDefinition fromEc2TaskDefinitionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String externalTaskDefinitionArn) Imports a task definition from the specified task definition ARN.- Parameters:
scope
- This parameter is required.id
- This parameter is required.externalTaskDefinitionArn
- This parameter is required.
-
fromExternalTaskDefinitionAttributes
@Stability(Stable) @NotNull public static IExternalTaskDefinition fromExternalTaskDefinitionAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ExternalTaskDefinitionAttributes attrs) Imports an existing External task definition from its attributes.- Parameters:
scope
- This parameter is required.id
- This parameter is required.attrs
- This parameter is required.
-
addInferenceAccelerator
@Stability(Stable) public void addInferenceAccelerator(@NotNull InferenceAccelerator _inferenceAccelerator) Overriden method to throw error as interface accelerators are not supported for external tasks.- Overrides:
addInferenceAccelerator
in classTaskDefinition
- Parameters:
_inferenceAccelerator
- This parameter is required.
-