@Generated(value="jsii-pacmak/1.70.0 (build 03c2f6f)", date="2022-11-01T13:16:47.480Z") @Stability(value=Experimental) 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.core.*;
import software.amazon.awscdk.services.ecs.*;
ContainerImage containerImage;
Duration duration;
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)
.retries(123)
.startPeriod(duration)
.timeout(duration)
.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)
.stopTimeout(duration)
.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()
(experimental) 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=Experimental) @NotNull TaskDefinition getTaskDefinition()
[disable-awslint:ref-via-interface]
@Stability(value=Experimental) static ContainerDefinitionProps.Builder builder()
builder in interface ContainerDefinitionOptionsContainerDefinitionProps.Builder of ContainerDefinitionPropsCopyright © 2022. All rights reserved.