Class ExternalTaskDefinition
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.ecs.TaskDefinition
software.amazon.awscdk.services.ecs.ExternalTaskDefinition
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IExternalTaskDefinition,ITaskDefinition,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:47.336Z")
@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 ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.IExternalTaskDefinition
IExternalTaskDefinition.Jsii$Default, IExternalTaskDefinition.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.ecs.ITaskDefinition
ITaskDefinition.Jsii$Default, ITaskDefinition.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExternalTaskDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedExternalTaskDefinition(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 TypeMethodDescriptionvoidaddInferenceAccelerator(InferenceAccelerator _inferenceAccelerator) Overriden method to throw error as interface accelerators are not supported for external tasks.static IExternalTaskDefinitionfromEc2TaskDefinitionArn(software.constructs.Construct scope, String id, String externalTaskDefinitionArn) Imports a task definition from the specified task definition ARN.static IExternalTaskDefinitionfromExternalTaskDefinitionAttributes(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, fromTaskDefinitionArn, fromTaskDefinitionAttributes, getCompatibility, getContainers, getDefaultContainer, getEphemeralStorageGiB, getExecutionRole, getFamily, getInferenceAccelerators, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getReferencesSecretJsonField, getTaskDefinitionArn, getTaskRole, obtainExecutionRole, setDefaultContainer, validateMethods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesizeMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.awscdk.services.ecs.ITaskDefinition
getCompatibility, getExecutionRole, getIsEc2Compatible, getIsExternalCompatible, getIsFargateCompatible, getNetworkMode, getTaskDefinitionArn, getTaskRoleMethods 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:
addInferenceAcceleratorin classTaskDefinition- Parameters:
_inferenceAccelerator- This parameter is required.
-