Interface TaskDefinitionAttributes
- All Superinterfaces:
CommonTaskDefinitionAttributes,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
TaskDefinitionAttributes.Jsii$Proxy
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-11-17T14:40:50.627Z")
@Stability(Stable)
public interface TaskDefinitionAttributes
extends software.amazon.jsii.JsiiSerializable, CommonTaskDefinitionAttributes
A reference to an existing task definition.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.ecs.*;
import software.amazon.awscdk.services.iam.*;
Role role;
TaskDefinitionAttributes taskDefinitionAttributes = TaskDefinitionAttributes.builder()
.taskDefinitionArn("taskDefinitionArn")
// the properties below are optional
.compatibility(Compatibility.EC2)
.executionRole(role)
.networkMode(NetworkMode.NONE)
.taskRole(role)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forTaskDefinitionAttributesstatic final classAn implementation forTaskDefinitionAttributes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default CompatibilityWhat launch types this task definition should be compatible with.Methods inherited from interface software.amazon.awscdk.services.ecs.CommonTaskDefinitionAttributes
getExecutionRole, getNetworkMode, getTaskDefinitionArn, getTaskRoleMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getCompatibility
What launch types this task definition should be compatible with.Default: Compatibility.EC2_AND_FARGATE
-
builder
- Returns:
- a
TaskDefinitionAttributes.BuilderofTaskDefinitionAttributes
-