@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:38.687Z") @Stability(value=Stable) public interface ContainerDefinitionProps extends software.amazon.jsii.JsiiSerializable, ContainerDefinitionOptions
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
import software.amazon.awscdk.services.ecs.*;
ContainerImage containerImage;
EnvironmentFile environmentFile;
LinuxParameters linuxParameters;
LogDriver logDriver;
Secret secret;
TaskDefinition taskDefinition;
ContainerDefinitionProps containerDefinitionProps = ContainerDefinitionProps.builder()
.image(containerImage)
.taskDefinition(taskDefinition)
// the properties below are optional
.command(List.of("command"))
.containerName("containerName")
.cpu(123)
.disableNetworking(false)
.dnsSearchDomains(List.of("dnsSearchDomains"))
.dnsServers(List.of("dnsServers"))
.dockerLabels(Map.of(
"dockerLabelsKey", "dockerLabels"))
.dockerSecurityOptions(List.of("dockerSecurityOptions"))
.entryPoint(List.of("entryPoint"))
.environment(Map.of(
"environmentKey", "environment"))
.environmentFiles(List.of(environmentFile))
.essential(false)
.extraHosts(Map.of(
"extraHostsKey", "extraHosts"))
.gpuCount(123)
.healthCheck(HealthCheck.builder()
.command(List.of("command"))
// the properties below are optional
.interval(Duration.minutes(30))
.retries(123)
.startPeriod(Duration.minutes(30))
.timeout(Duration.minutes(30))
.build())
.hostname("hostname")
.inferenceAcceleratorResources(List.of("inferenceAcceleratorResources"))
.linuxParameters(linuxParameters)
.logging(logDriver)
.memoryLimitMiB(123)
.memoryReservationMiB(123)
.portMappings(List.of(PortMapping.builder()
.containerPort(123)
// the properties below are optional
.hostPort(123)
.protocol(Protocol.TCP)
.build()))
.privileged(false)
.readonlyRootFilesystem(false)
.secrets(Map.of(
"secretsKey", secret))
.startTimeout(Duration.minutes(30))
.stopTimeout(Duration.minutes(30))
.systemControls(List.of(SystemControl.builder()
.namespace("namespace")
.value("value")
.build()))
.user("user")
.workingDirectory("workingDirectory")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ContainerDefinitionProps.Builder
A builder for
ContainerDefinitionProps |
static class |
ContainerDefinitionProps.Jsii$Proxy
An implementation for
ContainerDefinitionProps |
| Modifier and Type | Method and Description |
|---|---|
static ContainerDefinitionProps.Builder |
builder() |
TaskDefinition |
getTaskDefinition()
The name of the task definition that includes this container definition.
|
getCommand, getContainerName, getCpu, getDisableNetworking, getDnsSearchDomains, getDnsServers, getDockerLabels, getDockerSecurityOptions, getEntryPoint, getEnvironment, getEnvironmentFiles, getEssential, getExtraHosts, getGpuCount, getHealthCheck, getHostname, getImage, getInferenceAcceleratorResources, getLinuxParameters, getLogging, getMemoryLimitMiB, getMemoryReservationMiB, getPortMappings, getPrivileged, getReadonlyRootFilesystem, getSecrets, getStartTimeout, getStopTimeout, getSystemControls, getUser, getWorkingDirectory@Stability(value=Stable) @NotNull TaskDefinition getTaskDefinition()
[disable-awslint:ref-via-interface]
@Stability(value=Stable) static ContainerDefinitionProps.Builder builder()
builder in interface ContainerDefinitionOptionsContainerDefinitionProps.Builder of ContainerDefinitionPropsCopyright © 2022. All rights reserved.