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 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.core.util.SdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructMap;
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).memberName("name") .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).memberName("image") .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).memberName("repositoryCredentials") .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).memberName("cpu") .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) .memberName("memory").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) .memberName("memoryReservation").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) .memberName("links") .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) .memberName("portMappings") .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) .memberName("essential").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) .memberName("entryPoint") .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) .memberName("command") .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) .memberName("environment") .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> ENVIRONMENT_FILES_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("environmentFiles") .getter(getter(ContainerDefinition::environmentFiles)) .setter(setter(Builder::environmentFiles)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("environmentFiles").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(EnvironmentFile::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField> MOUNT_POINTS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("mountPoints") .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) .memberName("volumesFrom") .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).memberName("linuxParameters") .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) .memberName("secrets") .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) .memberName("dependsOn") .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) .memberName("startTimeout").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) .memberName("stopTimeout").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) .memberName("hostname").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).memberName("user") .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) .memberName("workingDirectory").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) .memberName("disableNetworking").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) .memberName("privileged").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) .memberName("readonlyRootFilesystem").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) .memberName("dnsServers") .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) .memberName("dnsSearchDomains") .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) .memberName("extraHosts") .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) .memberName("dockerSecurityOptions") .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) .memberName("interactive").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) .memberName("pseudoTerminal").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) .memberName("dockerLabels") .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) .memberName("ulimits") .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).memberName("logConfiguration") .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) .memberName("healthCheck").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) .memberName("systemControls") .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) .memberName("resourceRequirements") .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 SdkField FIRELENS_CONFIGURATION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("firelensConfiguration") .getter(getter(ContainerDefinition::firelensConfiguration)).setter(setter(Builder::firelensConfiguration)) .constructor(FirelensConfiguration::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("firelensConfiguration").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, ENVIRONMENT_FILES_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, FIRELENS_CONFIGURATION_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 environmentFiles; 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 final FirelensConfiguration firelensConfiguration; 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.environmentFiles = builder.environmentFiles; 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; this.firelensConfiguration = builder.firelensConfiguration; } /** *

* The name of a container. If you're 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, underscores, 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're 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, underscores, 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 final String name() { return name; } /** *

* The image used to start a container. This string is passed directly to the Docker daemon. By default, images in * the Docker Hub registry are available. 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 aren't 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. By default, * images in the Docker Hub registry are available. 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 aren't 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 final String image() { return image; } /** *

    * The private repository authentication credentials to use. *

    * * @return The private repository authentication credentials to use. */ public final 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. *

    *
    *

    * 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's 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 is guaranteed a minimum of 512 CPU units when needed. Moreover, * each container could float to higher CPU usage if the other container was not using it. 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 * isn't 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's described in the task definition. A null or zero CPU value * is passed to Docker as 0, which Windows interprets as 1% of one CPU. *

    * * @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. *

    *
    *

    * 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's 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 is guaranteed a minimum * of 512 CPU units when needed. Moreover, each container could float to higher CPU usage if the other * container was not using it. 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 isn't 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's described in the task definition. A * null or zero CPU value is passed to Docker as 0, which Windows interprets as 1% of one CPU. */ public final 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 using the Fargate launch type, this parameter is optional. *

    *

    * If using the EC2 launch type, you must specify either a task-level memory value or a container-level memory * value. If you specify both a container-level memory and memoryReservation value, * memory must be greater than memoryReservation. If you specify * memoryReservation, then that value is subtracted from the available memory resources for the * container instance where the container is placed. Otherwise, the value of memory is used. *

    *

    * The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container. So, don't specify less * than 6 MiB of memory for your containers. *

    *

    * The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container. So, don't specify * less 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 using the Fargate launch type, this parameter is optional. *

    *

    * If using the EC2 launch type, you must specify either a task-level memory value or a container-level * memory value. If you specify both a container-level memory and * memoryReservation value, memory must be greater than * memoryReservation. If you specify memoryReservation, then that value is * subtracted from the available memory resources for the container instance where the container is placed. * Otherwise, the value of memory is used. *

    *

    * The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container. So, don't * specify less than 6 MiB of memory for your containers. *

    *

    * The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container. So, don't * specify less than 4 MiB of memory for your containers. */ public final 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. *

    *

    * If a task-level memory value is not specified, you must specify a non-zero integer for one or both of * memory or memoryReservation in a container definition. 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 where 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. Therefore, we recommend that you 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.

    *

    * If a task-level memory value is not specified, you must specify a non-zero integer for one or both of * memory or memoryReservation in a container definition. 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 where 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. Therefore, we recommend that you * specify fewer than 4 MiB of memory for your containers. */ public final Integer memoryReservation() { return memoryReservation; } /** * For responses, this returns true if the service returned a value for the Links property. This DOES NOT check that * the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is useful * because the SDK will never return a null collection or map, but you may need to differentiate between the service * returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true * if a value for the property was specified in the request builder, and false if a value was not specified. */ public final boolean hasLinks() { return links != null && !(links instanceof SdkAutoConstructList); } /** *

    * 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, underscores, 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. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasLinks} method. *

    * * @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, underscores, 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 final List links() { return links; } /** * For responses, this returns true if the service returned a value for the PortMappings property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasPortMappings() { return portMappings != null && !(portMappings instanceof SdkAutoConstructList); } /** *

    * 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, 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's * no loopback for port mappings on Windows, so you can't 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. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasPortMappings} method. *

    * * @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, 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's no loopback for port mappings on Windows, so you can't 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 final 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, its failure doesn't 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's composed of multiple * containers, 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, its failure doesn't * 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's composed of * multiple containers, 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 final Boolean essential() { return essential; } /** * For responses, this returns true if the service returned a value for the EntryPoint property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasEntryPoint() { return entryPoint != null && !(entryPoint instanceof SdkAutoConstructList); } /** * *

    * Early versions of the Amazon ECS container agent don't 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's 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. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasEntryPoint} method. *

    * * @return

    * Early versions of the Amazon ECS container agent don't 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's 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 final List entryPoint() { return entryPoint; } /** * For responses, this returns true if the service returned a value for the Command property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasCommand() { return command != null && !(command instanceof SdkAutoConstructList); } /** *

    * The command that's 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 is a separated string in the array. *

    *

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

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasCommand} method. *

    * * @return The command that's 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 is a separated string in the * array. */ public final List command() { return command; } /** * For responses, this returns true if the service returned a value for the Environment property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasEnvironment() { return environment != null && !(environment instanceof SdkAutoConstructList); } /** *

    * 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 don't recommend that you use plaintext environment variables for sensitive information, such as credential * data. *

    *
    *

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

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasEnvironment} method. *

    * * @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 don't recommend that you use plaintext environment variables for sensitive information, such as * credential data. *

    */ public final List environment() { return environment; } /** * For responses, this returns true if the service returned a value for the EnvironmentFiles property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasEnvironmentFiles() { return environmentFiles != null && !(environmentFiles instanceof SdkAutoConstructList); } /** *

    * A list of files containing the environment variables to pass to a container. This parameter maps to the * --env-file option to docker run. *

    *

    * You can specify up to ten environment files. The file must have a .env file extension. Each line in * an environment file contains an environment variable in VARIABLE=VALUE format. Lines beginning with * # are treated as comments and are ignored. For more information about the environment variable file * syntax, see Declare default environment variables in * file. *

    *

    * If there are environment variables specified using the environment parameter in a container * definition, they take precedence over the variables contained within an environment file. If multiple environment * files are specified that contain the same variable, they're processed from the top down. We recommend that you * use unique variable names. For more information, see Specifying Environment * Variables in the Amazon Elastic Container Service Developer Guide. *

    *

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

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasEnvironmentFiles} method. *

    * * @return A list of files containing the environment variables to pass to a container. This parameter maps to the * --env-file option to docker run.

    *

    * You can specify up to ten environment files. The file must have a .env file extension. Each * line in an environment file contains an environment variable in VARIABLE=VALUE format. Lines * beginning with # are treated as comments and are ignored. For more information about the * environment variable file syntax, see Declare default * environment variables in file. *

    *

    * If there are environment variables specified using the environment parameter in a container * definition, they take precedence over the variables contained within an environment file. If multiple * environment files are specified that contain the same variable, they're processed from the top down. We * recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. */ public final List environmentFiles() { return environmentFiles; } /** * For responses, this returns true if the service returned a value for the MountPoints property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasMountPoints() { return mountPoints != null && !(mountPoints instanceof SdkAutoConstructList); } /** *

    * 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 can't mount directories on a different drive, and mount point can't be across drives. *

    *

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

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasMountPoints} method. *

    * * @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 can't mount directories on a different drive, and mount point can't be across drives. */ public final List mountPoints() { return mountPoints; } /** * For responses, this returns true if the service returned a value for the VolumesFrom property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasVolumesFrom() { return volumesFrom != null && !(volumesFrom instanceof SdkAutoConstructList); } /** *

    * 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. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasVolumesFrom} method. *

    * * @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 final 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 final LinuxParameters linuxParameters() { return linuxParameters; } /** * For responses, this returns true if the service returned a value for the Secrets property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasSecrets() { return secrets != null && !(secrets instanceof SdkAutoConstructList); } /** *

    * 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. *

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSecrets} method. *

    * * @return The secrets to pass to the container. For more information, see Specifying Sensitive Data in the Amazon Elastic Container Service Developer Guide. */ public final List secrets() { return secrets; } /** * For responses, this returns true if the service returned a value for the DependsOn property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasDependsOn() { return dependsOn != null && !(dependsOn instanceof SdkAutoConstructList); } /** *

    * 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 turn on 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're 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. *

    *

    * For tasks using the Fargate launch type, the task or service requires the following platforms: *

    *
      *
    • *

      * Linux platform version 1.3.0 or later. *

      *
    • *
    • *

      * Windows platform version 1.0.0 or later. *

      *
    • *
    *

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

    *

    * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDependsOn} method. *

    * * @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 turn on 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're * 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. *

    *

    * For tasks using the Fargate launch type, the task or service requires the following platforms: *

    *
      *
    • *

      * Linux platform version 1.3.0 or later. *

      *
    • *
    • *

      * Windows platform version 1.0.0 or later. *

      *
    • */ public final List dependsOn() { return dependsOn; } /** *

      * Time duration (in seconds) 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 doesn't reach the desired status within that time then containerA gives up and * not start. This results in the task transitioning to a STOPPED state. *

      * *

      * When the ECS_CONTAINER_START_TIMEOUT container agent configuration variable is used, it's enforced * independently from this start timeout value. *

      *
      *

      * For tasks using the Fargate launch type, the task or service requires the following platforms: *

      *
        *
      • *

        * Linux platform version 1.3.0 or later. *

        *
      • *
      • *

        * Windows platform version 1.0.0 or later. *

        *
      • *
      *

      * For tasks using the EC2 launch type, your container instances require at least version 1.26.0 of the * container agent to use 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're 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 (in seconds) 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 doesn't reach the desired status * within that time then containerA gives up and not start. This results in the task transitioning to a * STOPPED state.

      *

      * When the ECS_CONTAINER_START_TIMEOUT container agent configuration variable is used, it's * enforced independently from this start timeout value. *

      *
      *

      * For tasks using the Fargate launch type, the task or service requires the following platforms: *

      *
        *
      • *

        * Linux platform version 1.3.0 or later. *

        *
      • *
      • *

        * Windows platform version 1.0.0 or later. *

        *
      • *
      *

      * For tasks using the EC2 launch type, your container instances require at least version * 1.26.0 of the container agent to use 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're * 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 final Integer startTimeout() { return startTimeout; } /** *

      * Time duration (in seconds) 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 task or service requires the following platforms: *

      *
        *
      • *

        * Linux platform version 1.3.0 or later. *

        *
      • *
      • *

        * Windows platform version 1.0.0 or later. *

        *
      • *
      *

      * The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds * is used. *

      *

      * For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the value set * for the Amazon ECS container agent configuration variable ECS_CONTAINER_STOP_TIMEOUT is used. If * neither the stopTimeout parameter or the ECS_CONTAINER_STOP_TIMEOUT agent configuration * variable are set, then the default values of 30 seconds for Linux containers and 30 seconds on Windows containers * are used. Your container instances require at least version 1.26.0 of the container agent to use 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're 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 (in seconds) 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 task or service requires the following platforms: *

      *
        *
      • *

        * Linux platform version 1.3.0 or later. *

        *
      • *
      • *

        * Windows platform version 1.0.0 or later. *

        *
      • *
      *

      * The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 * seconds is used. *

      *

      * For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the * value set for the Amazon ECS container agent configuration variable * ECS_CONTAINER_STOP_TIMEOUT is used. If neither the stopTimeout parameter or the * ECS_CONTAINER_STOP_TIMEOUT agent configuration variable are set, then the default values of * 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your container instances * require at least version 1.26.0 of the container agent to use 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're * 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 final 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're 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're using the awsvpc network * mode. *

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

      * The user 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. *

      * *

      * When running tasks using the host network mode, don't run containers using the root user (UID 0). We * recommend using a non-root user for better security. *

      *
      *

      * You can specify the user using 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 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.

      * *

      * When running tasks using the host network mode, don't run containers using the root user * (UID 0). We recommend using a non-root user for better security. *

      *
      *

      * You can specify the user using 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 final String user() { return user; } /** *

      * The working directory to run commands inside the container in. 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 to run commands inside the container in. This parameter maps to * WorkingDir in the Create a container section * of the Docker Remote API and the * --workdir option to docker run. */ public final 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 final 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 run on Fargate. *

      *
      * * @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 run on Fargate. *

      */ public final 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 final Boolean readonlyRootFilesystem() { return readonlyRootFilesystem; } /** * For responses, this returns true if the service returned a value for the DnsServers property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasDnsServers() { return dnsServers != null && !(dnsServers instanceof SdkAutoConstructList); } /** *

      * 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDnsServers} method. *

      * * @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 final List dnsServers() { return dnsServers; } /** * For responses, this returns true if the service returned a value for the DnsSearchDomains property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasDnsSearchDomains() { return dnsSearchDomains != null && !(dnsSearchDomains instanceof SdkAutoConstructList); } /** *

      * 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDnsSearchDomains} method. *

      * * @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 final List dnsSearchDomains() { return dnsSearchDomains; } /** * For responses, this returns true if the service returned a value for the ExtraHosts property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasExtraHosts() { return extraHosts != null && !(extraHosts instanceof SdkAutoConstructList); } /** *

      * 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 isn't 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasExtraHosts} method. *

      * * @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 isn't supported for Windows containers or tasks that use the awsvpc network * mode. *

      */ public final List extraHosts() { return extraHosts; } /** * For responses, this returns true if the service returned a value for the DockerSecurityOptions property. This * DOES NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the * property). This is useful because the SDK will never return a null collection or map, but you may need to * differentiate between the service returning nothing (or null) and the service returning an empty collection or * map. For requests, this returns true if a value for the property was specified in the request builder, and false * if a value was not specified. */ public final boolean hasDockerSecurityOptions() { return dockerSecurityOptions != null && !(dockerSecurityOptions instanceof SdkAutoConstructList); } /** *

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

      *

      * With Windows containers, this parameter can be used to reference a credential spec file when configuring a * container for Active Directory authentication. For more information, see Using gMSAs for Windows * Containers in the Amazon Elastic Container Service Developer Guide. *

      *

      * 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. *

      *
      *

      * For more information about valid values, see Docker Run Security * Configuration. *

      *

      * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | "credentialspec:CredentialSpecFilePath" *

      *

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

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDockerSecurityOptions} method. *

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

      *

      * With Windows containers, this parameter can be used to reference a credential spec file when configuring * a container for Active Directory authentication. For more information, see Using gMSAs for * Windows Containers in the Amazon Elastic Container Service Developer Guide. *

      *

      * 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. *

      *
      *

      * For more information about valid values, see Docker Run Security * Configuration. *

      *

      * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | * "credentialspec:CredentialSpecFilePath" */ public final List dockerSecurityOptions() { return dockerSecurityOptions; } /** *

      * When this parameter is true, you can 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, you can 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 final 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 final Boolean pseudoTerminal() { return pseudoTerminal; } /** * For responses, this returns true if the service returned a value for the DockerLabels property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasDockerLabels() { return dockerLabels != null && !(dockerLabels instanceof SdkAutoConstructMap); } /** *

      * 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasDockerLabels} method. *

      * * @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 final Map dockerLabels() { return dockerLabels; } /** * For responses, this returns true if the service returned a value for the Ulimits property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasUlimits() { return ulimits != null && !(ulimits instanceof SdkAutoConstructList); } /** *

      * A list of ulimits to set in the container. If a ulimit value is specified in a task definition, it * overrides the default values set by Docker. 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. *

      *

      * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The nofile * resource limit sets a restriction on the number of open files that a container can use. The default * nofile soft limit is 1024 and hard limit is 4096. *

      *

      * 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasUlimits} method. *

      * * @return A list of ulimits to set in the container. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. 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.

      *

      * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with * the exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can * use. The default nofile soft limit is 1024 and hard limit is 4096. *

      *

      * 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 final 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 can 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 about 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 can 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 about 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 final LogConfiguration logConfiguration() { return logConfiguration; } /** *

      * The container 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 container 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 final HealthCheck healthCheck() { return healthCheck; } /** * For responses, this returns true if the service returned a value for the SystemControls property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasSystemControls() { return systemControls != null && !(systemControls instanceof SdkAutoConstructList); } /** *

      * 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. *

      * *

      * We don't 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's 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasSystemControls} method. *

      * * @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.

      *

      * We don't 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's 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 final List systemControls() { return systemControls; } /** * For responses, this returns true if the service returned a value for the ResourceRequirements property. This DOES * NOT check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. */ public final boolean hasResourceRequirements() { return resourceRequirements != null && !(resourceRequirements instanceof SdkAutoConstructList); } /** *

      * 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. *

      *

      * This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasResourceRequirements} method. *

      * * @return The type and amount of a resource to assign to a container. The only supported resource is a GPU. */ public final List resourceRequirements() { return resourceRequirements; } /** *

      * The FireLens configuration for the container. This is used to specify and configure a log router for container * logs. For more information, see Custom Log Routing in * the Amazon Elastic Container Service Developer Guide. *

      * * @return The FireLens configuration for the container. This is used to specify and configure a log router for * container logs. For more information, see Custom Log * Routing in the Amazon Elastic Container Service Developer Guide. */ public final FirelensConfiguration firelensConfiguration() { return firelensConfiguration; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final 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(hasLinks() ? links() : null); hashCode = 31 * hashCode + Objects.hashCode(hasPortMappings() ? portMappings() : null); hashCode = 31 * hashCode + Objects.hashCode(essential()); hashCode = 31 * hashCode + Objects.hashCode(hasEntryPoint() ? entryPoint() : null); hashCode = 31 * hashCode + Objects.hashCode(hasCommand() ? command() : null); hashCode = 31 * hashCode + Objects.hashCode(hasEnvironment() ? environment() : null); hashCode = 31 * hashCode + Objects.hashCode(hasEnvironmentFiles() ? environmentFiles() : null); hashCode = 31 * hashCode + Objects.hashCode(hasMountPoints() ? mountPoints() : null); hashCode = 31 * hashCode + Objects.hashCode(hasVolumesFrom() ? volumesFrom() : null); hashCode = 31 * hashCode + Objects.hashCode(linuxParameters()); hashCode = 31 * hashCode + Objects.hashCode(hasSecrets() ? secrets() : null); hashCode = 31 * hashCode + Objects.hashCode(hasDependsOn() ? dependsOn() : null); 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(hasDnsServers() ? dnsServers() : null); hashCode = 31 * hashCode + Objects.hashCode(hasDnsSearchDomains() ? dnsSearchDomains() : null); hashCode = 31 * hashCode + Objects.hashCode(hasExtraHosts() ? extraHosts() : null); hashCode = 31 * hashCode + Objects.hashCode(hasDockerSecurityOptions() ? dockerSecurityOptions() : null); hashCode = 31 * hashCode + Objects.hashCode(interactive()); hashCode = 31 * hashCode + Objects.hashCode(pseudoTerminal()); hashCode = 31 * hashCode + Objects.hashCode(hasDockerLabels() ? dockerLabels() : null); hashCode = 31 * hashCode + Objects.hashCode(hasUlimits() ? ulimits() : null); hashCode = 31 * hashCode + Objects.hashCode(logConfiguration()); hashCode = 31 * hashCode + Objects.hashCode(healthCheck()); hashCode = 31 * hashCode + Objects.hashCode(hasSystemControls() ? systemControls() : null); hashCode = 31 * hashCode + Objects.hashCode(hasResourceRequirements() ? resourceRequirements() : null); hashCode = 31 * hashCode + Objects.hashCode(firelensConfiguration()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final 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()) && hasLinks() == other.hasLinks() && Objects.equals(links(), other.links()) && hasPortMappings() == other.hasPortMappings() && Objects.equals(portMappings(), other.portMappings()) && Objects.equals(essential(), other.essential()) && hasEntryPoint() == other.hasEntryPoint() && Objects.equals(entryPoint(), other.entryPoint()) && hasCommand() == other.hasCommand() && Objects.equals(command(), other.command()) && hasEnvironment() == other.hasEnvironment() && Objects.equals(environment(), other.environment()) && hasEnvironmentFiles() == other.hasEnvironmentFiles() && Objects.equals(environmentFiles(), other.environmentFiles()) && hasMountPoints() == other.hasMountPoints() && Objects.equals(mountPoints(), other.mountPoints()) && hasVolumesFrom() == other.hasVolumesFrom() && Objects.equals(volumesFrom(), other.volumesFrom()) && Objects.equals(linuxParameters(), other.linuxParameters()) && hasSecrets() == other.hasSecrets() && Objects.equals(secrets(), other.secrets()) && hasDependsOn() == other.hasDependsOn() && 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()) && hasDnsServers() == other.hasDnsServers() && Objects.equals(dnsServers(), other.dnsServers()) && hasDnsSearchDomains() == other.hasDnsSearchDomains() && Objects.equals(dnsSearchDomains(), other.dnsSearchDomains()) && hasExtraHosts() == other.hasExtraHosts() && Objects.equals(extraHosts(), other.extraHosts()) && hasDockerSecurityOptions() == other.hasDockerSecurityOptions() && Objects.equals(dockerSecurityOptions(), other.dockerSecurityOptions()) && Objects.equals(interactive(), other.interactive()) && Objects.equals(pseudoTerminal(), other.pseudoTerminal()) && hasDockerLabels() == other.hasDockerLabels() && Objects.equals(dockerLabels(), other.dockerLabels()) && hasUlimits() == other.hasUlimits() && Objects.equals(ulimits(), other.ulimits()) && Objects.equals(logConfiguration(), other.logConfiguration()) && Objects.equals(healthCheck(), other.healthCheck()) && hasSystemControls() == other.hasSystemControls() && Objects.equals(systemControls(), other.systemControls()) && hasResourceRequirements() == other.hasResourceRequirements() && Objects.equals(resourceRequirements(), other.resourceRequirements()) && Objects.equals(firelensConfiguration(), other.firelensConfiguration()); } /** * 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 final 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", hasLinks() ? links() : null) .add("PortMappings", hasPortMappings() ? portMappings() : null).add("Essential", essential()) .add("EntryPoint", hasEntryPoint() ? entryPoint() : null).add("Command", hasCommand() ? command() : null) .add("Environment", hasEnvironment() ? environment() : null) .add("EnvironmentFiles", hasEnvironmentFiles() ? environmentFiles() : null) .add("MountPoints", hasMountPoints() ? mountPoints() : null) .add("VolumesFrom", hasVolumesFrom() ? volumesFrom() : null).add("LinuxParameters", linuxParameters()) .add("Secrets", hasSecrets() ? secrets() : null).add("DependsOn", hasDependsOn() ? dependsOn() : null) .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", hasDnsServers() ? dnsServers() : null) .add("DnsSearchDomains", hasDnsSearchDomains() ? dnsSearchDomains() : null) .add("ExtraHosts", hasExtraHosts() ? extraHosts() : null) .add("DockerSecurityOptions", hasDockerSecurityOptions() ? dockerSecurityOptions() : null) .add("Interactive", interactive()).add("PseudoTerminal", pseudoTerminal()) .add("DockerLabels", hasDockerLabels() ? dockerLabels() : null).add("Ulimits", hasUlimits() ? ulimits() : null) .add("LogConfiguration", logConfiguration()).add("HealthCheck", healthCheck()) .add("SystemControls", hasSystemControls() ? systemControls() : null) .add("ResourceRequirements", hasResourceRequirements() ? resourceRequirements() : null) .add("FirelensConfiguration", firelensConfiguration()).build(); } public final 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 "environmentFiles": return Optional.ofNullable(clazz.cast(environmentFiles())); 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())); case "firelensConfiguration": return Optional.ofNullable(clazz.cast(firelensConfiguration())); default: return Optional.empty(); } } @Override public final 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're 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, underscores, 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're 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, underscores, 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. By default, images * in the Docker Hub registry are available. 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 aren't 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. By default, * images in the Docker Hub registry are available. 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 aren't 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 method 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. *

        *
        *

        * 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's 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 is guaranteed a minimum of 512 CPU units * when needed. Moreover, each container could float to higher CPU usage if the other container was not using * it. 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 isn't 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's described in the task definition. A null or * zero CPU value is passed to Docker as 0, which Windows interprets as 1% of one CPU. *

        * * @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. *

        *
        *

        * 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's 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 is guaranteed a * minimum of 512 CPU units when needed. Moreover, each container could float to higher CPU usage if the * other container was not using it. 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 isn't 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's described in the task definition. A * null or zero CPU value is passed to Docker as 0, which Windows interprets as 1% of one * CPU. * @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 using the Fargate launch type, this parameter is optional. *

        *

        * If using the EC2 launch type, you must specify either a task-level memory value or a container-level memory * value. If you specify both a container-level memory and memoryReservation value, * memory must be greater than memoryReservation. If you specify * memoryReservation, then that value is subtracted from the available memory resources for the * container instance where the container is placed. Otherwise, the value of memory is used. *

        *

        * The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container. So, don't specify * less than 6 MiB of memory for your containers. *

        *

        * The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container. So, don't * specify less 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 using the Fargate launch type, this parameter is optional. *

        *

        * If using the EC2 launch type, you must specify either a task-level memory value or a container-level * memory value. If you specify both a container-level memory and * memoryReservation value, memory must be greater than * memoryReservation. If you specify memoryReservation, then that value is * subtracted from the available memory resources for the container instance where the container is * placed. Otherwise, the value of memory is used. *

        *

        * The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container. So, don't * specify less than 6 MiB of memory for your containers. *

        *

        * The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container. So, * don't specify less 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. *

        *

        * If a task-level memory value is not specified, you must specify a non-zero integer for one or both of * memory or memoryReservation in a container definition. 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 where 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. Therefore, we recommend that you * 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.

        *

        * If a task-level memory value is not specified, you must specify a non-zero integer for one or both of * memory or memoryReservation in a container definition. 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 where 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. Therefore, we recommend that * you 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, underscores, 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, * underscores, 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, underscores, 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, * underscores, 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, 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's no loopback for port mappings on Windows, so you can't 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, 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's no loopback for port mappings on Windows, so you can't 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, 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's no loopback for port mappings on Windows, so you can't 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, 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's no loopback for port mappings on Windows, so you can't 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, 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's no loopback for port mappings on Windows, so you can't 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 method 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, its failure doesn't 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's composed of multiple * containers, 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, its failure * doesn't 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's composed of * multiple containers, 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 don't 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's 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 don't 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's 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 don't 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's 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 don't 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's 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's 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 is a separated string * in the array. *

        * * @param command * The command that's 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 is 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's 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 is a separated string * in the array. *

        * * @param command * The command that's 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 is 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 don't recommend that you use 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 don't recommend that you use 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 don't recommend that you use 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 don't recommend that you use 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 don't recommend that you use plaintext environment variables for sensitive information, such as credential * data. *

        *
        This is a convenience method 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); /** *

        * A list of files containing the environment variables to pass to a container. This parameter maps to the * --env-file option to docker run. *

        *

        * You can specify up to ten environment files. The file must have a .env file extension. Each line * in an environment file contains an environment variable in VARIABLE=VALUE format. Lines * beginning with # are treated as comments and are ignored. For more information about the * environment variable file syntax, see Declare default * environment variables in file. *

        *

        * If there are environment variables specified using the environment parameter in a container * definition, they take precedence over the variables contained within an environment file. If multiple * environment files are specified that contain the same variable, they're processed from the top down. We * recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. *

        * * @param environmentFiles * A list of files containing the environment variables to pass to a container. This parameter maps to * the --env-file option to docker run.

        *

        * You can specify up to ten environment files. The file must have a .env file extension. * Each line in an environment file contains an environment variable in VARIABLE=VALUE * format. Lines beginning with # are treated as comments and are ignored. For more * information about the environment variable file syntax, see Declare default environment variables in file. *

        *

        * If there are environment variables specified using the environment parameter in a * container definition, they take precedence over the variables contained within an environment file. If * multiple environment files are specified that contain the same variable, they're processed from the * top down. We recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentFiles(Collection environmentFiles); /** *

        * A list of files containing the environment variables to pass to a container. This parameter maps to the * --env-file option to docker run. *

        *

        * You can specify up to ten environment files. The file must have a .env file extension. Each line * in an environment file contains an environment variable in VARIABLE=VALUE format. Lines * beginning with # are treated as comments and are ignored. For more information about the * environment variable file syntax, see Declare default * environment variables in file. *

        *

        * If there are environment variables specified using the environment parameter in a container * definition, they take precedence over the variables contained within an environment file. If multiple * environment files are specified that contain the same variable, they're processed from the top down. We * recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. *

        * * @param environmentFiles * A list of files containing the environment variables to pass to a container. This parameter maps to * the --env-file option to docker run.

        *

        * You can specify up to ten environment files. The file must have a .env file extension. * Each line in an environment file contains an environment variable in VARIABLE=VALUE * format. Lines beginning with # are treated as comments and are ignored. For more * information about the environment variable file syntax, see Declare default environment variables in file. *

        *

        * If there are environment variables specified using the environment parameter in a * container definition, they take precedence over the variables contained within an environment file. If * multiple environment files are specified that contain the same variable, they're processed from the * top down. We recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder environmentFiles(EnvironmentFile... environmentFiles); /** *

        * A list of files containing the environment variables to pass to a container. This parameter maps to the * --env-file option to docker run. *

        *

        * You can specify up to ten environment files. The file must have a .env file extension. Each line * in an environment file contains an environment variable in VARIABLE=VALUE format. Lines * beginning with # are treated as comments and are ignored. For more information about the * environment variable file syntax, see Declare default * environment variables in file. *

        *

        * If there are environment variables specified using the environment parameter in a container * definition, they take precedence over the variables contained within an environment file. If multiple * environment files are specified that contain the same variable, they're processed from the top down. We * recommend that you use unique variable names. For more information, see Specifying * Environment Variables in the Amazon Elastic Container Service Developer Guide. *

        * This is a convenience method 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 #environmentFiles(List)}. * * @param environmentFiles * 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 #environmentFiles(List) */ Builder environmentFiles(Consumer... environmentFiles); /** *

        * 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 can't mount directories on a different drive, and mount point can't 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 can't mount directories on a different drive, and mount point can't 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 can't mount directories on a different drive, and mount point can't 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 can't mount directories on a different drive, and mount point can't 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 can't mount directories on a different drive, and mount point can't be across drives. *

        * This is a convenience method 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 method 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 method 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 method 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 turn on 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're 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. *

        *

        * For tasks using the Fargate launch type, the task or service requires the following platforms: *

        *
          *
        • *

          * Linux platform version 1.3.0 or later. *

          *
        • *
        • *

          * Windows platform version 1.0.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 turn on 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're 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. *

        *

        * For tasks using the Fargate launch type, the task or service requires the following platforms: *

        *
          *
        • *

          * Linux platform version 1.3.0 or later. *

          *
        • *
        • *

          * Windows platform version 1.0.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 turn on 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're 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. *

          *

          * For tasks using the Fargate launch type, the task or service requires the following platforms: *

          *
            *
          • *

            * Linux platform version 1.3.0 or later. *

            *
          • *
          • *

            * Windows platform version 1.0.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 turn on 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're 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. *

          *

          * For tasks using the Fargate launch type, the task or service requires the following platforms: *

          *
            *
          • *

            * Linux platform version 1.3.0 or later. *

            *
          • *
          • *

            * Windows platform version 1.0.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 turn on 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're 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. *

            *

            * For tasks using the Fargate launch type, the task or service requires the following platforms: *

            *
              *
            • *

              * Linux platform version 1.3.0 or later. *

              *
            • *
            • *

              * Windows platform version 1.0.0 or later. *

              *
            • *
            * This is a convenience method 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 (in seconds) 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 doesn't reach the desired status within that time then containerA * gives up and not start. This results in the task transitioning to a STOPPED state. *

            * *

            * When the ECS_CONTAINER_START_TIMEOUT container agent configuration variable is used, it's * enforced independently from this start timeout value. *

            *
            *

            * For tasks using the Fargate launch type, the task or service requires the following platforms: *

            *
              *
            • *

              * Linux platform version 1.3.0 or later. *

              *
            • *
            • *

              * Windows platform version 1.0.0 or later. *

              *
            • *
            *

            * For tasks using the EC2 launch type, your container instances require at least version 1.26.0 of * the container agent to use 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're 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 startTimeout * Time duration (in seconds) 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 doesn't reach the desired status * within that time then containerA gives up and not start. This results in the task transitioning to a * STOPPED state.

            *

            * When the ECS_CONTAINER_START_TIMEOUT container agent configuration variable is used, it's * enforced independently from this start timeout value. *

            *
            *

            * For tasks using the Fargate launch type, the task or service requires the following platforms: *

            *
              *
            • *

              * Linux platform version 1.3.0 or later. *

              *
            • *
            • *

              * Windows platform version 1.0.0 or later. *

              *
            • *
            *

            * For tasks using the EC2 launch type, your container instances require at least version * 1.26.0 of the container agent to use 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're 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 startTimeout(Integer startTimeout); /** *

            * Time duration (in seconds) 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 task or service requires the following platforms: *

            *
              *
            • *

              * Linux platform version 1.3.0 or later. *

              *
            • *
            • *

              * Windows platform version 1.0.0 or later. *

              *
            • *
            *

            * The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 * seconds is used. *

            *

            * For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the value * set for the Amazon ECS container agent configuration variable ECS_CONTAINER_STOP_TIMEOUT is * used. If neither the stopTimeout parameter or the ECS_CONTAINER_STOP_TIMEOUT agent * configuration variable are set, then the default values of 30 seconds for Linux containers and 30 seconds on * Windows containers are used. Your container instances require at least version 1.26.0 of the container agent * to use 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're 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 (in seconds) 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 task or service requires the following platforms: *

            *
              *
            • *

              * Linux platform version 1.3.0 or later. *

              *
            • *
            • *

              * Windows platform version 1.0.0 or later. *

              *
            • *
            *

            * The max stop timeout value is 120 seconds and if the parameter is not specified, the default value of * 30 seconds is used. *

            *

            * For tasks that use the EC2 launch type, if the stopTimeout parameter isn't specified, the * value set for the Amazon ECS container agent configuration variable * ECS_CONTAINER_STOP_TIMEOUT is used. If neither the stopTimeout parameter or * the ECS_CONTAINER_STOP_TIMEOUT agent configuration variable are set, then the default * values of 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your * container instances require at least version 1.26.0 of the container agent to use 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're 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're 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're 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 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. *

            * *

            * When running tasks using the host network mode, don't run containers using the root user (UID * 0). We recommend using a non-root user for better security. *

            *
            *

            * You can specify the user using 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 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.

            * *

            * When running tasks using the host network mode, don't run containers using the root user * (UID 0). We recommend using a non-root user for better security. *

            *
            *

            * You can specify the user using 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 to run commands inside the container in. 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 to run commands inside the container in. 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 run on Fargate. *

            *
            * * @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 run on Fargate. *

            * @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 isn't 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 isn't 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 isn't 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 isn't 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 isn't supported for Windows containers or tasks that use the awsvpc network mode. *

            *
            This is a convenience method 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 * isn't valid for containers in tasks using the Fargate launch type. *

            *

            * With Windows containers, this parameter can be used to reference a credential spec file when configuring a * container for Active Directory authentication. For more information, see Using gMSAs for Windows * Containers in the Amazon Elastic Container Service Developer Guide. *

            *

            * 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. *

            *
            *

            * For more information about valid values, see Docker Run Security * Configuration. *

            *

            * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | * "credentialspec:CredentialSpecFilePath" *

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

            *

            * With Windows containers, this parameter can be used to reference a credential spec file when * configuring a container for Active Directory authentication. For more information, see Using gMSAs for * Windows Containers in the Amazon Elastic Container Service Developer Guide. *

            *

            * 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. *

            *
            *

            * For more information about valid values, see Docker Run Security * Configuration. *

            *

            * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | * "credentialspec:CredentialSpecFilePath" * @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 * isn't valid for containers in tasks using the Fargate launch type. *

            *

            * With Windows containers, this parameter can be used to reference a credential spec file when configuring a * container for Active Directory authentication. For more information, see Using gMSAs for Windows * Containers in the Amazon Elastic Container Service Developer Guide. *

            *

            * 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. *

            *
            *

            * For more information about valid values, see Docker Run Security * Configuration. *

            *

            * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | * "credentialspec:CredentialSpecFilePath" *

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

            *

            * With Windows containers, this parameter can be used to reference a credential spec file when * configuring a container for Active Directory authentication. For more information, see Using gMSAs for * Windows Containers in the Amazon Elastic Container Service Developer Guide. *

            *

            * 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. *

            *
            *

            * For more information about valid values, see Docker Run Security * Configuration. *

            *

            * Valid values: "no-new-privileges" | "apparmor:PROFILE" | "label:value" | * "credentialspec:CredentialSpecFilePath" * @return Returns a reference to this object so that method calls can be chained together. */ Builder dockerSecurityOptions(String... dockerSecurityOptions); /** *

            * When this parameter is true, you can 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, you can 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. If a ulimit value is specified in a task definition, * it overrides the default values set by Docker. 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. *

            *

            * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can use. * The default nofile soft limit is 1024 and hard limit is 4096. *

            *

            * 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. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. 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.

            *

            * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system * with the exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can * use. The default nofile soft limit is 1024 and hard limit is * 4096. *

            *

            * 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. If a ulimit value is specified in a task definition, * it overrides the default values set by Docker. 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. *

            *

            * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can use. * The default nofile soft limit is 1024 and hard limit is 4096. *

            *

            * 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. If a ulimit value is specified in a task * definition, it overrides the default values set by Docker. 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.

            *

            * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system * with the exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can * use. The default nofile soft limit is 1024 and hard limit is * 4096. *

            *

            * 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. If a ulimit value is specified in a task definition, * it overrides the default values set by Docker. 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. *

            *

            * Amazon ECS tasks hosted on Fargate use the default resource limit values set by the operating system with the * exception of the nofile resource limit parameter which Fargate overrides. The * nofile resource limit sets a restriction on the number of open files that a container can use. * The default nofile soft limit is 1024 and hard limit is 4096. *

            *

            * 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 method 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 can 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 about * 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 can * 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 about 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 can 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 about * 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 method 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 container 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 container 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 container 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 method 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. *

            * *

            * We don't 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's 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.

            *

            * We don't 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's 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. *

            * *

            * We don't 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's 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.

            *

            * We don't 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's 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. *

            * *

            * We don't 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's 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 method 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 method 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); /** *

            * The FireLens configuration for the container. This is used to specify and configure a log router for * container logs. For more information, see Custom Log Routing * in the Amazon Elastic Container Service Developer Guide. *

            * * @param firelensConfiguration * The FireLens configuration for the container. This is used to specify and configure a log router for * container logs. For more information, see Custom Log * Routing in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ Builder firelensConfiguration(FirelensConfiguration firelensConfiguration); /** *

            * The FireLens configuration for the container. This is used to specify and configure a log router for * container logs. For more information, see Custom Log Routing * in the Amazon Elastic Container Service Developer Guide. *

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy