Interface CfnTaskDefinitionProps

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

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-05T19:18:32.048Z") @Stability(Stable) public interface CfnTaskDefinitionProps extends software.amazon.jsii.JsiiSerializable
Properties for defining a CfnTaskDefinition.

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.*;
 CfnTaskDefinitionProps cfnTaskDefinitionProps = CfnTaskDefinitionProps.builder()
         .containerDefinitions(List.of(ContainerDefinitionProperty.builder()
                 .image("image")
                 .name("name")
                 // the properties below are optional
                 .command(List.of("command"))
                 .cpu(123)
                 .credentialSpecs(List.of("credentialSpecs"))
                 .dependsOn(List.of(ContainerDependencyProperty.builder()
                         .condition("condition")
                         .containerName("containerName")
                         .build()))
                 .disableNetworking(false)
                 .dnsSearchDomains(List.of("dnsSearchDomains"))
                 .dnsServers(List.of("dnsServers"))
                 .dockerLabels(Map.of(
                         "dockerLabelsKey", "dockerLabels"))
                 .dockerSecurityOptions(List.of("dockerSecurityOptions"))
                 .entryPoint(List.of("entryPoint"))
                 .environment(List.of(KeyValuePairProperty.builder()
                         .name("name")
                         .value("value")
                         .build()))
                 .environmentFiles(List.of(EnvironmentFileProperty.builder()
                         .type("type")
                         .value("value")
                         .build()))
                 .essential(false)
                 .extraHosts(List.of(HostEntryProperty.builder()
                         .hostname("hostname")
                         .ipAddress("ipAddress")
                         .build()))
                 .firelensConfiguration(FirelensConfigurationProperty.builder()
                         .options(Map.of(
                                 "optionsKey", "options"))
                         .type("type")
                         .build())
                 .healthCheck(HealthCheckProperty.builder()
                         .command(List.of("command"))
                         .interval(123)
                         .retries(123)
                         .startPeriod(123)
                         .timeout(123)
                         .build())
                 .hostname("hostname")
                 .interactive(false)
                 .links(List.of("links"))
                 .linuxParameters(LinuxParametersProperty.builder()
                         .capabilities(KernelCapabilitiesProperty.builder()
                                 .add(List.of("add"))
                                 .drop(List.of("drop"))
                                 .build())
                         .devices(List.of(DeviceProperty.builder()
                                 .containerPath("containerPath")
                                 .hostPath("hostPath")
                                 .permissions(List.of("permissions"))
                                 .build()))
                         .initProcessEnabled(false)
                         .maxSwap(123)
                         .sharedMemorySize(123)
                         .swappiness(123)
                         .tmpfs(List.of(TmpfsProperty.builder()
                                 .size(123)
                                 // the properties below are optional
                                 .containerPath("containerPath")
                                 .mountOptions(List.of("mountOptions"))
                                 .build()))
                         .build())
                 .logConfiguration(LogConfigurationProperty.builder()
                         .logDriver("logDriver")
                         // the properties below are optional
                         .options(Map.of(
                                 "optionsKey", "options"))
                         .secretOptions(List.of(SecretProperty.builder()
                                 .name("name")
                                 .valueFrom("valueFrom")
                                 .build()))
                         .build())
                 .memory(123)
                 .memoryReservation(123)
                 .mountPoints(List.of(MountPointProperty.builder()
                         .containerPath("containerPath")
                         .readOnly(false)
                         .sourceVolume("sourceVolume")
                         .build()))
                 .portMappings(List.of(PortMappingProperty.builder()
                         .appProtocol("appProtocol")
                         .containerPort(123)
                         .containerPortRange("containerPortRange")
                         .hostPort(123)
                         .name("name")
                         .protocol("protocol")
                         .build()))
                 .privileged(false)
                 .pseudoTerminal(false)
                 .readonlyRootFilesystem(false)
                 .repositoryCredentials(RepositoryCredentialsProperty.builder()
                         .credentialsParameter("credentialsParameter")
                         .build())
                 .resourceRequirements(List.of(ResourceRequirementProperty.builder()
                         .type("type")
                         .value("value")
                         .build()))
                 .restartPolicy(RestartPolicyProperty.builder()
                         .enabled(false)
                         .ignoredExitCodes(List.of(123))
                         .restartAttemptPeriod(123)
                         .build())
                 .secrets(List.of(SecretProperty.builder()
                         .name("name")
                         .valueFrom("valueFrom")
                         .build()))
                 .startTimeout(123)
                 .stopTimeout(123)
                 .systemControls(List.of(SystemControlProperty.builder()
                         .namespace("namespace")
                         .value("value")
                         .build()))
                 .ulimits(List.of(UlimitProperty.builder()
                         .hardLimit(123)
                         .name("name")
                         .softLimit(123)
                         .build()))
                 .user("user")
                 .versionConsistency("versionConsistency")
                 .volumesFrom(List.of(VolumeFromProperty.builder()
                         .readOnly(false)
                         .sourceContainer("sourceContainer")
                         .build()))
                 .workingDirectory("workingDirectory")
                 .build()))
         .cpu("cpu")
         .enableFaultInjection(false)
         .ephemeralStorage(EphemeralStorageProperty.builder()
                 .sizeInGiB(123)
                 .build())
         .executionRoleArn("executionRoleArn")
         .family("family")
         .inferenceAccelerators(List.of(InferenceAcceleratorProperty.builder()
                 .deviceName("deviceName")
                 .deviceType("deviceType")
                 .build()))
         .ipcMode("ipcMode")
         .memory("memory")
         .networkMode("networkMode")
         .pidMode("pidMode")
         .placementConstraints(List.of(TaskDefinitionPlacementConstraintProperty.builder()
                 .type("type")
                 // the properties below are optional
                 .expression("expression")
                 .build()))
         .proxyConfiguration(ProxyConfigurationProperty.builder()
                 .containerName("containerName")
                 // the properties below are optional
                 .proxyConfigurationProperties(List.of(KeyValuePairProperty.builder()
                         .name("name")
                         .value("value")
                         .build()))
                 .type("type")
                 .build())
         .requiresCompatibilities(List.of("requiresCompatibilities"))
         .runtimePlatform(RuntimePlatformProperty.builder()
                 .cpuArchitecture("cpuArchitecture")
                 .operatingSystemFamily("operatingSystemFamily")
                 .build())
         .tags(List.of(CfnTag.builder()
                 .key("key")
                 .value("value")
                 .build()))
         .taskRoleArn("taskRoleArn")
         .volumes(List.of(VolumeProperty.builder()
                 .configuredAtLaunch(false)
                 .dockerVolumeConfiguration(DockerVolumeConfigurationProperty.builder()
                         .autoprovision(false)
                         .driver("driver")
                         .driverOpts(Map.of(
                                 "driverOptsKey", "driverOpts"))
                         .labels(Map.of(
                                 "labelsKey", "labels"))
                         .scope("scope")
                         .build())
                 .efsVolumeConfiguration(EFSVolumeConfigurationProperty.builder()
                         .filesystemId("filesystemId")
                         // the properties below are optional
                         .authorizationConfig(AuthorizationConfigProperty.builder()
                                 .accessPointId("accessPointId")
                                 .iam("iam")
                                 .build())
                         .rootDirectory("rootDirectory")
                         .transitEncryption("transitEncryption")
                         .transitEncryptionPort(123)
                         .build())
                 .fSxWindowsFileServerVolumeConfiguration(FSxWindowsFileServerVolumeConfigurationProperty.builder()
                         .fileSystemId("fileSystemId")
                         .rootDirectory("rootDirectory")
                         // the properties below are optional
                         .authorizationConfig(FSxAuthorizationConfigProperty.builder()
                                 .credentialsParameter("credentialsParameter")
                                 .domain("domain")
                                 .build())
                         .build())
                 .host(HostVolumePropertiesProperty.builder()
                         .sourcePath("sourcePath")
                         .build())
                 .name("name")
                 .build()))
         .build();
 

See Also: