All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awssdk.services.ecs.model.ContainerDefinition Maven / Gradle / Ivy

/*
 * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */

package software.amazon.awssdk.services.ecs.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.traits.MapTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructMap;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 

* Container definitions are used in task definitions to describe the different containers that are launched as part of * a task. *

*/ @Generated("software.amazon.awssdk:codegen") public final class ContainerDefinition implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField NAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ContainerDefinition::name)).setter(setter(Builder::name)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("name").build()).build(); private static final SdkField IMAGE_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ContainerDefinition::image)).setter(setter(Builder::image)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("image").build()).build(); private static final SdkField REPOSITORY_CREDENTIALS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(ContainerDefinition::repositoryCredentials)) .setter(setter(Builder::repositoryCredentials)).constructor(RepositoryCredentials::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("repositoryCredentials").build()) .build(); private static final SdkField CPU_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(ContainerDefinition::cpu)).setter(setter(Builder::cpu)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("cpu").build()).build(); private static final SdkField MEMORY_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(ContainerDefinition::memory)).setter(setter(Builder::memory)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("memory").build()).build(); private static final SdkField MEMORY_RESERVATION_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(ContainerDefinition::memoryReservation)).setter(setter(Builder::memoryReservation)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("memoryReservation").build()).build(); private static final SdkField> LINKS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::links)) .setter(setter(Builder::links)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("links").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> PORT_MAPPINGS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::portMappings)) .setter(setter(Builder::portMappings)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("portMappings").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(PortMapping::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ESSENTIAL_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::essential)).setter(setter(Builder::essential)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("essential").build()).build(); private static final SdkField> ENTRY_POINT_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::entryPoint)) .setter(setter(Builder::entryPoint)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("entryPoint").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> COMMAND_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::command)) .setter(setter(Builder::command)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("command").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> ENVIRONMENT_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::environment)) .setter(setter(Builder::environment)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environment").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(KeyValuePair::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> MOUNT_POINTS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::mountPoints)) .setter(setter(Builder::mountPoints)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("mountPoints").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(MountPoint::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> VOLUMES_FROM_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::volumesFrom)) .setter(setter(Builder::volumesFrom)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("volumesFrom").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(VolumeFrom::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField LINUX_PARAMETERS_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(ContainerDefinition::linuxParameters)) .setter(setter(Builder::linuxParameters)).constructor(LinuxParameters::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("linuxParameters").build()).build(); private static final SdkField> SECRETS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::secrets)) .setter(setter(Builder::secrets)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("secrets").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Secret::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> DEPENDS_ON_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::dependsOn)) .setter(setter(Builder::dependsOn)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dependsOn").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ContainerDependency::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField START_TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(ContainerDefinition::startTimeout)).setter(setter(Builder::startTimeout)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("startTimeout").build()).build(); private static final SdkField STOP_TIMEOUT_FIELD = SdkField. builder(MarshallingType.INTEGER) .getter(getter(ContainerDefinition::stopTimeout)).setter(setter(Builder::stopTimeout)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("stopTimeout").build()).build(); private static final SdkField HOSTNAME_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ContainerDefinition::hostname)).setter(setter(Builder::hostname)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("hostname").build()).build(); private static final SdkField USER_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ContainerDefinition::user)).setter(setter(Builder::user)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("user").build()).build(); private static final SdkField WORKING_DIRECTORY_FIELD = SdkField. builder(MarshallingType.STRING) .getter(getter(ContainerDefinition::workingDirectory)).setter(setter(Builder::workingDirectory)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("workingDirectory").build()).build(); private static final SdkField DISABLE_NETWORKING_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::disableNetworking)).setter(setter(Builder::disableNetworking)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("disableNetworking").build()).build(); private static final SdkField PRIVILEGED_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::privileged)).setter(setter(Builder::privileged)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("privileged").build()).build(); private static final SdkField READONLY_ROOT_FILESYSTEM_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::readonlyRootFilesystem)).setter(setter(Builder::readonlyRootFilesystem)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("readonlyRootFilesystem").build()) .build(); private static final SdkField> DNS_SERVERS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::dnsServers)) .setter(setter(Builder::dnsServers)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dnsServers").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> DNS_SEARCH_DOMAINS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::dnsSearchDomains)) .setter(setter(Builder::dnsSearchDomains)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dnsSearchDomains").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> EXTRA_HOSTS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::extraHosts)) .setter(setter(Builder::extraHosts)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("extraHosts").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(HostEntry::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> DOCKER_SECURITY_OPTIONS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::dockerSecurityOptions)) .setter(setter(Builder::dockerSecurityOptions)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dockerSecurityOptions").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField INTERACTIVE_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::interactive)).setter(setter(Builder::interactive)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("interactive").build()).build(); private static final SdkField PSEUDO_TERMINAL_FIELD = SdkField. builder(MarshallingType.BOOLEAN) .getter(getter(ContainerDefinition::pseudoTerminal)).setter(setter(Builder::pseudoTerminal)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("pseudoTerminal").build()).build(); private static final SdkField> DOCKER_LABELS_FIELD = SdkField .> builder(MarshallingType.MAP) .getter(getter(ContainerDefinition::dockerLabels)) .setter(setter(Builder::dockerLabels)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("dockerLabels").build(), MapTrait.builder() .keyLocationName("key") .valueLocationName("value") .valueFieldInfo( SdkField. builder(MarshallingType.STRING) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("value").build()).build()).build()).build(); private static final SdkField> ULIMITS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::ulimits)) .setter(setter(Builder::ulimits)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ulimits").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Ulimit::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField LOG_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).getter(getter(ContainerDefinition::logConfiguration)) .setter(setter(Builder::logConfiguration)).constructor(LogConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("logConfiguration").build()).build(); private static final SdkField HEALTH_CHECK_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .getter(getter(ContainerDefinition::healthCheck)).setter(setter(Builder::healthCheck)) .constructor(HealthCheck::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("healthCheck").build()).build(); private static final SdkField> SYSTEM_CONTROLS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::systemControls)) .setter(setter(Builder::systemControls)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("systemControls").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(SystemControl::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> RESOURCE_REQUIREMENTS_FIELD = SdkField .> builder(MarshallingType.LIST) .getter(getter(ContainerDefinition::resourceRequirements)) .setter(setter(Builder::resourceRequirements)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("resourceRequirements").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(ResourceRequirement::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(NAME_FIELD, IMAGE_FIELD, REPOSITORY_CREDENTIALS_FIELD, CPU_FIELD, MEMORY_FIELD, MEMORY_RESERVATION_FIELD, LINKS_FIELD, PORT_MAPPINGS_FIELD, ESSENTIAL_FIELD, ENTRY_POINT_FIELD, COMMAND_FIELD, ENVIRONMENT_FIELD, MOUNT_POINTS_FIELD, VOLUMES_FROM_FIELD, LINUX_PARAMETERS_FIELD, SECRETS_FIELD, DEPENDS_ON_FIELD, START_TIMEOUT_FIELD, STOP_TIMEOUT_FIELD, HOSTNAME_FIELD, USER_FIELD, WORKING_DIRECTORY_FIELD, DISABLE_NETWORKING_FIELD, PRIVILEGED_FIELD, READONLY_ROOT_FILESYSTEM_FIELD, DNS_SERVERS_FIELD, DNS_SEARCH_DOMAINS_FIELD, EXTRA_HOSTS_FIELD, DOCKER_SECURITY_OPTIONS_FIELD, INTERACTIVE_FIELD, PSEUDO_TERMINAL_FIELD, DOCKER_LABELS_FIELD, ULIMITS_FIELD, LOG_CONFIGURATION_FIELD, HEALTH_CHECK_FIELD, SYSTEM_CONTROLS_FIELD, RESOURCE_REQUIREMENTS_FIELD)); private static final long serialVersionUID = 1L; private final String name; private final String image; private final RepositoryCredentials repositoryCredentials; private final Integer cpu; private final Integer memory; private final Integer memoryReservation; private final List links; private final List portMappings; private final Boolean essential; private final List entryPoint; private final List command; private final List environment; private final List mountPoints; private final List volumesFrom; private final LinuxParameters linuxParameters; private final List secrets; private final List dependsOn; private final Integer startTimeout; private final Integer stopTimeout; private final String hostname; private final String user; private final String workingDirectory; private final Boolean disableNetworking; private final Boolean privileged; private final Boolean readonlyRootFilesystem; private final List dnsServers; private final List dnsSearchDomains; private final List extraHosts; private final List dockerSecurityOptions; private final Boolean interactive; private final Boolean pseudoTerminal; private final Map dockerLabels; private final List ulimits; private final LogConfiguration logConfiguration; private final HealthCheck healthCheck; private final List systemControls; private final List resourceRequirements; private ContainerDefinition(BuilderImpl builder) { this.name = builder.name; this.image = builder.image; this.repositoryCredentials = builder.repositoryCredentials; this.cpu = builder.cpu; this.memory = builder.memory; this.memoryReservation = builder.memoryReservation; this.links = builder.links; this.portMappings = builder.portMappings; this.essential = builder.essential; this.entryPoint = builder.entryPoint; this.command = builder.command; this.environment = builder.environment; this.mountPoints = builder.mountPoints; this.volumesFrom = builder.volumesFrom; this.linuxParameters = builder.linuxParameters; this.secrets = builder.secrets; this.dependsOn = builder.dependsOn; this.startTimeout = builder.startTimeout; this.stopTimeout = builder.stopTimeout; this.hostname = builder.hostname; this.user = builder.user; this.workingDirectory = builder.workingDirectory; this.disableNetworking = builder.disableNetworking; this.privileged = builder.privileged; this.readonlyRootFilesystem = builder.readonlyRootFilesystem; this.dnsServers = builder.dnsServers; this.dnsSearchDomains = builder.dnsSearchDomains; this.extraHosts = builder.extraHosts; this.dockerSecurityOptions = builder.dockerSecurityOptions; this.interactive = builder.interactive; this.pseudoTerminal = builder.pseudoTerminal; this.dockerLabels = builder.dockerLabels; this.ulimits = builder.ulimits; this.logConfiguration = builder.logConfiguration; this.healthCheck = builder.healthCheck; this.systemControls = builder.systemControls; this.resourceRequirements = builder.resourceRequirements; } /** *

* The name of a container. If you are linking multiple containers together in a task definition, the * name of one container can be entered in the links of another container to connect the * containers. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This parameter maps to * name in the Create a * container section of the Docker Remote API and the * --name option to docker run. *

* * @return The name of a container. If you are linking multiple containers together in a task definition, the * name of one container can be entered in the links of another container to * connect the containers. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. * This parameter maps to name in the Create a container section * of the Docker Remote API and the * --name option to docker run. */ public String name() { return name; } /** *

* The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker * Hub registry are available by default. Other repositories are specified with either * repository-url/image:tag or * repository-url/image@digest . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a container section of the * Docker Remote API and the IMAGE parameter of * docker run. *

*
    *
  • *

    * When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag * for the container to use. However, subsequent updates to a repository image are not propagated to already running * tasks. *

    *
  • *
  • *

    * Images in Amazon ECR repositories can be specified by either using the full registry/repository:tag * or registry/repository@digest. For example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE * . *

    *
  • *
  • *

    * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

    *
  • *
  • *

    * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

    *
  • *
  • *

    * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

    *
  • *
* * @return The image used to start a container. This string is passed directly to the Docker daemon. Images in the * Docker Hub registry are available by default. Other repositories are specified with either * repository-url/image:tag or * repository-url/image@digest . Up to 255 letters (uppercase and * lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are * allowed. This parameter maps to Image in the Create a container section * of the Docker Remote API and the * IMAGE parameter of docker * run.

*
    *
  • *

    * When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image * and tag for the container to use. However, subsequent updates to a repository image are not propagated to * already running tasks. *

    *
  • *
  • *

    * Images in Amazon ECR repositories can be specified by either using the full * registry/repository:tag or registry/repository@digest. For example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE * . *

    *
  • *
  • *

    * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

    *
  • *
  • *

    * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

    *
  • *
  • *

    * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

    *
  • */ public String image() { return image; } /** *

    * The private repository authentication credentials to use. *

    * * @return The private repository authentication credentials to use. */ public RepositoryCredentials repositoryCredentials() { return repositoryCredentials; } /** *

    * The number of cpu units reserved for the container. This parameter maps to CpuShares in * the Create a container section * of the Docker Remote API and the * --cpu-shares option to docker run. *

    *

    * This field is optional for tasks using the Fargate launch type, and the only requirement is that the total amount * of CPU reserved for all containers within a task be lower than the task-level cpu value. *

    * *

    * You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs * listed for that instance type on the Amazon EC2 Instances * detail page by 1,024. *

    *
    *

    * For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for * that container, and that is the only task running on the container instance, that container could use the full * 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container * instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container could float to * higher CPU usage if the other container was not using it, but if both tasks were 100% active all of the time, * they would be limited to 512 CPU units. *

    *

    * Linux containers share unallocated CPU units with other containers on the container instance with the same ratio * as their allocated amount. For example, if you run a single-container task on a single-core instance type with * 512 CPU units specified for that container, and that is the only task running on the container instance, that * container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the * same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and * each container could float to higher CPU usage if the other container was not using it, but if both tasks were * 100% active all of the time, they would be limited to 512 CPU units. *

    *

    * On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate the * relative CPU share ratios for running containers. For more information, see CPU share constraint in the Docker * documentation. The minimum valid CPU share value that the Linux kernel allows is 2. However, the CPU parameter is * not required, and you can use CPU values below 2 in your container definitions. For CPU values below 2 (including * null), the behavior varies based on your Amazon ECS container agent version: *

    *
      *
    • *

      * Agent versions less than or equal to 1.1.0: Null and zero CPU values are passed to Docker as 0, which * Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the Linux kernel * converts to two CPU shares. *

      *
    • *
    • *

      * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values of 1 are passed to Docker as 2. *

      *
    • *
    *

    * On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows containers * only have access to the specified amount of CPU that is described in the task definition. *

    * * @return The number of cpu units reserved for the container. This parameter maps to * CpuShares in the Create a container section * of the Docker Remote API and the * --cpu-shares option to docker * run.

    *

    * This field is optional for tasks using the Fargate launch type, and the only requirement is that the * total amount of CPU reserved for all containers within a task be lower than the task-level * cpu value. *

    * *

    * You can determine the number of CPU units that are available per EC2 instance type by multiplying the * vCPUs listed for that instance type on the Amazon EC2 * Instances detail page by 1,024. *

    *
    *

    * For example, if you run a single-container task on a single-core instance type with 512 CPU units * specified for that container, and that is the only task running on the container instance, that container * could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the * same task on that container instance, each task would be guaranteed a minimum of 512 CPU units when * needed, and each container could float to higher CPU usage if the other container was not using it, but * if both tasks were 100% active all of the time, they would be limited to 512 CPU units. *

    *

    * Linux containers share unallocated CPU units with other containers on the container instance with the * same ratio as their allocated amount. For example, if you run a single-container task on a single-core * instance type with 512 CPU units specified for that container, and that is the only task running on the * container instance, that container could use the full 1,024 CPU unit share at any given time. However, if * you launched another copy of the same task on that container instance, each task would be guaranteed a * minimum of 512 CPU units when needed, and each container could float to higher CPU usage if the other * container was not using it, but if both tasks were 100% active all of the time, they would be limited to * 512 CPU units. *

    *

    * On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate * the relative CPU share ratios for running containers. For more information, see CPU share constraint in the * Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2. However, the * CPU parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU * values below 2 (including null), the behavior varies based on your Amazon ECS container agent version: *

    *
      *
    • *

      * Agent versions less than or equal to 1.1.0: Null and zero CPU values are passed to Docker as 0, * which Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the * Linux kernel converts to two CPU shares. *

      *
    • *
    • *

      * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values of 1 are passed to * Docker as 2. *

      *
    • *
    *

    * On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows * containers only have access to the specified amount of CPU that is described in the task definition. */ public Integer cpu() { return cpu; } /** *

    * The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. The total amount of memory reserved for all containers within a task * must be lower than the task memory value, if one is specified. This parameter maps to * Memory in the Create a * container section of the Docker Remote API and the * --memory option to docker run. *

    *

    * If your containers are part of a task using the Fargate launch type, this field is optional. *

    *

    * For containers that are part of a task using the EC2 launch type, you must specify a non-zero integer for one or * both of memory or memoryReservation in container definitions. If you specify both, * memory must be greater than memoryReservation. If you specify * memoryReservation, then that value is subtracted from the available memory resources for the * container instance on which the container is placed. Otherwise, the value of memory is used. *

    *

    * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 * MiB of memory for your containers. *

    * * @return The amount (in MiB) of memory to present to the container. If your container attempts to exceed the * memory specified here, the container is killed. The total amount of memory reserved for all containers * within a task must be lower than the task memory value, if one is specified. This parameter * maps to Memory in the Create a container section * of the Docker Remote API and the * --memory option to docker * run.

    *

    * If your containers are part of a task using the Fargate launch type, this field is optional. *

    *

    * For containers that are part of a task using the EC2 launch type, you must specify a non-zero integer for * one or both of memory or memoryReservation in container definitions. If you * specify both, memory must be greater than memoryReservation. If you specify * memoryReservation, then that value is subtracted from the available memory resources for the * container instance on which the container is placed. Otherwise, the value of memory is used. *

    *

    * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer * than 4 MiB of memory for your containers. */ public Integer memory() { return memory; } /** *

    * The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, * Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory * when it needs to, up to either the hard limit specified with the memory parameter (if applicable), * or all of the available memory on the container instance, whichever comes first. This parameter maps to * MemoryReservation in the Create a container section of the * Docker Remote API and the * --memory-reservation option to docker * run. *

    *

    * You must specify a non-zero integer for one or both of memory or memoryReservation in * container definitions. If you specify both, memory must be greater than * memoryReservation. If you specify memoryReservation, then that value is subtracted from * the available memory resources for the container instance on which the container is placed. Otherwise, the value * of memory is used. *

    *

    * For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory for * short periods of time, you can set a memoryReservation of 128 MiB, and a memory hard * limit of 300 MiB. This configuration would allow the container to only reserve 128 MiB of memory from the * remaining resources on the container instance, but also allow the container to consume more memory resources when * needed. *

    *

    * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 * MiB of memory for your containers. *

    * * @return The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy * contention, Docker attempts to keep the container memory to this soft limit. However, your container can * consume more memory when it needs to, up to either the hard limit specified with the memory * parameter (if applicable), or all of the available memory on the container instance, whichever comes * first. This parameter maps to MemoryReservation in the Create a container section * of the Docker Remote API and the * --memory-reservation option to docker run.

    *

    * You must specify a non-zero integer for one or both of memory or * memoryReservation in container definitions. If you specify both, memory must be * greater than memoryReservation. If you specify memoryReservation, then that * value is subtracted from the available memory resources for the container instance on which the container * is placed. Otherwise, the value of memory is used. *

    *

    * For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of * memory for short periods of time, you can set a memoryReservation of 128 MiB, and a * memory hard limit of 300 MiB. This configuration would allow the container to only reserve * 128 MiB of memory from the remaining resources on the container instance, but also allow the container to * consume more memory resources when needed. *

    *

    * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer * than 4 MiB of memory for your containers. */ public Integer memoryReservation() { return memoryReservation; } /** *

    * The links parameter allows containers to communicate with each other without the need for port * mappings. This parameter is only supported if the network mode of a task definition is bridge. The * name:internalName construct is analogous to name:alias in Docker links. Up to 255 * letters (uppercase and lowercase), numbers, and hyphens are allowed. For more information about linking Docker * containers, go to Legacy container links in the Docker * documentation. This parameter maps to Links in the Create a container section of the * Docker Remote API and the --link option to * docker run. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Containers that are collocated on a single container instance may be able to communicate with each other without * requiring links or host port mappings. Network isolation is achieved on the container instance using security * groups and VPC settings. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The links parameter allows containers to communicate with each other without the need for * port mappings. This parameter is only supported if the network mode of a task definition is * bridge. The name:internalName construct is analogous to name:alias * in Docker links. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. For more * information about linking Docker containers, go to Legacy container links in the Docker documentation. * This parameter maps to Links in the Create a container section * of the Docker Remote API and the * --link option to docker run.

    * *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Containers that are collocated on a single container instance may be able to communicate with each other * without requiring links or host port mappings. Network isolation is achieved on the container instance * using security groups and VPC settings. *

    */ public List links() { return links; } /** *

    * The list of port mappings for the container. Port mappings allow containers to access ports on the host container * instance to send or receive traffic. *

    *

    * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value as the * containerPort. *

    *

    * Port mappings on Windows use the NetNAT gateway address rather than localhost. There is * no loopback for port mappings on Windows, so you cannot access a container's mapped port from the host itself. *

    *

    * This parameter maps to PortBindings in the Create a container section of the * Docker Remote API and the --publish option * to docker run. If the network mode of a task * definition is set to none, then you can't specify port mappings. If the network mode of a task * definition is set to host, then host ports must either be undefined or they must match the container * port in the port mapping. *

    * *

    * After a task reaches the RUNNING status, manual and automatic host and container port assignments * are visible in the Network Bindings section of a container description for a selected task in the Amazon * ECS console. The assignments are also visible in the networkBindings section DescribeTasks * responses. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The list of port mappings for the container. Port mappings allow containers to access ports on the host * container instance to send or receive traffic.

    *

    * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value as * the containerPort. *

    *

    * Port mappings on Windows use the NetNAT gateway address rather than localhost. * There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from * the host itself. *

    *

    * This parameter maps to PortBindings in the Create a container section * of the Docker Remote API and the * --publish option to docker run. * If the network mode of a task definition is set to none, then you can't specify port * mappings. If the network mode of a task definition is set to host, then host ports must * either be undefined or they must match the container port in the port mapping. *

    * *

    * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a selected * task in the Amazon ECS console. The assignments are also visible in the networkBindings * section DescribeTasks responses. *

    */ public List portMappings() { return portMappings; } /** *

    * If the essential parameter of a container is marked as true, and that container fails * or stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, then its failure does not affect * the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential. *

    *

    * All tasks must have at least one essential container. If you have an application that is composed of multiple * containers, you should group containers that are used for a common purpose into components, and separate the * different components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

    * * @return If the essential parameter of a container is marked as true, and that container * fails or stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, then its failure does * not affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to * be essential.

    *

    * All tasks must have at least one essential container. If you have an application that is composed of * multiple containers, you should group containers that are used for a common purpose into components, and * separate the different components into multiple task definitions. For more information, see Application Architecture in the Amazon Elastic Container Service Developer Guide. */ public Boolean essential() { return essential; } /** * *

    * Early versions of the Amazon ECS container agent do not properly handle entryPoint parameters. If * you have problems using entryPoint, update your container agent or enter your commands and arguments * as command array items instead. *

    *
    *

    * The entry point that is passed to the container. This parameter maps to Entrypoint in the Create a container section of the * Docker Remote API and the --entrypoint * option to docker run. For more information, see https://docs.docker.com/engine/reference/builder * /#entrypoint. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return

    * Early versions of the Amazon ECS container agent do not properly handle entryPoint * parameters. If you have problems using entryPoint, update your container agent or enter your * commands and arguments as command array items instead. *

    * *

    * The entry point that is passed to the container. This parameter maps to Entrypoint in the Create a container section * of the Docker Remote API and the * --entrypoint option to docker * run. For more information, see * https://docs.docker.com/engine/reference/builder/#entrypoint. */ public List entryPoint() { return entryPoint; } /** *

    * The command that is passed to the container. This parameter maps to Cmd in the Create a container section of the * Docker Remote API and the COMMAND parameter * to docker run. For more information, see https://docs.docker.com/engine/reference/builder/#cmd. If there are multiple arguments, each argument should * be a separated string in the array. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The command that is passed to the container. This parameter maps to Cmd in the Create a container section * of the Docker Remote API and the * COMMAND parameter to docker run. * For more information, see https://docs.docker * .com/engine/reference/builder/#cmd. If there are multiple arguments, each argument should be a * separated string in the array. */ public List command() { return command; } /** *

    * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of the * Docker Remote API and the --env option to docker run. *

    * *

    * We do not recommend using plaintext environment variables for sensitive information, such as credential data. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The environment variables to pass to a container. This parameter maps to Env in the Create a container section * of the Docker Remote API and the * --env option to docker run.

    * *

    * We do not recommend using plaintext environment variables for sensitive information, such as credential * data. *

    */ public List environment() { return environment; } /** *

    * The mount points for data volumes in your container. *

    *

    * This parameter maps to Volumes in the Create a container section of the * Docker Remote API and the --volume option to * docker run. *

    *

    * Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers cannot mount directories on a different drive, and mount point cannot be across drives. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The mount points for data volumes in your container.

    *

    * This parameter maps to Volumes in the Create a container section * of the Docker Remote API and the * --volume option to docker run. *

    *

    * Windows containers can mount whole directories on the same drive as $env:ProgramData. * Windows containers cannot mount directories on a different drive, and mount point cannot be across * drives. */ public List mountPoints() { return mountPoints; } /** *

    * Data volumes to mount from another container. This parameter maps to VolumesFrom in the Create a container section of the * Docker Remote API and the --volumes-from * option to docker run. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return Data volumes to mount from another container. This parameter maps to VolumesFrom in the Create a container section * of the Docker Remote API and the * --volumes-from option to docker * run. */ public List volumesFrom() { return volumesFrom; } /** *

    * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information see KernelCapabilities. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    * * @return Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information see KernelCapabilities.

    *

    * This parameter is not supported for Windows containers. *

    */ public LinuxParameters linuxParameters() { return linuxParameters; } /** *

    * The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. */ public List secrets() { return secrets; } /** *

    * The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When * a dependency is defined for container startup, for container shutdown it is reversed. *

    *

    * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable container dependencies. However, we recommend using the latest container agent version. For * information about checking your agent version and updating to the latest version, see Updating the Amazon ECS * Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an Amazon * ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init package. If * your container instances are launched from version 20190301 or later, then they contain the required * versions of the container agent and ecs-init. For more information, see Amazon ECS-optimized * Linux AMI in the Amazon Elastic Container Service Developer Guide. *

    *

    * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the * task or service requires platform version 1.3.0 or later. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The dependencies defined for container startup and shutdown. A container can contain multiple * dependencies. When a dependency is defined for container startup, for container shutdown it is * reversed.

    *

    * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the * container agent to enable container dependencies. However, we recommend using the latest container agent * version. For information about checking your agent version and updating to the latest version, see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are * using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

    *

    * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only * and the task or service requires platform version 1.3.0 or later. */ public List dependsOn() { return dependsOn; } /** *

    * Time duration to wait before giving up on resolving dependencies for a container. For example, you specify two * containers in a task definition with containerA having a dependency on containerB reaching a * COMPLETE, SUCCESS, or HEALTHY status. If a startTimeout value * is specified for containerB and it does not reach the desired status within that time then containerA will give * up and not start. This results in the task transitioning to a STOPPED state. *

    *

    * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable a container start timeout value. However, we recommend using the latest container agent version. * For information about checking your agent version and updating to the latest version, see Updating the Amazon ECS * Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an Amazon * ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init package. If * your container instances are launched from version 20190301 or later, then they contain the required * versions of the container agent and ecs-init. For more information, see Amazon ECS-optimized * Linux AMI in the Amazon Elastic Container Service Developer Guide. *

    *

    * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the * task or service requires platform version 1.3.0 or later. *

    * * @return Time duration to wait before giving up on resolving dependencies for a container. For example, you * specify two containers in a task definition with containerA having a dependency on containerB reaching a * COMPLETE, SUCCESS, or HEALTHY status. If a * startTimeout value is specified for containerB and it does not reach the desired status * within that time then containerA will give up and not start. This results in the task transitioning to a * STOPPED state.

    *

    * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the * container agent to enable a container start timeout value. However, we recommend using the latest * container agent version. For information about checking your agent version and updating to the latest * version, see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are * using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

    *

    * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only * and the task or service requires platform version 1.3.0 or later. */ public Integer startTimeout() { return startTimeout; } /** *

    * Time duration to wait before the container is forcefully killed if it doesn't exit normally on its own. For tasks * using the Fargate launch type, the max stopTimeout value is 2 minutes. This parameter is available * for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the task or service requires * platform version 1.3.0 or later. *

    *

    * For tasks using the EC2 launch type, the stop timeout value for the container takes precedence over the * ECS_CONTAINER_STOP_TIMEOUT container agent configuration parameter, if used. Container instances * require at least version 1.26.0 of the container agent to enable a container stop timeout value. However, we * recommend using the latest container agent version. For information about checking your agent version and * updating to the latest version, see Updating the Amazon ECS * Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an Amazon * ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init package. If * your container instances are launched from version 20190301 or later, then they contain the required * versions of the container agent and ecs-init. For more information, see Amazon ECS-optimized * Linux AMI in the Amazon Elastic Container Service Developer Guide. *

    * * @return Time duration to wait before the container is forcefully killed if it doesn't exit normally on its own. * For tasks using the Fargate launch type, the max stopTimeout value is 2 minutes. This * parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and * the task or service requires platform version 1.3.0 or later.

    *

    * For tasks using the EC2 launch type, the stop timeout value for the container takes precedence over the * ECS_CONTAINER_STOP_TIMEOUT container agent configuration parameter, if used. Container * instances require at least version 1.26.0 of the container agent to enable a container stop timeout * value. However, we recommend using the latest container agent version. For information about checking * your agent version and updating to the latest version, see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are * using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. */ public Integer stopTimeout() { return stopTimeout; } /** *

    * The hostname to use for your container. This parameter maps to Hostname in the Create a container section of the * Docker Remote API and the --hostname option * to docker run. *

    * *

    * The hostname parameter is not supported if you are using the awsvpc network mode. *

    *
    * * @return The hostname to use for your container. This parameter maps to Hostname in the Create a container section * of the Docker Remote API and the * --hostname option to docker * run.

    *

    * The hostname parameter is not supported if you are using the awsvpc network * mode. *

    */ public String hostname() { return hostname; } /** *

    * The user name to use inside the container. This parameter maps to User in the Create a container section of the * Docker Remote API and the --user option to * docker run. *

    *

    * You can use the following formats. If specifying a UID or GID, you must specify it as a positive integer. *

    *
      *
    • *

      * user *

      *
    • *
    • *

      * user:group *

      *
    • *
    • *

      * uid *

      *
    • *
    • *

      * uid:gid *

      *
    • *
    • *

      * user:gid *

      *
    • *
    • *

      * uid:group *

      *
    • *
    * *

    * This parameter is not supported for Windows containers. *

    *
    * * @return The user name to use inside the container. This parameter maps to User in the Create a container section * of the Docker Remote API and the * --user option to docker run.

    *

    * You can use the following formats. If specifying a UID or GID, you must specify it as a positive integer. *

    *
      *
    • *

      * user *

      *
    • *
    • *

      * user:group *

      *
    • *
    • *

      * uid *

      *
    • *
    • *

      * uid:gid *

      *
    • *
    • *

      * user:gid *

      *
    • *
    • *

      * uid:group *

      *
    • *
    * *

    * This parameter is not supported for Windows containers. *

    */ public String user() { return user; } /** *

    * The working directory in which to run commands inside the container. This parameter maps to * WorkingDir in the Create a container section of the * Docker Remote API and the --workdir option * to docker run. *

    * * @return The working directory in which to run commands inside the container. This parameter maps to * WorkingDir in the Create a container section * of the Docker Remote API and the * --workdir option to docker run. */ public String workingDirectory() { return workingDirectory; } /** *

    * When this parameter is true, networking is disabled within the container. This parameter maps to * NetworkDisabled in the Create a container section of the * Docker Remote API. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    * * @return When this parameter is true, networking is disabled within the container. This parameter maps to * NetworkDisabled in the Create a container section * of the Docker Remote API.

    *

    * This parameter is not supported for Windows containers. *

    */ public Boolean disableNetworking() { return disableNetworking; } /** *

    * When this parameter is true, the container is given elevated privileges on the host container instance (similar * to the root user). This parameter maps to Privileged in the Create a container section of the * Docker Remote API and the --privileged * option to docker run. *

    * *

    * This parameter is not supported for Windows containers or tasks using the Fargate launch type. *

    *
    * * @return When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a container section * of the Docker Remote API and the * --privileged option to docker * run.

    *

    * This parameter is not supported for Windows containers or tasks using the Fargate launch type. *

    */ public Boolean privileged() { return privileged; } /** *

    * When this parameter is true, the container is given read-only access to its root file system. This parameter maps * to ReadonlyRootfs in the Create a container section of the * Docker Remote API and the --read-only option * to docker run. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    * * @return When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container section * of the Docker Remote API and the * --read-only option to docker * run.

    *

    * This parameter is not supported for Windows containers. *

    */ public Boolean readonlyRootFilesystem() { return readonlyRootFilesystem; } /** *

    * A list of DNS servers that are presented to the container. This parameter maps to Dns in the Create a container section of the * Docker Remote API and the --dns option to docker run. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of DNS servers that are presented to the container. This parameter maps to Dns in the * Create a container * section of the Docker Remote API and the * --dns option to docker run.

    * *

    * This parameter is not supported for Windows containers. *

    */ public List dnsServers() { return dnsServers; } /** *

    * A list of DNS search domains that are presented to the container. This parameter maps to DnsSearch * in the Create a container * section of the Docker Remote API and the * --dns-search option to docker run. *

    * *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of DNS search domains that are presented to the container. This parameter maps to * DnsSearch in the Create a container section * of the Docker Remote API and the * --dns-search option to docker * run.

    *

    * This parameter is not supported for Windows containers. *

    */ public List dnsSearchDomains() { return dnsSearchDomains; } /** *

    * A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. This * parameter maps to ExtraHosts in the Create a container section of the * Docker Remote API and the --add-host option * to docker run. *

    * *

    * This parameter is not supported for Windows containers or tasks that use the awsvpc network mode. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of hostnames and IP address mappings to append to the /etc/hosts file on the * container. This parameter maps to ExtraHosts in the Create a container section * of the Docker Remote API and the * --add-host option to docker * run.

    *

    * This parameter is not supported for Windows containers or tasks that use the awsvpc network * mode. *

    */ public List extraHosts() { return extraHosts; } /** *

    * A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This field is * not valid for containers in tasks using the Fargate launch type. *

    *

    * This parameter maps to SecurityOpt in the Create a container section of the * Docker Remote API and the --security-opt * option to docker run. *

    * *

    * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables before * containers placed on that instance can use these security options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

    *
    *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This * field is not valid for containers in tasks using the Fargate launch type.

    *

    * This parameter maps to SecurityOpt in the Create a container section * of the Docker Remote API and the * --security-opt option to docker * run. *

    * *

    * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables * before containers placed on that instance can use these security options. For more information, see Amazon ECS * Container Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

    *
    *

    * This parameter is not supported for Windows containers. *

    */ public List dockerSecurityOptions() { return dockerSecurityOptions; } /** *

    * When this parameter is true, this allows you to deploy containerized applications that require * stdin or a tty to be allocated. This parameter maps to OpenStdin in the Create a container section of the * Docker Remote API and the --interactive * option to docker run. *

    * * @return When this parameter is true, this allows you to deploy containerized applications that * require stdin or a tty to be allocated. This parameter maps to * OpenStdin in the Create a container section * of the Docker Remote API and the * --interactive option to docker * run. */ public Boolean interactive() { return interactive; } /** *

    * When this parameter is true, a TTY is allocated. This parameter maps to Tty in the Create a container section of the * Docker Remote API and the --tty option to docker run. *

    * * @return When this parameter is true, a TTY is allocated. This parameter maps to Tty in * the Create a container * section of the Docker Remote API and the * --tty option to docker run. */ public Boolean pseudoTerminal() { return pseudoTerminal; } /** *

    * A key/value map of labels to add to the container. This parameter maps to Labels in the Create a container section of the * Docker Remote API and the --label option to * docker run. This parameter requires version 1.18 of * the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your * container instance, log in to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}' *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A key/value map of labels to add to the container. This parameter maps to Labels in the Create a container section * of the Docker Remote API and the * --label option to docker run. * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' */ public Map dockerLabels() { return dockerLabels; } /** *

    * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of the * Docker Remote API and the --ulimit option to * docker run. Valid naming values are displayed in the * Ulimit data type. This parameter requires version 1.18 of the Docker Remote API or greater on your * container instance. To check the Docker Remote API version on your container instance, log in to your container * instance and run the following command: sudo docker version --format '{{.Server.APIVersion}}' *

    * *

    * This parameter is not supported for Windows containers. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of ulimits to set in the container. This parameter maps to Ulimits in * the Create a container * section of the Docker Remote API and the * --ulimit option to docker run. * Valid naming values are displayed in the Ulimit data type. This parameter requires version 1.18 of * the Docker Remote API or greater on your container instance. To check the Docker Remote API version on * your container instance, log in to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}'

    *

    * This parameter is not supported for Windows containers. *

    */ public List ulimits() { return ulimits; } /** *

    * The log configuration specification for the container. *

    *

    * This parameter maps to LogConfig in the Create a container section of the * Docker Remote API and the --log-driver * option to docker run. By default, containers use the * same logging driver that the Docker daemon uses. However the container may use a different logging driver than * the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different * logging driver for a container, the log system must be configured properly on the container instance (or on a * different log server for remote logging options). For more information on the options for different supported log * drivers, see Configure logging drivers in * the Docker documentation. *

    * *

    * Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the Amazon ECS * container agent. *

    *
    *

    * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the * Docker Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}' *

    * *

    * The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers placed * on that instance can use these log configuration options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

    *
    * * @return The log configuration specification for the container.

    *

    * This parameter maps to LogConfig in the Create a container section * of the Docker Remote API and the * --log-driver option to docker * run. By default, containers use the same logging driver that the Docker daemon uses. However the * container may use a different logging driver than the Docker daemon by specifying a log driver with this * parameter in the container definition. To use a different logging driver for a container, the log system * must be configured properly on the container instance (or on a different log server for remote logging * options). For more information on the options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

    * *

    * Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in * the LogConfiguration data type). Additional log drivers may be available in future releases of the * Amazon ECS container agent. *

    *
    *

    * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To * check the Docker Remote API version on your container instance, log in to your container instance and run * the following command: sudo docker version --format '{{.Server.APIVersion}}' *

    * *

    * The Amazon ECS container agent running on a container instance must register the logging drivers * available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable * before containers placed on that instance can use these log configuration options. For more information, * see Amazon * ECS Container Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

    */ public LogConfiguration logConfiguration() { return logConfiguration; } /** *

    * The health check command and associated configuration parameters for the container. This parameter maps to * HealthCheck in the Create a container section of the * Docker Remote API and the HEALTHCHECK * parameter of docker run. *

    * * @return The health check command and associated configuration parameters for the container. This parameter maps * to HealthCheck in the Create a container section * of the Docker Remote API and the * HEALTHCHECK parameter of docker * run. */ public HealthCheck healthCheck() { return healthCheck; } /** *

    * A list of namespaced kernel parameters to set in the container. This parameter maps to Sysctls in * the Create a container section * of the Docker Remote API and the --sysctl * option to docker run. *

    * *

    * It is not recommended that you specify network-related systemControls parameters for multiple * containers in a single task that also uses either the awsvpc or host network modes. For * tasks that use the awsvpc network mode, the container that is started last determines which * systemControls parameters take effect. For tasks that use the host network mode, it * changes the container instance's namespaced kernel parameters as well as the containers. *

    *
    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return A list of namespaced kernel parameters to set in the container. This parameter maps to * Sysctls in the Create a container section * of the Docker Remote API and the * --sysctl option to docker * run.

    *

    * It is not recommended that you specify network-related systemControls parameters for * multiple containers in a single task that also uses either the awsvpc or host * network modes. For tasks that use the awsvpc network mode, the container that is started * last determines which systemControls parameters take effect. For tasks that use the * host network mode, it changes the container instance's namespaced kernel parameters as well * as the containers. *

    */ public List systemControls() { return systemControls; } /** *

    * The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

    *

    * Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

    * * @return The type and amount of a resource to assign to a container. The only supported resource is a GPU. */ public List resourceRequirements() { return resourceRequirements; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(name()); hashCode = 31 * hashCode + Objects.hashCode(image()); hashCode = 31 * hashCode + Objects.hashCode(repositoryCredentials()); hashCode = 31 * hashCode + Objects.hashCode(cpu()); hashCode = 31 * hashCode + Objects.hashCode(memory()); hashCode = 31 * hashCode + Objects.hashCode(memoryReservation()); hashCode = 31 * hashCode + Objects.hashCode(links()); hashCode = 31 * hashCode + Objects.hashCode(portMappings()); hashCode = 31 * hashCode + Objects.hashCode(essential()); hashCode = 31 * hashCode + Objects.hashCode(entryPoint()); hashCode = 31 * hashCode + Objects.hashCode(command()); hashCode = 31 * hashCode + Objects.hashCode(environment()); hashCode = 31 * hashCode + Objects.hashCode(mountPoints()); hashCode = 31 * hashCode + Objects.hashCode(volumesFrom()); hashCode = 31 * hashCode + Objects.hashCode(linuxParameters()); hashCode = 31 * hashCode + Objects.hashCode(secrets()); hashCode = 31 * hashCode + Objects.hashCode(dependsOn()); hashCode = 31 * hashCode + Objects.hashCode(startTimeout()); hashCode = 31 * hashCode + Objects.hashCode(stopTimeout()); hashCode = 31 * hashCode + Objects.hashCode(hostname()); hashCode = 31 * hashCode + Objects.hashCode(user()); hashCode = 31 * hashCode + Objects.hashCode(workingDirectory()); hashCode = 31 * hashCode + Objects.hashCode(disableNetworking()); hashCode = 31 * hashCode + Objects.hashCode(privileged()); hashCode = 31 * hashCode + Objects.hashCode(readonlyRootFilesystem()); hashCode = 31 * hashCode + Objects.hashCode(dnsServers()); hashCode = 31 * hashCode + Objects.hashCode(dnsSearchDomains()); hashCode = 31 * hashCode + Objects.hashCode(extraHosts()); hashCode = 31 * hashCode + Objects.hashCode(dockerSecurityOptions()); hashCode = 31 * hashCode + Objects.hashCode(interactive()); hashCode = 31 * hashCode + Objects.hashCode(pseudoTerminal()); hashCode = 31 * hashCode + Objects.hashCode(dockerLabels()); hashCode = 31 * hashCode + Objects.hashCode(ulimits()); hashCode = 31 * hashCode + Objects.hashCode(logConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(healthCheck()); hashCode = 31 * hashCode + Objects.hashCode(systemControls()); hashCode = 31 * hashCode + Objects.hashCode(resourceRequirements()); return hashCode; } @Override public boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof ContainerDefinition)) { return false; } ContainerDefinition other = (ContainerDefinition) obj; return Objects.equals(name(), other.name()) && Objects.equals(image(), other.image()) && Objects.equals(repositoryCredentials(), other.repositoryCredentials()) && Objects.equals(cpu(), other.cpu()) && Objects.equals(memory(), other.memory()) && Objects.equals(memoryReservation(), other.memoryReservation()) && Objects.equals(links(), other.links()) && Objects.equals(portMappings(), other.portMappings()) && Objects.equals(essential(), other.essential()) && Objects.equals(entryPoint(), other.entryPoint()) && Objects.equals(command(), other.command()) && Objects.equals(environment(), other.environment()) && Objects.equals(mountPoints(), other.mountPoints()) && Objects.equals(volumesFrom(), other.volumesFrom()) && Objects.equals(linuxParameters(), other.linuxParameters()) && Objects.equals(secrets(), other.secrets()) && Objects.equals(dependsOn(), other.dependsOn()) && Objects.equals(startTimeout(), other.startTimeout()) && Objects.equals(stopTimeout(), other.stopTimeout()) && Objects.equals(hostname(), other.hostname()) && Objects.equals(user(), other.user()) && Objects.equals(workingDirectory(), other.workingDirectory()) && Objects.equals(disableNetworking(), other.disableNetworking()) && Objects.equals(privileged(), other.privileged()) && Objects.equals(readonlyRootFilesystem(), other.readonlyRootFilesystem()) && Objects.equals(dnsServers(), other.dnsServers()) && Objects.equals(dnsSearchDomains(), other.dnsSearchDomains()) && Objects.equals(extraHosts(), other.extraHosts()) && Objects.equals(dockerSecurityOptions(), other.dockerSecurityOptions()) && Objects.equals(interactive(), other.interactive()) && Objects.equals(pseudoTerminal(), other.pseudoTerminal()) && Objects.equals(dockerLabels(), other.dockerLabels()) && Objects.equals(ulimits(), other.ulimits()) && Objects.equals(logConfiguration(), other.logConfiguration()) && Objects.equals(healthCheck(), other.healthCheck()) && Objects.equals(systemControls(), other.systemControls()) && Objects.equals(resourceRequirements(), other.resourceRequirements()); } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("ContainerDefinition").add("Name", name()).add("Image", image()) .add("RepositoryCredentials", repositoryCredentials()).add("Cpu", cpu()).add("Memory", memory()) .add("MemoryReservation", memoryReservation()).add("Links", links()).add("PortMappings", portMappings()) .add("Essential", essential()).add("EntryPoint", entryPoint()).add("Command", command()) .add("Environment", environment()).add("MountPoints", mountPoints()).add("VolumesFrom", volumesFrom()) .add("LinuxParameters", linuxParameters()).add("Secrets", secrets()).add("DependsOn", dependsOn()) .add("StartTimeout", startTimeout()).add("StopTimeout", stopTimeout()).add("Hostname", hostname()) .add("User", user()).add("WorkingDirectory", workingDirectory()).add("DisableNetworking", disableNetworking()) .add("Privileged", privileged()).add("ReadonlyRootFilesystem", readonlyRootFilesystem()) .add("DnsServers", dnsServers()).add("DnsSearchDomains", dnsSearchDomains()).add("ExtraHosts", extraHosts()) .add("DockerSecurityOptions", dockerSecurityOptions()).add("Interactive", interactive()) .add("PseudoTerminal", pseudoTerminal()).add("DockerLabels", dockerLabels()).add("Ulimits", ulimits()) .add("LogConfiguration", logConfiguration()).add("HealthCheck", healthCheck()) .add("SystemControls", systemControls()).add("ResourceRequirements", resourceRequirements()).build(); } public Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "name": return Optional.ofNullable(clazz.cast(name())); case "image": return Optional.ofNullable(clazz.cast(image())); case "repositoryCredentials": return Optional.ofNullable(clazz.cast(repositoryCredentials())); case "cpu": return Optional.ofNullable(clazz.cast(cpu())); case "memory": return Optional.ofNullable(clazz.cast(memory())); case "memoryReservation": return Optional.ofNullable(clazz.cast(memoryReservation())); case "links": return Optional.ofNullable(clazz.cast(links())); case "portMappings": return Optional.ofNullable(clazz.cast(portMappings())); case "essential": return Optional.ofNullable(clazz.cast(essential())); case "entryPoint": return Optional.ofNullable(clazz.cast(entryPoint())); case "command": return Optional.ofNullable(clazz.cast(command())); case "environment": return Optional.ofNullable(clazz.cast(environment())); case "mountPoints": return Optional.ofNullable(clazz.cast(mountPoints())); case "volumesFrom": return Optional.ofNullable(clazz.cast(volumesFrom())); case "linuxParameters": return Optional.ofNullable(clazz.cast(linuxParameters())); case "secrets": return Optional.ofNullable(clazz.cast(secrets())); case "dependsOn": return Optional.ofNullable(clazz.cast(dependsOn())); case "startTimeout": return Optional.ofNullable(clazz.cast(startTimeout())); case "stopTimeout": return Optional.ofNullable(clazz.cast(stopTimeout())); case "hostname": return Optional.ofNullable(clazz.cast(hostname())); case "user": return Optional.ofNullable(clazz.cast(user())); case "workingDirectory": return Optional.ofNullable(clazz.cast(workingDirectory())); case "disableNetworking": return Optional.ofNullable(clazz.cast(disableNetworking())); case "privileged": return Optional.ofNullable(clazz.cast(privileged())); case "readonlyRootFilesystem": return Optional.ofNullable(clazz.cast(readonlyRootFilesystem())); case "dnsServers": return Optional.ofNullable(clazz.cast(dnsServers())); case "dnsSearchDomains": return Optional.ofNullable(clazz.cast(dnsSearchDomains())); case "extraHosts": return Optional.ofNullable(clazz.cast(extraHosts())); case "dockerSecurityOptions": return Optional.ofNullable(clazz.cast(dockerSecurityOptions())); case "interactive": return Optional.ofNullable(clazz.cast(interactive())); case "pseudoTerminal": return Optional.ofNullable(clazz.cast(pseudoTerminal())); case "dockerLabels": return Optional.ofNullable(clazz.cast(dockerLabels())); case "ulimits": return Optional.ofNullable(clazz.cast(ulimits())); case "logConfiguration": return Optional.ofNullable(clazz.cast(logConfiguration())); case "healthCheck": return Optional.ofNullable(clazz.cast(healthCheck())); case "systemControls": return Optional.ofNullable(clazz.cast(systemControls())); case "resourceRequirements": return Optional.ofNullable(clazz.cast(resourceRequirements())); default: return Optional.empty(); } } @Override public List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((ContainerDefinition) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

    * The name of a container. If you are linking multiple containers together in a task definition, the * name of one container can be entered in the links of another container to connect * the containers. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. This parameter * maps to name in the Create a container section of * the Docker Remote API and the --name * option to docker run. *

    * * @param name * The name of a container. If you are linking multiple containers together in a task definition, the * name of one container can be entered in the links of another container to * connect the containers. Up to 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. * This parameter maps to name in the Create a container * section of the Docker Remote API and the * --name option to docker run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder name(String name); /** *

    * The image used to start a container. This string is passed directly to the Docker daemon. Images in the * Docker Hub registry are available by default. Other repositories are specified with either * repository-url/image:tag or * repository-url/image@digest . Up to 255 letters (uppercase and lowercase), * numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are allowed. This parameter * maps to Image in the Create a container section of * the Docker Remote API and the IMAGE * parameter of docker run. *

    *
      *
    • *

      * When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and * tag for the container to use. However, subsequent updates to a repository image are not propagated to already * running tasks. *

      *
    • *
    • *

      * Images in Amazon ECR repositories can be specified by either using the full * registry/repository:tag or registry/repository@digest. For example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE * . *

      *
    • *
    • *

      * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

      *
    • *
    • *

      * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

      *
    • *
    • *

      * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

      *
    • *
    * * @param image * The image used to start a container. This string is passed directly to the Docker daemon. Images in * the Docker Hub registry are available by default. Other repositories are specified with either * repository-url/image:tag or * repository-url/image@digest . Up to 255 letters (uppercase and * lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs are * allowed. This parameter maps to Image in the Create a container * section of the Docker Remote API and the * IMAGE parameter of docker * run.

    *
      *
    • *

      * When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image * and tag for the container to use. However, subsequent updates to a repository image are not propagated * to already running tasks. *

      *
    • *
    • *

      * Images in Amazon ECR repositories can be specified by either using the full * registry/repository:tag or registry/repository@digest. For example, * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest or * 012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE * . *

      *
    • *
    • *

      * Images in official repositories on Docker Hub use a single name (for example, ubuntu or * mongo). *

      *
    • *
    • *

      * Images in other repositories on Docker Hub are qualified with an organization name (for example, * amazon/amazon-ecs-agent). *

      *
    • *
    • *

      * Images in other online repositories are qualified further by a domain name (for example, * quay.io/assemblyline/ubuntu). *

      *
    • * @return Returns a reference to this object so that method calls can be chained together. */ Builder image(String image); /** *

      * The private repository authentication credentials to use. *

      * * @param repositoryCredentials * The private repository authentication credentials to use. * @return Returns a reference to this object so that method calls can be chained together. */ Builder repositoryCredentials(RepositoryCredentials repositoryCredentials); /** *

      * The private repository authentication credentials to use. *

      * This is a convenience that creates an instance of the {@link RepositoryCredentials.Builder} avoiding the need * to create one manually via {@link RepositoryCredentials#builder()}. * * When the {@link Consumer} completes, {@link RepositoryCredentials.Builder#build()} is called immediately and * its result is passed to {@link #repositoryCredentials(RepositoryCredentials)}. * * @param repositoryCredentials * a consumer that will call methods on {@link RepositoryCredentials.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #repositoryCredentials(RepositoryCredentials) */ default Builder repositoryCredentials(Consumer repositoryCredentials) { return repositoryCredentials(RepositoryCredentials.builder().applyMutation(repositoryCredentials).build()); } /** *

      * The number of cpu units reserved for the container. This parameter maps to * CpuShares in the Create a container section of * the Docker Remote API and the * --cpu-shares option to docker run. *

      *

      * This field is optional for tasks using the Fargate launch type, and the only requirement is that the total * amount of CPU reserved for all containers within a task be lower than the task-level cpu value. *

      * *

      * You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs * listed for that instance type on the Amazon EC2 * Instances detail page by 1,024. *

      *
      *

      * For example, if you run a single-container task on a single-core instance type with 512 CPU units specified * for that container, and that is the only task running on the container instance, that container could use the * full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that * container instance, each task would be guaranteed a minimum of 512 CPU units when needed, and each container * could float to higher CPU usage if the other container was not using it, but if both tasks were 100% active * all of the time, they would be limited to 512 CPU units. *

      *

      * Linux containers share unallocated CPU units with other containers on the container instance with the same * ratio as their allocated amount. For example, if you run a single-container task on a single-core instance * type with 512 CPU units specified for that container, and that is the only task running on the container * instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched * another copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU * units when needed, and each container could float to higher CPU usage if the other container was not using * it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units. *

      *

      * On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate the * relative CPU share ratios for running containers. For more information, see CPU share constraint in the * Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2. However, the CPU * parameter is not required, and you can use CPU values below 2 in your container definitions. For CPU values * below 2 (including null), the behavior varies based on your Amazon ECS container agent version: *

      *
        *
      • *

        * Agent versions less than or equal to 1.1.0: Null and zero CPU values are passed to Docker as 0, which * Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the Linux kernel * converts to two CPU shares. *

        *
      • *
      • *

        * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values of 1 are passed to Docker as * 2. *

        *
      • *
      *

      * On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows * containers only have access to the specified amount of CPU that is described in the task definition. *

      * * @param cpu * The number of cpu units reserved for the container. This parameter maps to * CpuShares in the Create a container * section of the Docker Remote API and the * --cpu-shares option to docker * run.

      *

      * This field is optional for tasks using the Fargate launch type, and the only requirement is that the * total amount of CPU reserved for all containers within a task be lower than the task-level * cpu value. *

      * *

      * You can determine the number of CPU units that are available per EC2 instance type by multiplying the * vCPUs listed for that instance type on the Amazon * EC2 Instances detail page by 1,024. *

      *
      *

      * For example, if you run a single-container task on a single-core instance type with 512 CPU units * specified for that container, and that is the only task running on the container instance, that * container could use the full 1,024 CPU unit share at any given time. However, if you launched another * copy of the same task on that container instance, each task would be guaranteed a minimum of 512 CPU * units when needed, and each container could float to higher CPU usage if the other container was not * using it, but if both tasks were 100% active all of the time, they would be limited to 512 CPU units. *

      *

      * Linux containers share unallocated CPU units with other containers on the container instance with the * same ratio as their allocated amount. For example, if you run a single-container task on a single-core * instance type with 512 CPU units specified for that container, and that is the only task running on * the container instance, that container could use the full 1,024 CPU unit share at any given time. * However, if you launched another copy of the same task on that container instance, each task would be * guaranteed a minimum of 512 CPU units when needed, and each container could float to higher CPU usage * if the other container was not using it, but if both tasks were 100% active all of the time, they * would be limited to 512 CPU units. *

      *

      * On Linux container instances, the Docker daemon on the container instance uses the CPU value to * calculate the relative CPU share ratios for running containers. For more information, see CPU share constraint in * the Docker documentation. The minimum valid CPU share value that the Linux kernel allows is 2. * However, the CPU parameter is not required, and you can use CPU values below 2 in your container * definitions. For CPU values below 2 (including null), the behavior varies based on your Amazon ECS * container agent version: *

      *
        *
      • *

        * Agent versions less than or equal to 1.1.0: Null and zero CPU values are passed to Docker as 0, * which Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the * Linux kernel converts to two CPU shares. *

        *
      • *
      • *

        * Agent versions greater than or equal to 1.2.0: Null, zero, and CPU values of 1 are passed to * Docker as 2. *

        *
      • *
      *

      * On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows * containers only have access to the specified amount of CPU that is described in the task definition. * @return Returns a reference to this object so that method calls can be chained together. */ Builder cpu(Integer cpu); /** *

      * The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory * specified here, the container is killed. The total amount of memory reserved for all containers within a task * must be lower than the task memory value, if one is specified. This parameter maps to * Memory in the Create a container section of * the Docker Remote API and the --memory * option to docker run. *

      *

      * If your containers are part of a task using the Fargate launch type, this field is optional. *

      *

      * For containers that are part of a task using the EC2 launch type, you must specify a non-zero integer for one * or both of memory or memoryReservation in container definitions. If you specify * both, memory must be greater than memoryReservation. If you specify * memoryReservation, then that value is subtracted from the available memory resources for the * container instance on which the container is placed. Otherwise, the value of memory is used. *

      *

      * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than * 4 MiB of memory for your containers. *

      * * @param memory * The amount (in MiB) of memory to present to the container. If your container attempts to exceed the * memory specified here, the container is killed. The total amount of memory reserved for all containers * within a task must be lower than the task memory value, if one is specified. This * parameter maps to Memory in the Create a container * section of the Docker Remote API and the * --memory option to docker * run.

      *

      * If your containers are part of a task using the Fargate launch type, this field is optional. *

      *

      * For containers that are part of a task using the EC2 launch type, you must specify a non-zero integer * for one or both of memory or memoryReservation in container definitions. If * you specify both, memory must be greater than memoryReservation. If you * specify memoryReservation, then that value is subtracted from the available memory * resources for the container instance on which the container is placed. Otherwise, the value of * memory is used. *

      *

      * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify * fewer than 4 MiB of memory for your containers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memory(Integer memory); /** *

      * The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, * Docker attempts to keep the container memory to this soft limit. However, your container can consume more * memory when it needs to, up to either the hard limit specified with the memory parameter (if * applicable), or all of the available memory on the container instance, whichever comes first. This parameter * maps to MemoryReservation in the Create a container section of * the Docker Remote API and the * --memory-reservation option to docker * run. *

      *

      * You must specify a non-zero integer for one or both of memory or memoryReservation * in container definitions. If you specify both, memory must be greater than * memoryReservation. If you specify memoryReservation, then that value is subtracted * from the available memory resources for the container instance on which the container is placed. Otherwise, * the value of memory is used. *

      *

      * For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory * for short periods of time, you can set a memoryReservation of 128 MiB, and a memory * hard limit of 300 MiB. This configuration would allow the container to only reserve 128 MiB of memory from * the remaining resources on the container instance, but also allow the container to consume more memory * resources when needed. *

      *

      * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than * 4 MiB of memory for your containers. *

      * * @param memoryReservation * The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy * contention, Docker attempts to keep the container memory to this soft limit. However, your container * can consume more memory when it needs to, up to either the hard limit specified with the * memory parameter (if applicable), or all of the available memory on the container * instance, whichever comes first. This parameter maps to MemoryReservation in the Create a container * section of the Docker Remote API and the * --memory-reservation option to docker run.

      *

      * You must specify a non-zero integer for one or both of memory or * memoryReservation in container definitions. If you specify both, memory must * be greater than memoryReservation. If you specify memoryReservation, then * that value is subtracted from the available memory resources for the container instance on which the * container is placed. Otherwise, the value of memory is used. *

      *

      * For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of * memory for short periods of time, you can set a memoryReservation of 128 MiB, and a * memory hard limit of 300 MiB. This configuration would allow the container to only * reserve 128 MiB of memory from the remaining resources on the container instance, but also allow the * container to consume more memory resources when needed. *

      *

      * The Docker daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify * fewer than 4 MiB of memory for your containers. * @return Returns a reference to this object so that method calls can be chained together. */ Builder memoryReservation(Integer memoryReservation); /** *

      * The links parameter allows containers to communicate with each other without the need for port * mappings. This parameter is only supported if the network mode of a task definition is bridge. * The name:internalName construct is analogous to name:alias in Docker links. Up to * 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. For more information about linking * Docker containers, go to Legacy container links in the * Docker documentation. This parameter maps to Links in the Create a container section of * the Docker Remote API and the --link * option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      *

      * Containers that are collocated on a single container instance may be able to communicate with each other * without requiring links or host port mappings. Network isolation is achieved on the container instance using * security groups and VPC settings. *

      *
      * * @param links * The links parameter allows containers to communicate with each other without the need for * port mappings. This parameter is only supported if the network mode of a task definition is * bridge. The name:internalName construct is analogous to * name:alias in Docker links. Up to 255 letters (uppercase and lowercase), numbers, and * hyphens are allowed. For more information about linking Docker containers, go to Legacy container links in the Docker documentation. * This parameter maps to Links in the Create a container * section of the Docker Remote API and the * --link option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      *
      *

      * Containers that are collocated on a single container instance may be able to communicate with each * other without requiring links or host port mappings. Network isolation is achieved on the container * instance using security groups and VPC settings. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder links(Collection links); /** *

      * The links parameter allows containers to communicate with each other without the need for port * mappings. This parameter is only supported if the network mode of a task definition is bridge. * The name:internalName construct is analogous to name:alias in Docker links. Up to * 255 letters (uppercase and lowercase), numbers, and hyphens are allowed. For more information about linking * Docker containers, go to Legacy container links in the * Docker documentation. This parameter maps to Links in the Create a container section of * the Docker Remote API and the --link * option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      *

      * Containers that are collocated on a single container instance may be able to communicate with each other * without requiring links or host port mappings. Network isolation is achieved on the container instance using * security groups and VPC settings. *

      *
      * * @param links * The links parameter allows containers to communicate with each other without the need for * port mappings. This parameter is only supported if the network mode of a task definition is * bridge. The name:internalName construct is analogous to * name:alias in Docker links. Up to 255 letters (uppercase and lowercase), numbers, and * hyphens are allowed. For more information about linking Docker containers, go to Legacy container links in the Docker documentation. * This parameter maps to Links in the Create a container * section of the Docker Remote API and the * --link option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      *
      *

      * Containers that are collocated on a single container instance may be able to communicate with each * other without requiring links or host port mappings. Network isolation is achieved on the container * instance using security groups and VPC settings. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder links(String... links); /** *

      * The list of port mappings for the container. Port mappings allow containers to access ports on the host * container instance to send or receive traffic. *

      *

      * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value as the * containerPort. *

      *

      * Port mappings on Windows use the NetNAT gateway address rather than localhost. * There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the * host itself. *

      *

      * This parameter maps to PortBindings in the Create a container section of * the Docker Remote API and the --publish * option to docker run. If the network mode of a * task definition is set to none, then you can't specify port mappings. If the network mode of a * task definition is set to host, then host ports must either be undefined or they must match the * container port in the port mapping. *

      * *

      * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a selected task * in the Amazon ECS console. The assignments are also visible in the networkBindings section * DescribeTasks responses. *

      *
      * * @param portMappings * The list of port mappings for the container. Port mappings allow containers to access ports on the * host container instance to send or receive traffic.

      *

      * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value * as the containerPort. *

      *

      * Port mappings on Windows use the NetNAT gateway address rather than * localhost. There is no loopback for port mappings on Windows, so you cannot access a * container's mapped port from the host itself. *

      *

      * This parameter maps to PortBindings in the Create a container * section of the Docker Remote API and the * --publish option to docker * run. If the network mode of a task definition is set to none, then you can't specify * port mappings. If the network mode of a task definition is set to host, then host ports * must either be undefined or they must match the container port in the port mapping. *

      * *

      * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a * selected task in the Amazon ECS console. The assignments are also visible in the * networkBindings section DescribeTasks responses. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder portMappings(Collection portMappings); /** *

      * The list of port mappings for the container. Port mappings allow containers to access ports on the host * container instance to send or receive traffic. *

      *

      * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value as the * containerPort. *

      *

      * Port mappings on Windows use the NetNAT gateway address rather than localhost. * There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the * host itself. *

      *

      * This parameter maps to PortBindings in the Create a container section of * the Docker Remote API and the --publish * option to docker run. If the network mode of a * task definition is set to none, then you can't specify port mappings. If the network mode of a * task definition is set to host, then host ports must either be undefined or they must match the * container port in the port mapping. *

      * *

      * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a selected task * in the Amazon ECS console. The assignments are also visible in the networkBindings section * DescribeTasks responses. *

      *
      * * @param portMappings * The list of port mappings for the container. Port mappings allow containers to access ports on the * host container instance to send or receive traffic.

      *

      * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value * as the containerPort. *

      *

      * Port mappings on Windows use the NetNAT gateway address rather than * localhost. There is no loopback for port mappings on Windows, so you cannot access a * container's mapped port from the host itself. *

      *

      * This parameter maps to PortBindings in the Create a container * section of the Docker Remote API and the * --publish option to docker * run. If the network mode of a task definition is set to none, then you can't specify * port mappings. If the network mode of a task definition is set to host, then host ports * must either be undefined or they must match the container port in the port mapping. *

      * *

      * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a * selected task in the Amazon ECS console. The assignments are also visible in the * networkBindings section DescribeTasks responses. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder portMappings(PortMapping... portMappings); /** *

      * The list of port mappings for the container. Port mappings allow containers to access ports on the host * container instance to send or receive traffic. *

      *

      * For task definitions that use the awsvpc network mode, you should only specify the * containerPort. The hostPort can be left blank or it must be the same value as the * containerPort. *

      *

      * Port mappings on Windows use the NetNAT gateway address rather than localhost. * There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the * host itself. *

      *

      * This parameter maps to PortBindings in the Create a container section of * the Docker Remote API and the --publish * option to docker run. If the network mode of a * task definition is set to none, then you can't specify port mappings. If the network mode of a * task definition is set to host, then host ports must either be undefined or they must match the * container port in the port mapping. *

      * *

      * After a task reaches the RUNNING status, manual and automatic host and container port * assignments are visible in the Network Bindings section of a container description for a selected task * in the Amazon ECS console. The assignments are also visible in the networkBindings section * DescribeTasks responses. *

      *
      This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #portMappings(List)}. * * @param portMappings * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #portMappings(List) */ Builder portMappings(Consumer... portMappings); /** *

      * If the essential parameter of a container is marked as true, and that container * fails or stops for any reason, all other containers that are part of the task are stopped. If the * essential parameter of a container is marked as false, then its failure does not * affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be * essential. *

      *

      * All tasks must have at least one essential container. If you have an application that is composed of multiple * containers, you should group containers that are used for a common purpose into components, and separate the * different components into multiple task definitions. For more information, see Application * Architecture in the Amazon Elastic Container Service Developer Guide. *

      * * @param essential * If the essential parameter of a container is marked as true, and that * container fails or stops for any reason, all other containers that are part of the task are stopped. * If the essential parameter of a container is marked as false, then its * failure does not affect the rest of the containers in a task. If this parameter is omitted, a * container is assumed to be essential.

      *

      * All tasks must have at least one essential container. If you have an application that is composed of * multiple containers, you should group containers that are used for a common purpose into components, * and separate the different components into multiple task definitions. For more information, see * Application Architecture in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder essential(Boolean essential); /** * *

      * Early versions of the Amazon ECS container agent do not properly handle entryPoint parameters. * If you have problems using entryPoint, update your container agent or enter your commands and * arguments as command array items instead. *

      *
      *

      * The entry point that is passed to the container. This parameter maps to Entrypoint in the Create a container section of * the Docker Remote API and the * --entrypoint option to docker run. * For more information, see https://docs. * docker.com/engine/reference/builder/#entrypoint. *

      * * @param entryPoint *

      * Early versions of the Amazon ECS container agent do not properly handle entryPoint * parameters. If you have problems using entryPoint, update your container agent or enter * your commands and arguments as command array items instead. *

      *
      *

      * The entry point that is passed to the container. This parameter maps to Entrypoint in the * Create a container * section of the Docker Remote API and the * --entrypoint option to docker * run. For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder entryPoint(Collection entryPoint); /** * *

      * Early versions of the Amazon ECS container agent do not properly handle entryPoint parameters. * If you have problems using entryPoint, update your container agent or enter your commands and * arguments as command array items instead. *

      * *

      * The entry point that is passed to the container. This parameter maps to Entrypoint in the Create a container section of * the Docker Remote API and the * --entrypoint option to docker run. * For more information, see https://docs. * docker.com/engine/reference/builder/#entrypoint. *

      * * @param entryPoint *

      * Early versions of the Amazon ECS container agent do not properly handle entryPoint * parameters. If you have problems using entryPoint, update your container agent or enter * your commands and arguments as command array items instead. *

      * *

      * The entry point that is passed to the container. This parameter maps to Entrypoint in the * Create a container * section of the Docker Remote API and the * --entrypoint option to docker * run. For more information, see https://docs.docker.com/engine/reference/builder/#entrypoint. * @return Returns a reference to this object so that method calls can be chained together. */ Builder entryPoint(String... entryPoint); /** *

      * The command that is passed to the container. This parameter maps to Cmd in the Create a container section of * the Docker Remote API and the COMMAND * parameter to docker run. For more information, * see https://docs.docker.com/engine/reference/ * builder/#cmd. If there are multiple arguments, each argument should be a separated string in the array. *

      * * @param command * The command that is passed to the container. This parameter maps to Cmd in the Create a container * section of the Docker Remote API and the * COMMAND parameter to docker * run. For more information, see https * ://docs.docker.com/engine/reference/builder/#cmd. If there are multiple arguments, each argument * should be a separated string in the array. * @return Returns a reference to this object so that method calls can be chained together. */ Builder command(Collection command); /** *

      * The command that is passed to the container. This parameter maps to Cmd in the Create a container section of * the Docker Remote API and the COMMAND * parameter to docker run. For more information, * see https://docs.docker.com/engine/reference/ * builder/#cmd. If there are multiple arguments, each argument should be a separated string in the array. *

      * * @param command * The command that is passed to the container. This parameter maps to Cmd in the Create a container * section of the Docker Remote API and the * COMMAND parameter to docker * run. For more information, see https * ://docs.docker.com/engine/reference/builder/#cmd. If there are multiple arguments, each argument * should be a separated string in the array. * @return Returns a reference to this object so that method calls can be chained together. */ Builder command(String... command); /** *

      * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of * the Docker Remote API and the --env * option to docker run. *

      * *

      * We do not recommend using plaintext environment variables for sensitive information, such as credential data. *

      *
      * * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a container * section of the Docker Remote API and the * --env option to docker * run.

      *

      * We do not recommend using plaintext environment variables for sensitive information, such as * credential data. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder environment(Collection environment); /** *

      * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of * the Docker Remote API and the --env * option to docker run. *

      * *

      * We do not recommend using plaintext environment variables for sensitive information, such as credential data. *

      *
      * * @param environment * The environment variables to pass to a container. This parameter maps to Env in the Create a container * section of the Docker Remote API and the * --env option to docker * run.

      *

      * We do not recommend using plaintext environment variables for sensitive information, such as * credential data. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder environment(KeyValuePair... environment); /** *

      * The environment variables to pass to a container. This parameter maps to Env in the Create a container section of * the Docker Remote API and the --env * option to docker run. *

      * *

      * We do not recommend using plaintext environment variables for sensitive information, such as credential data. *

      *
      This is a convenience that creates an instance of the {@link List.Builder} * avoiding the need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #environment(List)}. * * @param environment * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #environment(List) */ Builder environment(Consumer... environment); /** *

      * The mount points for data volumes in your container. *

      *

      * This parameter maps to Volumes in the Create a container section of * the Docker Remote API and the --volume * option to docker run. *

      *

      * Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers cannot mount directories on a different drive, and mount point cannot be across drives. *

      * * @param mountPoints * The mount points for data volumes in your container.

      *

      * This parameter maps to Volumes in the Create a container * section of the Docker Remote API and the * --volume option to docker * run. *

      *

      * Windows containers can mount whole directories on the same drive as $env:ProgramData. * Windows containers cannot mount directories on a different drive, and mount point cannot be across * drives. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mountPoints(Collection mountPoints); /** *

      * The mount points for data volumes in your container. *

      *

      * This parameter maps to Volumes in the Create a container section of * the Docker Remote API and the --volume * option to docker run. *

      *

      * Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers cannot mount directories on a different drive, and mount point cannot be across drives. *

      * * @param mountPoints * The mount points for data volumes in your container.

      *

      * This parameter maps to Volumes in the Create a container * section of the Docker Remote API and the * --volume option to docker * run. *

      *

      * Windows containers can mount whole directories on the same drive as $env:ProgramData. * Windows containers cannot mount directories on a different drive, and mount point cannot be across * drives. * @return Returns a reference to this object so that method calls can be chained together. */ Builder mountPoints(MountPoint... mountPoints); /** *

      * The mount points for data volumes in your container. *

      *

      * This parameter maps to Volumes in the Create a container section of * the Docker Remote API and the --volume * option to docker run. *

      *

      * Windows containers can mount whole directories on the same drive as $env:ProgramData. Windows * containers cannot mount directories on a different drive, and mount point cannot be across drives. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #mountPoints(List)}. * * @param mountPoints * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #mountPoints(List) */ Builder mountPoints(Consumer... mountPoints); /** *

      * Data volumes to mount from another container. This parameter maps to VolumesFrom in the Create a container section of * the Docker Remote API and the * --volumes-from option to docker run. *

      * * @param volumesFrom * Data volumes to mount from another container. This parameter maps to VolumesFrom in the * Create a container * section of the Docker Remote API and the * --volumes-from option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder volumesFrom(Collection volumesFrom); /** *

      * Data volumes to mount from another container. This parameter maps to VolumesFrom in the Create a container section of * the Docker Remote API and the * --volumes-from option to docker run. *

      * * @param volumesFrom * Data volumes to mount from another container. This parameter maps to VolumesFrom in the * Create a container * section of the Docker Remote API and the * --volumes-from option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder volumesFrom(VolumeFrom... volumesFrom); /** *

      * Data volumes to mount from another container. This parameter maps to VolumesFrom in the Create a container section of * the Docker Remote API and the * --volumes-from option to docker run. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #volumesFrom(List)}. * * @param volumesFrom * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #volumesFrom(List) */ Builder volumesFrom(Consumer... volumesFrom); /** *

      * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information see KernelCapabilities. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param linuxParameters * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For * more information see KernelCapabilities.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder linuxParameters(LinuxParameters linuxParameters); /** *

      * Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more * information see KernelCapabilities. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      This is a convenience that creates an instance of the {@link LinuxParameters.Builder} avoiding the * need to create one manually via {@link LinuxParameters#builder()}. * * When the {@link Consumer} completes, {@link LinuxParameters.Builder#build()} is called immediately and its * result is passed to {@link #linuxParameters(LinuxParameters)}. * * @param linuxParameters * a consumer that will call methods on {@link LinuxParameters.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #linuxParameters(LinuxParameters) */ default Builder linuxParameters(Consumer linuxParameters) { return linuxParameters(LinuxParameters.builder().applyMutation(linuxParameters).build()); } /** *

      * The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

      * * @param secrets * The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secrets(Collection secrets); /** *

      * The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

      * * @param secrets * The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder secrets(Secret... secrets); /** *

      * The secrets to pass to the container. For more information, see Specifying * Sensitive Data in the Amazon Elastic Container Service Developer Guide. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the need to * create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #secrets(List)}. * * @param secrets * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #secrets(List) */ Builder secrets(Consumer... secrets); /** *

      * The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. * When a dependency is defined for container startup, for container shutdown it is reversed. *

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable container dependencies. However, we recommend using the latest container agent version. For * information about checking your agent version and updating to the latest version, see Updating the Amazon * ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an * Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init * package. If your container instances are launched from version 20190301 or later, then they * contain the required versions of the container agent and ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and * the task or service requires platform version 1.3.0 or later. *

      * * @param dependsOn * The dependencies defined for container startup and shutdown. A container can contain multiple * dependencies. When a dependency is defined for container startup, for container shutdown it is * reversed.

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the * container agent to enable container dependencies. However, we recommend using the latest container * agent version. For information about checking your agent version and updating to the latest version, * see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you * are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region * only and the task or service requires platform version 1.3.0 or later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dependsOn(Collection dependsOn); /** *

      * The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. * When a dependency is defined for container startup, for container shutdown it is reversed. *

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable container dependencies. However, we recommend using the latest container agent version. For * information about checking your agent version and updating to the latest version, see Updating the Amazon * ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an * Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init * package. If your container instances are launched from version 20190301 or later, then they * contain the required versions of the container agent and ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and * the task or service requires platform version 1.3.0 or later. *

      * * @param dependsOn * The dependencies defined for container startup and shutdown. A container can contain multiple * dependencies. When a dependency is defined for container startup, for container shutdown it is * reversed.

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the * container agent to enable container dependencies. However, we recommend using the latest container * agent version. For information about checking your agent version and updating to the latest version, * see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you * are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region * only and the task or service requires platform version 1.3.0 or later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder dependsOn(ContainerDependency... dependsOn); /** *

      * The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. * When a dependency is defined for container startup, for container shutdown it is reversed. *

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable container dependencies. However, we recommend using the latest container agent version. For * information about checking your agent version and updating to the latest version, see Updating the Amazon * ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an * Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init * package. If your container instances are launched from version 20190301 or later, then they * contain the required versions of the container agent and ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and * the task or service requires platform version 1.3.0 or later. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #dependsOn(List)}. * * @param dependsOn * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #dependsOn(List) */ Builder dependsOn(Consumer... dependsOn); /** *

      * Time duration to wait before giving up on resolving dependencies for a container. For example, you specify * two containers in a task definition with containerA having a dependency on containerB reaching a * COMPLETE, SUCCESS, or HEALTHY status. If a startTimeout * value is specified for containerB and it does not reach the desired status within that time then containerA * will give up and not start. This results in the task transitioning to a STOPPED state. *

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container * agent to enable a container start timeout value. However, we recommend using the latest container agent * version. For information about checking your agent version and updating to the latest version, see Updating the Amazon * ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an * Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init * package. If your container instances are launched from version 20190301 or later, then they * contain the required versions of the container agent and ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and * the task or service requires platform version 1.3.0 or later. *

      * * @param startTimeout * Time duration to wait before giving up on resolving dependencies for a container. For example, you * specify two containers in a task definition with containerA having a dependency on containerB reaching * a COMPLETE, SUCCESS, or HEALTHY status. If a * startTimeout value is specified for containerB and it does not reach the desired status * within that time then containerA will give up and not start. This results in the task transitioning to * a STOPPED state.

      *

      * For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the * container agent to enable a container start timeout value. However, we recommend using the latest * container agent version. For information about checking your agent version and updating to the latest * version, see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you * are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      *

      * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region * only and the task or service requires platform version 1.3.0 or later. * @return Returns a reference to this object so that method calls can be chained together. */ Builder startTimeout(Integer startTimeout); /** *

      * Time duration to wait before the container is forcefully killed if it doesn't exit normally on its own. For * tasks using the Fargate launch type, the max stopTimeout value is 2 minutes. This parameter is * available for tasks using the Fargate launch type in the Ohio (us-east-2) region only and the task or service * requires platform version 1.3.0 or later. *

      *

      * For tasks using the EC2 launch type, the stop timeout value for the container takes precedence over the * ECS_CONTAINER_STOP_TIMEOUT container agent configuration parameter, if used. Container instances * require at least version 1.26.0 of the container agent to enable a container stop timeout value. However, we * recommend using the latest container agent version. For information about checking your agent version and * updating to the latest version, see Updating the Amazon * ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you are using an * Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the ecs-init * package. If your container instances are launched from version 20190301 or later, then they * contain the required versions of the container agent and ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. *

      * * @param stopTimeout * Time duration to wait before the container is forcefully killed if it doesn't exit normally on its * own. For tasks using the Fargate launch type, the max stopTimeout value is 2 minutes. * This parameter is available for tasks using the Fargate launch type in the Ohio (us-east-2) region * only and the task or service requires platform version 1.3.0 or later.

      *

      * For tasks using the EC2 launch type, the stop timeout value for the container takes precedence over * the ECS_CONTAINER_STOP_TIMEOUT container agent configuration parameter, if used. * Container instances require at least version 1.26.0 of the container agent to enable a container stop * timeout value. However, we recommend using the latest container agent version. For information about * checking your agent version and updating to the latest version, see Updating the * Amazon ECS Container Agent in the Amazon Elastic Container Service Developer Guide. If you * are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the * ecs-init package. If your container instances are launched from version * 20190301 or later, then they contain the required versions of the container agent and * ecs-init. For more information, see Amazon * ECS-optimized Linux AMI in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder stopTimeout(Integer stopTimeout); /** *

      * The hostname to use for your container. This parameter maps to Hostname in the Create a container section of * the Docker Remote API and the --hostname * option to docker run. *

      * *

      * The hostname parameter is not supported if you are using the awsvpc network mode. *

      *
      * * @param hostname * The hostname to use for your container. This parameter maps to Hostname in the Create a container * section of the Docker Remote API and the * --hostname option to docker * run.

      *

      * The hostname parameter is not supported if you are using the awsvpc network * mode. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder hostname(String hostname); /** *

      * The user name to use inside the container. This parameter maps to User in the Create a container section of * the Docker Remote API and the --user * option to docker run. *

      *

      * You can use the following formats. If specifying a UID or GID, you must specify it as a positive integer. *

      *
        *
      • *

        * user *

        *
      • *
      • *

        * user:group *

        *
      • *
      • *

        * uid *

        *
      • *
      • *

        * uid:gid *

        *
      • *
      • *

        * user:gid *

        *
      • *
      • *

        * uid:group *

        *
      • *
      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param user * The user name to use inside the container. This parameter maps to User in the Create a container * section of the Docker Remote API and the * --user option to docker * run.

      *

      * You can use the following formats. If specifying a UID or GID, you must specify it as a positive * integer. *

      *
        *
      • *

        * user *

        *
      • *
      • *

        * user:group *

        *
      • *
      • *

        * uid *

        *
      • *
      • *

        * uid:gid *

        *
      • *
      • *

        * user:gid *

        *
      • *
      • *

        * uid:group *

        *
      • *
      * *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder user(String user); /** *

      * The working directory in which to run commands inside the container. This parameter maps to * WorkingDir in the Create a container section of * the Docker Remote API and the --workdir * option to docker run. *

      * * @param workingDirectory * The working directory in which to run commands inside the container. This parameter maps to * WorkingDir in the Create a container * section of the Docker Remote API and the * --workdir option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder workingDirectory(String workingDirectory); /** *

      * When this parameter is true, networking is disabled within the container. This parameter maps to * NetworkDisabled in the Create a container section of * the Docker Remote API. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param disableNetworking * When this parameter is true, networking is disabled within the container. This parameter maps to * NetworkDisabled in the Create a container * section of the Docker Remote API.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder disableNetworking(Boolean disableNetworking); /** *

      * When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a container section of * the Docker Remote API and the * --privileged option to docker run. *

      * *

      * This parameter is not supported for Windows containers or tasks using the Fargate launch type. *

      *
      * * @param privileged * When this parameter is true, the container is given elevated privileges on the host container instance * (similar to the root user). This parameter maps to Privileged in the Create a container * section of the Docker Remote API and the * --privileged option to docker * run.

      *

      * This parameter is not supported for Windows containers or tasks using the Fargate launch type. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder privileged(Boolean privileged); /** *

      * When this parameter is true, the container is given read-only access to its root file system. This parameter * maps to ReadonlyRootfs in the Create a container section of * the Docker Remote API and the * --read-only option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param readonlyRootFilesystem * When this parameter is true, the container is given read-only access to its root file system. This * parameter maps to ReadonlyRootfs in the Create a container * section of the Docker Remote API and the * --read-only option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem); /** *

      * A list of DNS servers that are presented to the container. This parameter maps to Dns in the Create a container section of * the Docker Remote API and the --dns * option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dnsServers * A list of DNS servers that are presented to the container. This parameter maps to Dns in * the Create a * container section of the Docker Remote API * and the --dns option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dnsServers(Collection dnsServers); /** *

      * A list of DNS servers that are presented to the container. This parameter maps to Dns in the Create a container section of * the Docker Remote API and the --dns * option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dnsServers * A list of DNS servers that are presented to the container. This parameter maps to Dns in * the Create a * container section of the Docker Remote API * and the --dns option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dnsServers(String... dnsServers); /** *

      * A list of DNS search domains that are presented to the container. This parameter maps to * DnsSearch in the Create a container section of * the Docker Remote API and the * --dns-search option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dnsSearchDomains * A list of DNS search domains that are presented to the container. This parameter maps to * DnsSearch in the Create a container * section of the Docker Remote API and the * --dns-search option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dnsSearchDomains(Collection dnsSearchDomains); /** *

      * A list of DNS search domains that are presented to the container. This parameter maps to * DnsSearch in the Create a container section of * the Docker Remote API and the * --dns-search option to docker run. *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dnsSearchDomains * A list of DNS search domains that are presented to the container. This parameter maps to * DnsSearch in the Create a container * section of the Docker Remote API and the * --dns-search option to docker * run.

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dnsSearchDomains(String... dnsSearchDomains); /** *

      * A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. * This parameter maps to ExtraHosts in the Create a container section of * the Docker Remote API and the --add-host * option to docker run. *

      * *

      * This parameter is not supported for Windows containers or tasks that use the awsvpc network * mode. *

      *
      * * @param extraHosts * A list of hostnames and IP address mappings to append to the /etc/hosts file on the * container. This parameter maps to ExtraHosts in the Create a container * section of the Docker Remote API and the * --add-host option to docker * run.

      *

      * This parameter is not supported for Windows containers or tasks that use the awsvpc * network mode. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder extraHosts(Collection extraHosts); /** *

      * A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. * This parameter maps to ExtraHosts in the Create a container section of * the Docker Remote API and the --add-host * option to docker run. *

      * *

      * This parameter is not supported for Windows containers or tasks that use the awsvpc network * mode. *

      *
      * * @param extraHosts * A list of hostnames and IP address mappings to append to the /etc/hosts file on the * container. This parameter maps to ExtraHosts in the Create a container * section of the Docker Remote API and the * --add-host option to docker * run.

      *

      * This parameter is not supported for Windows containers or tasks that use the awsvpc * network mode. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder extraHosts(HostEntry... extraHosts); /** *

      * A list of hostnames and IP address mappings to append to the /etc/hosts file on the container. * This parameter maps to ExtraHosts in the Create a container section of * the Docker Remote API and the --add-host * option to docker run. *

      * *

      * This parameter is not supported for Windows containers or tasks that use the awsvpc network * mode. *

      *
      This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #extraHosts(List)}. * * @param extraHosts * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #extraHosts(List) */ Builder extraHosts(Consumer... extraHosts); /** *

      * A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This field * is not valid for containers in tasks using the Fargate launch type. *

      *

      * This parameter maps to SecurityOpt in the Create a container section of * the Docker Remote API and the * --security-opt option to docker run. *

      * *

      * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables before * containers placed on that instance can use these security options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dockerSecurityOptions * A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This * field is not valid for containers in tasks using the Fargate launch type.

      *

      * This parameter maps to SecurityOpt in the Create a container * section of the Docker Remote API and the * --security-opt option to docker * run. *

      * *

      * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables * before containers placed on that instance can use these security options. For more information, see Amazon ECS * Container Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dockerSecurityOptions(Collection dockerSecurityOptions); /** *

      * A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This field * is not valid for containers in tasks using the Fargate launch type. *

      *

      * This parameter maps to SecurityOpt in the Create a container section of * the Docker Remote API and the * --security-opt option to docker run. *

      * *

      * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables before * containers placed on that instance can use these security options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      *

      * This parameter is not supported for Windows containers. *

      *
      * * @param dockerSecurityOptions * A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems. This * field is not valid for containers in tasks using the Fargate launch type.

      *

      * This parameter maps to SecurityOpt in the Create a container * section of the Docker Remote API and the * --security-opt option to docker * run. *

      * *

      * The Amazon ECS container agent running on a container instance must register with the * ECS_SELINUX_CAPABLE=true or ECS_APPARMOR_CAPABLE=true environment variables * before containers placed on that instance can use these security options. For more information, see Amazon ECS * Container Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder dockerSecurityOptions(String... dockerSecurityOptions); /** *

      * When this parameter is true, this allows you to deploy containerized applications that require * stdin or a tty to be allocated. This parameter maps to OpenStdin in * the Create a container * section of the Docker Remote API and the * --interactive option to docker run. *

      * * @param interactive * When this parameter is true, this allows you to deploy containerized applications that * require stdin or a tty to be allocated. This parameter maps to * OpenStdin in the Create a container * section of the Docker Remote API and the * --interactive option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder interactive(Boolean interactive); /** *

      * When this parameter is true, a TTY is allocated. This parameter maps to Tty in the * Create a container section * of the Docker Remote API and the --tty * option to docker run. *

      * * @param pseudoTerminal * When this parameter is true, a TTY is allocated. This parameter maps to Tty * in the Create a * container section of the Docker Remote API * and the --tty option to docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder pseudoTerminal(Boolean pseudoTerminal); /** *

      * A key/value map of labels to add to the container. This parameter maps to Labels in the Create a container section of * the Docker Remote API and the --label * option to docker run. This parameter requires * version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API * version on your container instance, log in to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}' *

      * * @param dockerLabels * A key/value map of labels to add to the container. This parameter maps to Labels in the * Create a container * section of the Docker Remote API and the * --label option to docker run. * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. * To check the Docker Remote API version on your container instance, log in to your container instance * and run the following command: sudo docker version --format '{{.Server.APIVersion}}' * @return Returns a reference to this object so that method calls can be chained together. */ Builder dockerLabels(Map dockerLabels); /** *

      * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of * the Docker Remote API and the --ulimit * option to docker run. Valid naming values are * displayed in the Ulimit data type. This parameter requires version 1.18 of the Docker Remote API or * greater on your container instance. To check the Docker Remote API version on your container instance, log in * to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param ulimits * A list of ulimits to set in the container. This parameter maps to Ulimits in * the Create a * container section of the Docker Remote API * and the --ulimit option to docker * run. Valid naming values are displayed in the Ulimit data type. This parameter requires * version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker * Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}'

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder ulimits(Collection ulimits); /** *

      * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of * the Docker Remote API and the --ulimit * option to docker run. Valid naming values are * displayed in the Ulimit data type. This parameter requires version 1.18 of the Docker Remote API or * greater on your container instance. To check the Docker Remote API version on your container instance, log in * to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * This parameter is not supported for Windows containers. *

      *
      * * @param ulimits * A list of ulimits to set in the container. This parameter maps to Ulimits in * the Create a * container section of the Docker Remote API * and the --ulimit option to docker * run. Valid naming values are displayed in the Ulimit data type. This parameter requires * version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker * Remote API version on your container instance, log in to your container instance and run the following * command: sudo docker version --format '{{.Server.APIVersion}}'

      *

      * This parameter is not supported for Windows containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder ulimits(Ulimit... ulimits); /** *

      * A list of ulimits to set in the container. This parameter maps to Ulimits in the Create a container section of * the Docker Remote API and the --ulimit * option to docker run. Valid naming values are * displayed in the Ulimit data type. This parameter requires version 1.18 of the Docker Remote API or * greater on your container instance. To check the Docker Remote API version on your container instance, log in * to your container instance and run the following command: * sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * This parameter is not supported for Windows containers. *

      *
      This is a convenience that creates an instance of the {@link List.Builder} avoiding the need * to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and its * result is passed to {@link #ulimits(List)}. * * @param ulimits * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #ulimits(List) */ Builder ulimits(Consumer... ulimits); /** *

      * The log configuration specification for the container. *

      *

      * This parameter maps to LogConfig in the Create a container section of * the Docker Remote API and the * --log-driver option to docker run. * By default, containers use the same logging driver that the Docker daemon uses. However the container may use * a different logging driver than the Docker daemon by specifying a log driver with this parameter in the * container definition. To use a different logging driver for a container, the log system must be configured * properly on the container instance (or on a different log server for remote logging options). For more * information on the options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

      * *

      * Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the Amazon * ECS container agent. *

      *
      *

      * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check * the Docker Remote API version on your container instance, log in to your container instance and run the * following command: sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers * placed on that instance can use these log configuration options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      * * @param logConfiguration * The log configuration specification for the container.

      *

      * This parameter maps to LogConfig in the Create a container * section of the Docker Remote API and the * --log-driver option to docker * run. By default, containers use the same logging driver that the Docker daemon uses. However the * container may use a different logging driver than the Docker daemon by specifying a log driver with * this parameter in the container definition. To use a different logging driver for a container, the log * system must be configured properly on the container instance (or on a different log server for remote * logging options). For more information on the options for different supported log drivers, see Configure logging drivers in the * Docker documentation. *

      * *

      * Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in * the LogConfiguration data type). Additional log drivers may be available in future releases of * the Amazon ECS container agent. *

      *
      *

      * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. * To check the Docker Remote API version on your container instance, log in to your container instance * and run the following command: sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * The Amazon ECS container agent running on a container instance must register the logging drivers * available on that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable * before containers placed on that instance can use these log configuration options. For more * information, see Amazon ECS * Container Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder logConfiguration(LogConfiguration logConfiguration); /** *

      * The log configuration specification for the container. *

      *

      * This parameter maps to LogConfig in the Create a container section of * the Docker Remote API and the * --log-driver option to docker run. * By default, containers use the same logging driver that the Docker daemon uses. However the container may use * a different logging driver than the Docker daemon by specifying a log driver with this parameter in the * container definition. To use a different logging driver for a container, the log system must be configured * properly on the container instance (or on a different log server for remote logging options). For more * information on the options for different supported log drivers, see Configure logging drivers in the Docker * documentation. *

      * *

      * Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the * LogConfiguration data type). Additional log drivers may be available in future releases of the Amazon * ECS container agent. *

      *
      *

      * This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check * the Docker Remote API version on your container instance, log in to your container instance and run the * following command: sudo docker version --format '{{.Server.APIVersion}}' *

      * *

      * The Amazon ECS container agent running on a container instance must register the logging drivers available on * that instance with the ECS_AVAILABLE_LOGGING_DRIVERS environment variable before containers * placed on that instance can use these log configuration options. For more information, see Amazon ECS Container * Agent Configuration in the Amazon Elastic Container Service Developer Guide. *

      *
      This is a convenience that creates an instance of the {@link LogConfiguration.Builder} avoiding the * need to create one manually via {@link LogConfiguration#builder()}. * * When the {@link Consumer} completes, {@link LogConfiguration.Builder#build()} is called immediately and its * result is passed to {@link #logConfiguration(LogConfiguration)}. * * @param logConfiguration * a consumer that will call methods on {@link LogConfiguration.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #logConfiguration(LogConfiguration) */ default Builder logConfiguration(Consumer logConfiguration) { return logConfiguration(LogConfiguration.builder().applyMutation(logConfiguration).build()); } /** *

      * The health check command and associated configuration parameters for the container. This parameter maps to * HealthCheck in the Create a container section of * the Docker Remote API and the * HEALTHCHECK parameter of docker run. *

      * * @param healthCheck * The health check command and associated configuration parameters for the container. This parameter * maps to HealthCheck in the Create a container * section of the Docker Remote API and the * HEALTHCHECK parameter of docker * run. * @return Returns a reference to this object so that method calls can be chained together. */ Builder healthCheck(HealthCheck healthCheck); /** *

      * The health check command and associated configuration parameters for the container. This parameter maps to * HealthCheck in the Create a container section of * the Docker Remote API and the * HEALTHCHECK parameter of docker run. *

      * This is a convenience that creates an instance of the {@link HealthCheck.Builder} avoiding the need to create * one manually via {@link HealthCheck#builder()}. * * When the {@link Consumer} completes, {@link HealthCheck.Builder#build()} is called immediately and its result * is passed to {@link #healthCheck(HealthCheck)}. * * @param healthCheck * a consumer that will call methods on {@link HealthCheck.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #healthCheck(HealthCheck) */ default Builder healthCheck(Consumer healthCheck) { return healthCheck(HealthCheck.builder().applyMutation(healthCheck).build()); } /** *

      * A list of namespaced kernel parameters to set in the container. This parameter maps to Sysctls * in the Create a container * section of the Docker Remote API and the * --sysctl option to docker run. *

      * *

      * It is not recommended that you specify network-related systemControls parameters for multiple * containers in a single task that also uses either the awsvpc or host network modes. * For tasks that use the awsvpc network mode, the container that is started last determines which * systemControls parameters take effect. For tasks that use the host network mode, it * changes the container instance's namespaced kernel parameters as well as the containers. *

      *
      * * @param systemControls * A list of namespaced kernel parameters to set in the container. This parameter maps to * Sysctls in the Create a container * section of the Docker Remote API and the * --sysctl option to docker * run.

      *

      * It is not recommended that you specify network-related systemControls parameters for * multiple containers in a single task that also uses either the awsvpc or * host network modes. For tasks that use the awsvpc network mode, the * container that is started last determines which systemControls parameters take effect. * For tasks that use the host network mode, it changes the container instance's namespaced * kernel parameters as well as the containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder systemControls(Collection systemControls); /** *

      * A list of namespaced kernel parameters to set in the container. This parameter maps to Sysctls * in the Create a container * section of the Docker Remote API and the * --sysctl option to docker run. *

      * *

      * It is not recommended that you specify network-related systemControls parameters for multiple * containers in a single task that also uses either the awsvpc or host network modes. * For tasks that use the awsvpc network mode, the container that is started last determines which * systemControls parameters take effect. For tasks that use the host network mode, it * changes the container instance's namespaced kernel parameters as well as the containers. *

      *
      * * @param systemControls * A list of namespaced kernel parameters to set in the container. This parameter maps to * Sysctls in the Create a container * section of the Docker Remote API and the * --sysctl option to docker * run.

      *

      * It is not recommended that you specify network-related systemControls parameters for * multiple containers in a single task that also uses either the awsvpc or * host network modes. For tasks that use the awsvpc network mode, the * container that is started last determines which systemControls parameters take effect. * For tasks that use the host network mode, it changes the container instance's namespaced * kernel parameters as well as the containers. *

      * @return Returns a reference to this object so that method calls can be chained together. */ Builder systemControls(SystemControl... systemControls); /** *

      * A list of namespaced kernel parameters to set in the container. This parameter maps to Sysctls * in the Create a container * section of the Docker Remote API and the * --sysctl option to docker run. *

      * *

      * It is not recommended that you specify network-related systemControls parameters for multiple * containers in a single task that also uses either the awsvpc or host network modes. * For tasks that use the awsvpc network mode, the container that is started last determines which * systemControls parameters take effect. For tasks that use the host network mode, it * changes the container instance's namespaced kernel parameters as well as the containers. *

      *
      This is a convenience that creates an instance of the {@link List.Builder} avoiding * the need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately and * its result is passed to {@link #systemControls(List)}. * * @param systemControls * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #systemControls(List) */ Builder systemControls(Consumer... systemControls); /** *

      * The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

      * * @param resourceRequirements * The type and amount of a resource to assign to a container. The only supported resource is a GPU. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceRequirements(Collection resourceRequirements); /** *

      * The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

      * * @param resourceRequirements * The type and amount of a resource to assign to a container. The only supported resource is a GPU. * @return Returns a reference to this object so that method calls can be chained together. */ Builder resourceRequirements(ResourceRequirement... resourceRequirements); /** *

      * The type and amount of a resource to assign to a container. The only supported resource is a GPU. *

      * This is a convenience that creates an instance of the {@link List.Builder} avoiding the * need to create one manually via {@link List#builder()}. * * When the {@link Consumer} completes, {@link List.Builder#build()} is called immediately * and its result is passed to {@link #resourceRequirements(List)}. * * @param resourceRequirements * a consumer that will call methods on {@link List.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #resourceRequirements(List) */ Builder resourceRequirements(Consumer... resourceRequirements); } static final class BuilderImpl implements Builder { private String name; private String image; private RepositoryCredentials repositoryCredentials; private Integer cpu; private Integer memory; private Integer memoryReservation; private List links = DefaultSdkAutoConstructList.getInstance(); private List portMappings = DefaultSdkAutoConstructList.getInstance(); private Boolean essential; private List entryPoint = DefaultSdkAutoConstructList.getInstance(); private List command = DefaultSdkAutoConstructList.getInstance(); private List environment = DefaultSdkAutoConstructList.getInstance(); private List mountPoints = DefaultSdkAutoConstructList.getInstance(); private List volumesFrom = DefaultSdkAutoConstructList.getInstance(); private LinuxParameters linuxParameters; private List secrets = DefaultSdkAutoConstructList.getInstance(); private List dependsOn = DefaultSdkAutoConstructList.getInstance(); private Integer startTimeout; private Integer stopTimeout; private String hostname; private String user; private String workingDirectory; private Boolean disableNetworking; private Boolean privileged; private Boolean readonlyRootFilesystem; private List dnsServers = DefaultSdkAutoConstructList.getInstance(); private List dnsSearchDomains = DefaultSdkAutoConstructList.getInstance(); private List extraHosts = DefaultSdkAutoConstructList.getInstance(); private List dockerSecurityOptions = DefaultSdkAutoConstructList.getInstance(); private Boolean interactive; private Boolean pseudoTerminal; private Map dockerLabels = DefaultSdkAutoConstructMap.getInstance(); private List ulimits = DefaultSdkAutoConstructList.getInstance(); private LogConfiguration logConfiguration; private HealthCheck healthCheck; private List systemControls = DefaultSdkAutoConstructList.getInstance(); private List resourceRequirements = DefaultSdkAutoConstructList.getInstance(); private BuilderImpl() { } private BuilderImpl(ContainerDefinition model) { name(model.name); image(model.image); repositoryCredentials(model.repositoryCredentials); cpu(model.cpu); memory(model.memory); memoryReservation(model.memoryReservation); links(model.links); portMappings(model.portMappings); essential(model.essential); entryPoint(model.entryPoint); command(model.command); environment(model.environment); mountPoints(model.mountPoints); volumesFrom(model.volumesFrom); linuxParameters(model.linuxParameters); secrets(model.secrets); dependsOn(model.dependsOn); startTimeout(model.startTimeout); stopTimeout(model.stopTimeout); hostname(model.hostname); user(model.user); workingDirectory(model.workingDirectory); disableNetworking(model.disableNetworking); privileged(model.privileged); readonlyRootFilesystem(model.readonlyRootFilesystem); dnsServers(model.dnsServers); dnsSearchDomains(model.dnsSearchDomains); extraHosts(model.extraHosts); dockerSecurityOptions(model.dockerSecurityOptions); interactive(model.interactive); pseudoTerminal(model.pseudoTerminal); dockerLabels(model.dockerLabels); ulimits(model.ulimits); logConfiguration(model.logConfiguration); healthCheck(model.healthCheck); systemControls(model.systemControls); resourceRequirements(model.resourceRequirements); } public final String getName() { return name; } @Override public final Builder name(String name) { this.name = name; return this; } public final void setName(String name) { this.name = name; } public final String getImage() { return image; } @Override public final Builder image(String image) { this.image = image; return this; } public final void setImage(String image) { this.image = image; } public final RepositoryCredentials.Builder getRepositoryCredentials() { return repositoryCredentials != null ? repositoryCredentials.toBuilder() : null; } @Override public final Builder repositoryCredentials(RepositoryCredentials repositoryCredentials) { this.repositoryCredentials = repositoryCredentials; return this; } public final void setRepositoryCredentials(RepositoryCredentials.BuilderImpl repositoryCredentials) { this.repositoryCredentials = repositoryCredentials != null ? repositoryCredentials.build() : null; } public final Integer getCpu() { return cpu; } @Override public final Builder cpu(Integer cpu) { this.cpu = cpu; return this; } public final void setCpu(Integer cpu) { this.cpu = cpu; } public final Integer getMemory() { return memory; } @Override public final Builder memory(Integer memory) { this.memory = memory; return this; } public final void setMemory(Integer memory) { this.memory = memory; } public final Integer getMemoryReservation() { return memoryReservation; } @Override public final Builder memoryReservation(Integer memoryReservation) { this.memoryReservation = memoryReservation; return this; } public final void setMemoryReservation(Integer memoryReservation) { this.memoryReservation = memoryReservation; } public final Collection getLinks() { return links; } @Override public final Builder links(Collection links) { this.links = StringListCopier.copy(links); return this; } @Override @SafeVarargs public final Builder links(String... links) { links(Arrays.asList(links)); return this; } public final void setLinks(Collection links) { this.links = StringListCopier.copy(links); } public final Collection getPortMappings() { return portMappings != null ? portMappings.stream().map(PortMapping::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder portMappings(Collection portMappings) { this.portMappings = PortMappingListCopier.copy(portMappings); return this; } @Override @SafeVarargs public final Builder portMappings(PortMapping... portMappings) { portMappings(Arrays.asList(portMappings)); return this; } @Override @SafeVarargs public final Builder portMappings(Consumer... portMappings) { portMappings(Stream.of(portMappings).map(c -> PortMapping.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setPortMappings(Collection portMappings) { this.portMappings = PortMappingListCopier.copyFromBuilder(portMappings); } public final Boolean getEssential() { return essential; } @Override public final Builder essential(Boolean essential) { this.essential = essential; return this; } public final void setEssential(Boolean essential) { this.essential = essential; } public final Collection getEntryPoint() { return entryPoint; } @Override public final Builder entryPoint(Collection entryPoint) { this.entryPoint = StringListCopier.copy(entryPoint); return this; } @Override @SafeVarargs public final Builder entryPoint(String... entryPoint) { entryPoint(Arrays.asList(entryPoint)); return this; } public final void setEntryPoint(Collection entryPoint) { this.entryPoint = StringListCopier.copy(entryPoint); } public final Collection getCommand() { return command; } @Override public final Builder command(Collection command) { this.command = StringListCopier.copy(command); return this; } @Override @SafeVarargs public final Builder command(String... command) { command(Arrays.asList(command)); return this; } public final void setCommand(Collection command) { this.command = StringListCopier.copy(command); } public final Collection getEnvironment() { return environment != null ? environment.stream().map(KeyValuePair::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder environment(Collection environment) { this.environment = EnvironmentVariablesCopier.copy(environment); return this; } @Override @SafeVarargs public final Builder environment(KeyValuePair... environment) { environment(Arrays.asList(environment)); return this; } @Override @SafeVarargs public final Builder environment(Consumer... environment) { environment(Stream.of(environment).map(c -> KeyValuePair.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setEnvironment(Collection environment) { this.environment = EnvironmentVariablesCopier.copyFromBuilder(environment); } public final Collection getMountPoints() { return mountPoints != null ? mountPoints.stream().map(MountPoint::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder mountPoints(Collection mountPoints) { this.mountPoints = MountPointListCopier.copy(mountPoints); return this; } @Override @SafeVarargs public final Builder mountPoints(MountPoint... mountPoints) { mountPoints(Arrays.asList(mountPoints)); return this; } @Override @SafeVarargs public final Builder mountPoints(Consumer... mountPoints) { mountPoints(Stream.of(mountPoints).map(c -> MountPoint.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setMountPoints(Collection mountPoints) { this.mountPoints = MountPointListCopier.copyFromBuilder(mountPoints); } public final Collection getVolumesFrom() { return volumesFrom != null ? volumesFrom.stream().map(VolumeFrom::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder volumesFrom(Collection volumesFrom) { this.volumesFrom = VolumeFromListCopier.copy(volumesFrom); return this; } @Override @SafeVarargs public final Builder volumesFrom(VolumeFrom... volumesFrom) { volumesFrom(Arrays.asList(volumesFrom)); return this; } @Override @SafeVarargs public final Builder volumesFrom(Consumer... volumesFrom) { volumesFrom(Stream.of(volumesFrom).map(c -> VolumeFrom.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setVolumesFrom(Collection volumesFrom) { this.volumesFrom = VolumeFromListCopier.copyFromBuilder(volumesFrom); } public final LinuxParameters.Builder getLinuxParameters() { return linuxParameters != null ? linuxParameters.toBuilder() : null; } @Override public final Builder linuxParameters(LinuxParameters linuxParameters) { this.linuxParameters = linuxParameters; return this; } public final void setLinuxParameters(LinuxParameters.BuilderImpl linuxParameters) { this.linuxParameters = linuxParameters != null ? linuxParameters.build() : null; } public final Collection getSecrets() { return secrets != null ? secrets.stream().map(Secret::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder secrets(Collection secrets) { this.secrets = SecretListCopier.copy(secrets); return this; } @Override @SafeVarargs public final Builder secrets(Secret... secrets) { secrets(Arrays.asList(secrets)); return this; } @Override @SafeVarargs public final Builder secrets(Consumer... secrets) { secrets(Stream.of(secrets).map(c -> Secret.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setSecrets(Collection secrets) { this.secrets = SecretListCopier.copyFromBuilder(secrets); } public final Collection getDependsOn() { return dependsOn != null ? dependsOn.stream().map(ContainerDependency::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder dependsOn(Collection dependsOn) { this.dependsOn = ContainerDependenciesCopier.copy(dependsOn); return this; } @Override @SafeVarargs public final Builder dependsOn(ContainerDependency... dependsOn) { dependsOn(Arrays.asList(dependsOn)); return this; } @Override @SafeVarargs public final Builder dependsOn(Consumer... dependsOn) { dependsOn(Stream.of(dependsOn).map(c -> ContainerDependency.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setDependsOn(Collection dependsOn) { this.dependsOn = ContainerDependenciesCopier.copyFromBuilder(dependsOn); } public final Integer getStartTimeout() { return startTimeout; } @Override public final Builder startTimeout(Integer startTimeout) { this.startTimeout = startTimeout; return this; } public final void setStartTimeout(Integer startTimeout) { this.startTimeout = startTimeout; } public final Integer getStopTimeout() { return stopTimeout; } @Override public final Builder stopTimeout(Integer stopTimeout) { this.stopTimeout = stopTimeout; return this; } public final void setStopTimeout(Integer stopTimeout) { this.stopTimeout = stopTimeout; } public final String getHostname() { return hostname; } @Override public final Builder hostname(String hostname) { this.hostname = hostname; return this; } public final void setHostname(String hostname) { this.hostname = hostname; } public final String getUser() { return user; } @Override public final Builder user(String user) { this.user = user; return this; } public final void setUser(String user) { this.user = user; } public final String getWorkingDirectory() { return workingDirectory; } @Override public final Builder workingDirectory(String workingDirectory) { this.workingDirectory = workingDirectory; return this; } public final void setWorkingDirectory(String workingDirectory) { this.workingDirectory = workingDirectory; } public final Boolean getDisableNetworking() { return disableNetworking; } @Override public final Builder disableNetworking(Boolean disableNetworking) { this.disableNetworking = disableNetworking; return this; } public final void setDisableNetworking(Boolean disableNetworking) { this.disableNetworking = disableNetworking; } public final Boolean getPrivileged() { return privileged; } @Override public final Builder privileged(Boolean privileged) { this.privileged = privileged; return this; } public final void setPrivileged(Boolean privileged) { this.privileged = privileged; } public final Boolean getReadonlyRootFilesystem() { return readonlyRootFilesystem; } @Override public final Builder readonlyRootFilesystem(Boolean readonlyRootFilesystem) { this.readonlyRootFilesystem = readonlyRootFilesystem; return this; } public final void setReadonlyRootFilesystem(Boolean readonlyRootFilesystem) { this.readonlyRootFilesystem = readonlyRootFilesystem; } public final Collection getDnsServers() { return dnsServers; } @Override public final Builder dnsServers(Collection dnsServers) { this.dnsServers = StringListCopier.copy(dnsServers); return this; } @Override @SafeVarargs public final Builder dnsServers(String... dnsServers) { dnsServers(Arrays.asList(dnsServers)); return this; } public final void setDnsServers(Collection dnsServers) { this.dnsServers = StringListCopier.copy(dnsServers); } public final Collection getDnsSearchDomains() { return dnsSearchDomains; } @Override public final Builder dnsSearchDomains(Collection dnsSearchDomains) { this.dnsSearchDomains = StringListCopier.copy(dnsSearchDomains); return this; } @Override @SafeVarargs public final Builder dnsSearchDomains(String... dnsSearchDomains) { dnsSearchDomains(Arrays.asList(dnsSearchDomains)); return this; } public final void setDnsSearchDomains(Collection dnsSearchDomains) { this.dnsSearchDomains = StringListCopier.copy(dnsSearchDomains); } public final Collection getExtraHosts() { return extraHosts != null ? extraHosts.stream().map(HostEntry::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder extraHosts(Collection extraHosts) { this.extraHosts = HostEntryListCopier.copy(extraHosts); return this; } @Override @SafeVarargs public final Builder extraHosts(HostEntry... extraHosts) { extraHosts(Arrays.asList(extraHosts)); return this; } @Override @SafeVarargs public final Builder extraHosts(Consumer... extraHosts) { extraHosts(Stream.of(extraHosts).map(c -> HostEntry.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setExtraHosts(Collection extraHosts) { this.extraHosts = HostEntryListCopier.copyFromBuilder(extraHosts); } public final Collection getDockerSecurityOptions() { return dockerSecurityOptions; } @Override public final Builder dockerSecurityOptions(Collection dockerSecurityOptions) { this.dockerSecurityOptions = StringListCopier.copy(dockerSecurityOptions); return this; } @Override @SafeVarargs public final Builder dockerSecurityOptions(String... dockerSecurityOptions) { dockerSecurityOptions(Arrays.asList(dockerSecurityOptions)); return this; } public final void setDockerSecurityOptions(Collection dockerSecurityOptions) { this.dockerSecurityOptions = StringListCopier.copy(dockerSecurityOptions); } public final Boolean getInteractive() { return interactive; } @Override public final Builder interactive(Boolean interactive) { this.interactive = interactive; return this; } public final void setInteractive(Boolean interactive) { this.interactive = interactive; } public final Boolean getPseudoTerminal() { return pseudoTerminal; } @Override public final Builder pseudoTerminal(Boolean pseudoTerminal) { this.pseudoTerminal = pseudoTerminal; return this; } public final void setPseudoTerminal(Boolean pseudoTerminal) { this.pseudoTerminal = pseudoTerminal; } public final Map getDockerLabels() { return dockerLabels; } @Override public final Builder dockerLabels(Map dockerLabels) { this.dockerLabels = DockerLabelsMapCopier.copy(dockerLabels); return this; } public final void setDockerLabels(Map dockerLabels) { this.dockerLabels = DockerLabelsMapCopier.copy(dockerLabels); } public final Collection getUlimits() { return ulimits != null ? ulimits.stream().map(Ulimit::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder ulimits(Collection ulimits) { this.ulimits = UlimitListCopier.copy(ulimits); return this; } @Override @SafeVarargs public final Builder ulimits(Ulimit... ulimits) { ulimits(Arrays.asList(ulimits)); return this; } @Override @SafeVarargs public final Builder ulimits(Consumer... ulimits) { ulimits(Stream.of(ulimits).map(c -> Ulimit.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final void setUlimits(Collection ulimits) { this.ulimits = UlimitListCopier.copyFromBuilder(ulimits); } public final LogConfiguration.Builder getLogConfiguration() { return logConfiguration != null ? logConfiguration.toBuilder() : null; } @Override public final Builder logConfiguration(LogConfiguration logConfiguration) { this.logConfiguration = logConfiguration; return this; } public final void setLogConfiguration(LogConfiguration.BuilderImpl logConfiguration) { this.logConfiguration = logConfiguration != null ? logConfiguration.build() : null; } public final HealthCheck.Builder getHealthCheck() { return healthCheck != null ? healthCheck.toBuilder() : null; } @Override public final Builder healthCheck(HealthCheck healthCheck) { this.healthCheck = healthCheck; return this; } public final void setHealthCheck(HealthCheck.BuilderImpl healthCheck) { this.healthCheck = healthCheck != null ? healthCheck.build() : null; } public final Collection getSystemControls() { return systemControls != null ? systemControls.stream().map(SystemControl::toBuilder).collect(Collectors.toList()) : null; } @Override public final Builder systemControls(Collection systemControls) { this.systemControls = SystemControlsCopier.copy(systemControls); return this; } @Override @SafeVarargs public final Builder systemControls(SystemControl... systemControls) { systemControls(Arrays.asList(systemControls)); return this; } @Override @SafeVarargs public final Builder systemControls(Consumer... systemControls) { systemControls(Stream.of(systemControls).map(c -> SystemControl.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setSystemControls(Collection systemControls) { this.systemControls = SystemControlsCopier.copyFromBuilder(systemControls); } public final Collection getResourceRequirements() { return resourceRequirements != null ? resourceRequirements.stream().map(ResourceRequirement::toBuilder) .collect(Collectors.toList()) : null; } @Override public final Builder resourceRequirements(Collection resourceRequirements) { this.resourceRequirements = ResourceRequirementsCopier.copy(resourceRequirements); return this; } @Override @SafeVarargs public final Builder resourceRequirements(ResourceRequirement... resourceRequirements) { resourceRequirements(Arrays.asList(resourceRequirements)); return this; } @Override @SafeVarargs public final Builder resourceRequirements(Consumer... resourceRequirements) { resourceRequirements(Stream.of(resourceRequirements).map(c -> ResourceRequirement.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final void setResourceRequirements(Collection resourceRequirements) { this.resourceRequirements = ResourceRequirementsCopier.copyFromBuilder(resourceRequirements); } @Override public ContainerDefinition build() { return new ContainerDefinition(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy