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

com.amazonaws.services.gamelift.model.ContainerDefinitionInput Maven / Gradle / Ivy

/*
 * Copyright 2019-2024 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 com.amazonaws.services.gamelift.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* This data type is used with the Amazon GameLift containers feature, which is currently in public preview. *

*

* Describes a container's configuration, resources, and start instructions. Use this data type to create a container * group definition. For the properties of a container that's been deployed to a fleet, see ContainerDefinition. * You can't change these properties after you've created the container group definition. If you need a container group * with different properties, then you must create a new one. *

*

* Used with: CreateContainerGroupDefinition *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ContainerDefinitionInput implements Serializable, Cloneable, StructuredPojo { /** *

* A string that uniquely identifies the container definition within a container group. *

*/ private String containerName; /** *

* The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web * Services account and Amazon Web Services Region where you're creating the container group definition. For limits * on image size, see Amazon GameLift * endpoints and quotas. You can use any of the following image URI formats: *

*
    *
  • *

    * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

    *
  • *
  • *

    * Image ID and digest: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

    *
  • *
  • *

    * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

    *
  • *
*/ private String imageUri; /** *

* The amount of memory to make available to the container. If you don't specify memory limits for this container, * then it shares the container group's total memory allocation. *

*

* Related data type: ContainerGroupDefinition$TotalMemoryLimit *

*/ private ContainerMemoryLimits memoryLimits; /** *

* A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound * traffic connections, including game server processes, must be assigned a port from this set. The set of ports * must be large enough to assign one to each process in the container that needs one. If the container includes * your game server, include enough ports to assign one port to each concurrent server process (as defined in a * container fleet's RuntimeConfiguration). For more details, see Networking for container * fleets. *

*

* Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. *

*/ private ContainerPortConfiguration portConfiguration; /** *

* The number of CPU units to reserve for this container. The container can use more resources when needed, if * available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it * shares the total CPU limit for the container group. This property is similar to the Amazon ECS container * definition parameter environment (Amazon Elastic Container Service Developer Guide). *

*

* Related data type: ContainerGroupDefinition$TotalCpuLimit *

*/ private Integer cpu; /** *

* Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This * parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a * health check for any container except for the essential container in the replica container group. If an essential * container in the daemon group fails a health check, the entire container group is restarted. *

*/ private ContainerHealthCheck healthCheck; /** *

* A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the * ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. *

*/ private java.util.List command; /** *

* Specifies whether the container is vital for the container group to function properly. If an essential container * fails, it causes the entire container group to restart. Each container group must have an essential container. *

*

* Replica container groups - A replica group must have exactly one essential container. Use the following to * configure an essential replica container: *

*
    *
  • *

    * Choose a container is running your game server and the Amazon GameLift Agent. *

    *
  • *
  • *

    * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

    *
  • *
  • *

    * Don't configure a health check. The Agent handles this task for the essential replica container. *

    *
  • *
*

* Daemon container groups - A daemon group must have at least one essential container. *

*

*

*/ private Boolean essential; /** *

* An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference. *

*/ private java.util.List entryPoint; /** *

* The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. *

*/ private String workingDirectory; /** *

* A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference. *

*/ private java.util.List environment; /** *

* Sets up dependencies between this container and the status of other containers in the same container group. A * container can have dependencies on multiple different containers. *

*

* You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup * dependency is reversed on shutdown. *

*

* For example, you might specify that SideCarContainerB has a START dependency on SideCarContainerA. * This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This * dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA * can shut down. *

*/ private java.util.List dependsOn; /** *

* A string that uniquely identifies the container definition within a container group. *

* * @param containerName * A string that uniquely identifies the container definition within a container group. */ public void setContainerName(String containerName) { this.containerName = containerName; } /** *

* A string that uniquely identifies the container definition within a container group. *

* * @return A string that uniquely identifies the container definition within a container group. */ public String getContainerName() { return this.containerName; } /** *

* A string that uniquely identifies the container definition within a container group. *

* * @param containerName * A string that uniquely identifies the container definition within a container group. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withContainerName(String containerName) { setContainerName(containerName); return this; } /** *

* The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web * Services account and Amazon Web Services Region where you're creating the container group definition. For limits * on image size, see Amazon GameLift * endpoints and quotas. You can use any of the following image URI formats: *

*
    *
  • *

    * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

    *
  • *
  • *

    * Image ID and digest: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

    *
  • *
  • *

    * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

    *
  • *
* * @param imageUri * The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon * Web Services account and Amazon Web Services Region where you're creating the container group definition. * For limits on image size, see Amazon * GameLift endpoints and quotas. You can use any of the following image URI formats:

*
    *
  • *

    * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

    *
  • *
  • *

    * Image ID and digest: * [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

    *
  • *
  • *

    * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

    *
  • */ public void setImageUri(String imageUri) { this.imageUri = imageUri; } /** *

    * The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web * Services account and Amazon Web Services Region where you're creating the container group definition. For limits * on image size, see Amazon GameLift * endpoints and quotas. You can use any of the following image URI formats: *

    *
      *
    • *

      * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

      *
    • *
    • *

      * Image ID and digest: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

      *
    • *
    • *

      * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

      *
    • *
    * * @return The location of a container image that $short; will copy and deploy to a container fleet. Images in * Amazon Elastic Container Registry private repositories are supported. The repository must be in the same * Amazon Web Services account and Amazon Web Services Region where you're creating the container group * definition. For limits on image size, see Amazon GameLift endpoints and * quotas. You can use any of the following image URI formats:

    *
      *
    • *

      * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

      *
    • *
    • *

      * Image ID and digest: * [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

      *
    • *
    • *

      * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

      *
    • */ public String getImageUri() { return this.imageUri; } /** *

      * The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon Web * Services account and Amazon Web Services Region where you're creating the container group definition. For limits * on image size, see Amazon GameLift * endpoints and quotas. You can use any of the following image URI formats: *

      *
        *
      • *

        * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

        *
      • *
      • *

        * Image ID and digest: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

        *
      • *
      • *

        * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

        *
      • *
      * * @param imageUri * The location of a container image that $short; will copy and deploy to a container fleet. Images in Amazon * Elastic Container Registry private repositories are supported. The repository must be in the same Amazon * Web Services account and Amazon Web Services Region where you're creating the container group definition. * For limits on image size, see Amazon * GameLift endpoints and quotas. You can use any of the following image URI formats:

      *
        *
      • *

        * Image ID only: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID] *

        *
      • *
      • *

        * Image ID and digest: * [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]@[digest] *

        *
      • *
      • *

        * Image ID and tag: [AWS account].dkr.ecr.[AWS region].amazonaws.com/[repository ID]:[tag] *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withImageUri(String imageUri) { setImageUri(imageUri); return this; } /** *

        * The amount of memory to make available to the container. If you don't specify memory limits for this container, * then it shares the container group's total memory allocation. *

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit *

        * * @param memoryLimits * The amount of memory to make available to the container. If you don't specify memory limits for this * container, then it shares the container group's total memory allocation.

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit */ public void setMemoryLimits(ContainerMemoryLimits memoryLimits) { this.memoryLimits = memoryLimits; } /** *

        * The amount of memory to make available to the container. If you don't specify memory limits for this container, * then it shares the container group's total memory allocation. *

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit *

        * * @return The amount of memory to make available to the container. If you don't specify memory limits for this * container, then it shares the container group's total memory allocation.

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit */ public ContainerMemoryLimits getMemoryLimits() { return this.memoryLimits; } /** *

        * The amount of memory to make available to the container. If you don't specify memory limits for this container, * then it shares the container group's total memory allocation. *

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit *

        * * @param memoryLimits * The amount of memory to make available to the container. If you don't specify memory limits for this * container, then it shares the container group's total memory allocation.

        *

        * Related data type: ContainerGroupDefinition$TotalMemoryLimit * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withMemoryLimits(ContainerMemoryLimits memoryLimits) { setMemoryLimits(memoryLimits); return this; } /** *

        * A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound * traffic connections, including game server processes, must be assigned a port from this set. The set of ports * must be large enough to assign one to each process in the container that needs one. If the container includes * your game server, include enough ports to assign one port to each concurrent server process (as defined in a * container fleet's RuntimeConfiguration). For more details, see Networking for container * fleets. *

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. *

        * * @param portConfiguration * A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept * inbound traffic connections, including game server processes, must be assigned a port from this set. The * set of ports must be large enough to assign one to each process in the container that needs one. If the * container includes your game server, include enough ports to assign one port to each concurrent server * process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for * container fleets.

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. */ public void setPortConfiguration(ContainerPortConfiguration portConfiguration) { this.portConfiguration = portConfiguration; } /** *

        * A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound * traffic connections, including game server processes, must be assigned a port from this set. The set of ports * must be large enough to assign one to each process in the container that needs one. If the container includes * your game server, include enough ports to assign one port to each concurrent server process (as defined in a * container fleet's RuntimeConfiguration). For more details, see Networking for container * fleets. *

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. *

        * * @return A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept * inbound traffic connections, including game server processes, must be assigned a port from this set. The * set of ports must be large enough to assign one to each process in the container that needs one. If the * container includes your game server, include enough ports to assign one port to each concurrent server * process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for * container fleets.

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports * to externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. */ public ContainerPortConfiguration getPortConfiguration() { return this.portConfiguration; } /** *

        * A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept inbound * traffic connections, including game server processes, must be assigned a port from this set. The set of ports * must be large enough to assign one to each process in the container that needs one. If the container includes * your game server, include enough ports to assign one port to each concurrent server process (as defined in a * container fleet's RuntimeConfiguration). For more details, see Networking for container * fleets. *

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. *

        * * @param portConfiguration * A set of ports that Amazon GameLift can assign to processes in the container. All processes that accept * inbound traffic connections, including game server processes, must be assigned a port from this set. The * set of ports must be large enough to assign one to each process in the container that needs one. If the * container includes your game server, include enough ports to assign one port to each concurrent server * process (as defined in a container fleet's RuntimeConfiguration). For more details, see Networking for * container fleets.

        *

        * Container ports aren't directly accessed by inbound traffic. Amazon GameLift maps these container ports to * externally accessible connection ports, which are assigned as needed from the container fleet's * ConnectionPortRange. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withPortConfiguration(ContainerPortConfiguration portConfiguration) { setPortConfiguration(portConfiguration); return this; } /** *

        * The number of CPU units to reserve for this container. The container can use more resources when needed, if * available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it * shares the total CPU limit for the container group. This property is similar to the Amazon ECS container * definition parameter environment (Amazon Elastic Container Service Developer Guide). *

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit *

        * * @param cpu * The number of CPU units to reserve for this container. The container can use more resources when needed, * if available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, * then it shares the total CPU limit for the container group. This property is similar to the Amazon ECS * container definition parameter environment (Amazon Elastic Container Service Developer Guide).

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit */ public void setCpu(Integer cpu) { this.cpu = cpu; } /** *

        * The number of CPU units to reserve for this container. The container can use more resources when needed, if * available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it * shares the total CPU limit for the container group. This property is similar to the Amazon ECS container * definition parameter environment (Amazon Elastic Container Service Developer Guide). *

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit *

        * * @return The number of CPU units to reserve for this container. The container can use more resources when needed, * if available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, * then it shares the total CPU limit for the container group. This property is similar to the Amazon ECS * container definition parameter environment (Amazon Elastic Container Service Developer Guide).

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit */ public Integer getCpu() { return this.cpu; } /** *

        * The number of CPU units to reserve for this container. The container can use more resources when needed, if * available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, then it * shares the total CPU limit for the container group. This property is similar to the Amazon ECS container * definition parameter environment (Amazon Elastic Container Service Developer Guide). *

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit *

        * * @param cpu * The number of CPU units to reserve for this container. The container can use more resources when needed, * if available. Note: 1 vCPU unit equals 1024 CPU units. If you don't reserve CPU units for this container, * then it shares the total CPU limit for the container group. This property is similar to the Amazon ECS * container definition parameter environment (Amazon Elastic Container Service Developer Guide).

        *

        * Related data type: ContainerGroupDefinition$TotalCpuLimit * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withCpu(Integer cpu) { setCpu(cpu); return this; } /** *

        * Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This * parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a * health check for any container except for the essential container in the replica container group. If an essential * container in the daemon group fails a health check, the entire container group is restarted. *

        * * @param healthCheck * Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. * This parameter lets you define additional reasons to consider a container unhealthy and restart it. You * can set a health check for any container except for the essential container in the replica container * group. If an essential container in the daemon group fails a health check, the entire container group is * restarted. */ public void setHealthCheck(ContainerHealthCheck healthCheck) { this.healthCheck = healthCheck; } /** *

        * Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This * parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a * health check for any container except for the essential container in the replica container group. If an essential * container in the daemon group fails a health check, the entire container group is restarted. *

        * * @return Configuration for a non-terminal health check. A container automatically restarts if it stops * functioning. This parameter lets you define additional reasons to consider a container unhealthy and * restart it. You can set a health check for any container except for the essential container in the * replica container group. If an essential container in the daemon group fails a health check, the entire * container group is restarted. */ public ContainerHealthCheck getHealthCheck() { return this.healthCheck; } /** *

        * Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. This * parameter lets you define additional reasons to consider a container unhealthy and restart it. You can set a * health check for any container except for the essential container in the replica container group. If an essential * container in the daemon group fails a health check, the entire container group is restarted. *

        * * @param healthCheck * Configuration for a non-terminal health check. A container automatically restarts if it stops functioning. * This parameter lets you define additional reasons to consider a container unhealthy and restart it. You * can set a health check for any container except for the essential container in the replica container * group. If an essential container in the daemon group fails a health check, the entire container group is * restarted. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withHealthCheck(ContainerHealthCheck healthCheck) { setHealthCheck(healthCheck); return this; } /** *

        * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the * ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. *

        * * @return A command to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. */ public java.util.List getCommand() { return command; } /** *

        * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the * ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. *

        * * @param command * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. */ public void setCommand(java.util.Collection command) { if (command == null) { this.command = null; return; } this.command = new java.util.ArrayList(command); } /** *

        * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the * ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setCommand(java.util.Collection)} or {@link #withCommand(java.util.Collection)} if you want to override * the existing values. *

        * * @param command * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withCommand(String... command) { if (this.command == null) { setCommand(new java.util.ArrayList(command.length)); } for (String ele : command) { this.command.add(ele); } return this; } /** *

        * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. See the * ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. *

        * * @param command * A command to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition command parameter in the Amazon Elastic Container Service API reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withCommand(java.util.Collection command) { setCommand(command); return this; } /** *

        * Specifies whether the container is vital for the container group to function properly. If an essential container * fails, it causes the entire container group to restart. Each container group must have an essential container. *

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the following to * configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        *

        * * @param essential * Specifies whether the container is vital for the container group to function properly. If an essential * container fails, it causes the entire container group to restart. Each container group must have an * essential container.

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the * following to configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        */ public void setEssential(Boolean essential) { this.essential = essential; } /** *

        * Specifies whether the container is vital for the container group to function properly. If an essential container * fails, it causes the entire container group to restart. Each container group must have an essential container. *

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the following to * configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        *

        * * @return Specifies whether the container is vital for the container group to function properly. If an essential * container fails, it causes the entire container group to restart. Each container group must have an * essential container.

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the * following to configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        */ public Boolean getEssential() { return this.essential; } /** *

        * Specifies whether the container is vital for the container group to function properly. If an essential container * fails, it causes the entire container group to restart. Each container group must have an essential container. *

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the following to * configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        *

        * * @param essential * Specifies whether the container is vital for the container group to function properly. If an essential * container fails, it causes the entire container group to restart. Each container group must have an * essential container.

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the * following to configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withEssential(Boolean essential) { setEssential(essential); return this; } /** *

        * Specifies whether the container is vital for the container group to function properly. If an essential container * fails, it causes the entire container group to restart. Each container group must have an essential container. *

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the following to * configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        *

        * * @return Specifies whether the container is vital for the container group to function properly. If an essential * container fails, it causes the entire container group to restart. Each container group must have an * essential container.

        *

        * Replica container groups - A replica group must have exactly one essential container. Use the * following to configure an essential replica container: *

        *
          *
        • *

          * Choose a container is running your game server and the Amazon GameLift Agent. *

          *
        • *
        • *

          * Include a port configuration. This container runs your game server processes, and each process requires a * container port to allow access to game clients. *

          *
        • *
        • *

          * Don't configure a health check. The Agent handles this task for the essential replica container. *

          *
        • *
        *

        * Daemon container groups - A daemon group must have at least one essential container. *

        *

        */ public Boolean isEssential() { return this.essential; } /** *

        * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference. *

        * * @return An entry point to pass to the container on startup. Add multiple arguments as additional strings in the * array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API * Reference. */ public java.util.List getEntryPoint() { return entryPoint; } /** *

        * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference. *

        * * @param entryPoint * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the * array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API * Reference. */ public void setEntryPoint(java.util.Collection entryPoint) { if (entryPoint == null) { this.entryPoint = null; return; } this.entryPoint = new java.util.ArrayList(entryPoint); } /** *

        * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setEntryPoint(java.util.Collection)} or {@link #withEntryPoint(java.util.Collection)} if you want to * override the existing values. *

        * * @param entryPoint * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the * array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API * Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withEntryPoint(String... entryPoint) { if (this.entryPoint == null) { setEntryPoint(new java.util.ArrayList(entryPoint.length)); } for (String ele : entryPoint) { this.entryPoint.add(ele); } return this; } /** *

        * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the array. * See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API Reference. *

        * * @param entryPoint * An entry point to pass to the container on startup. Add multiple arguments as additional strings in the * array. See the ContainerDefinition::entryPoint parameter in the Amazon Elastic Container Service API * Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withEntryPoint(java.util.Collection entryPoint) { setEntryPoint(entryPoint); return this; } /** *

        * The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. *

        * * @param workingDirectory * The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. */ public void setWorkingDirectory(String workingDirectory) { this.workingDirectory = workingDirectory; } /** *

        * The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. *

        * * @return The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. */ public String getWorkingDirectory() { return this.workingDirectory; } /** *

        * The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. *

        * * @param workingDirectory * The directory in the container where commands are run. See the ContainerDefinition::workingDirectory parameter in the Amazon Elastic Container Service API * Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withWorkingDirectory(String workingDirectory) { setWorkingDirectory(workingDirectory); return this; } /** *

        * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference. *

        * * @return A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API * Reference. */ public java.util.List getEnvironment() { return environment; } /** *

        * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference. *

        * * @param environment * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API * Reference. */ public void setEnvironment(java.util.Collection environment) { if (environment == null) { this.environment = null; return; } this.environment = new java.util.ArrayList(environment); } /** *

        * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setEnvironment(java.util.Collection)} or {@link #withEnvironment(java.util.Collection)} if you want to * override the existing values. *

        * * @param environment * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API * Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withEnvironment(ContainerEnvironment... environment) { if (this.environment == null) { setEnvironment(new java.util.ArrayList(environment.length)); } for (ContainerEnvironment ele : environment) { this.environment.add(ele); } return this; } /** *

        * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API Reference. *

        * * @param environment * A set of environment variables to pass to the container on startup. See the ContainerDefinition::environment parameter in the Amazon Elastic Container Service API * Reference. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withEnvironment(java.util.Collection environment) { setEnvironment(environment); return this; } /** *

        * Sets up dependencies between this container and the status of other containers in the same container group. A * container can have dependencies on multiple different containers. *

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup * dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on SideCarContainerA. * This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This * dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA * can shut down. *

        * * @return Sets up dependencies between this container and the status of other containers in the same container * group. A container can have dependencies on multiple different containers.

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container * startup dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on * SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA * has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down * before SideCarContainerA can shut down. */ public java.util.List getDependsOn() { return dependsOn; } /** *

        * Sets up dependencies between this container and the status of other containers in the same container group. A * container can have dependencies on multiple different containers. *

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup * dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on SideCarContainerA. * This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This * dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA * can shut down. *

        * * @param dependsOn * Sets up dependencies between this container and the status of other containers in the same container * group. A container can have dependencies on multiple different containers.

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container * startup dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on * SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA * has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down * before SideCarContainerA can shut down. */ public void setDependsOn(java.util.Collection dependsOn) { if (dependsOn == null) { this.dependsOn = null; return; } this.dependsOn = new java.util.ArrayList(dependsOn); } /** *

        * Sets up dependencies between this container and the status of other containers in the same container group. A * container can have dependencies on multiple different containers. *

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup * dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on SideCarContainerA. * This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This * dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA * can shut down. *

        *

        * NOTE: This method appends the values to the existing list (if any). Use * {@link #setDependsOn(java.util.Collection)} or {@link #withDependsOn(java.util.Collection)} if you want to * override the existing values. *

        * * @param dependsOn * Sets up dependencies between this container and the status of other containers in the same container * group. A container can have dependencies on multiple different containers.

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container * startup dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on * SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA * has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down * before SideCarContainerA can shut down. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withDependsOn(ContainerDependency... dependsOn) { if (this.dependsOn == null) { setDependsOn(new java.util.ArrayList(dependsOn.length)); } for (ContainerDependency ele : dependsOn) { this.dependsOn.add(ele); } return this; } /** *

        * Sets up dependencies between this container and the status of other containers in the same container group. A * container can have dependencies on multiple different containers. *

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container startup * dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on SideCarContainerA. * This dependency means that SideCarContainerB can't start until after SideCarContainerA has started. This * dependency is reversed on shutdown, which means that SideCarContainerB must shut down before SideCarContainerA * can shut down. *

        * * @param dependsOn * Sets up dependencies between this container and the status of other containers in the same container * group. A container can have dependencies on multiple different containers.

        *

        * You can use dependencies to establish a startup/shutdown sequence across the container group. A container * startup dependency is reversed on shutdown. *

        *

        * For example, you might specify that SideCarContainerB has a START dependency on * SideCarContainerA. This dependency means that SideCarContainerB can't start until after SideCarContainerA * has started. This dependency is reversed on shutdown, which means that SideCarContainerB must shut down * before SideCarContainerA can shut down. * @return Returns a reference to this object so that method calls can be chained together. */ public ContainerDefinitionInput withDependsOn(java.util.Collection dependsOn) { setDependsOn(dependsOn); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getContainerName() != null) sb.append("ContainerName: ").append(getContainerName()).append(","); if (getImageUri() != null) sb.append("ImageUri: ").append(getImageUri()).append(","); if (getMemoryLimits() != null) sb.append("MemoryLimits: ").append(getMemoryLimits()).append(","); if (getPortConfiguration() != null) sb.append("PortConfiguration: ").append(getPortConfiguration()).append(","); if (getCpu() != null) sb.append("Cpu: ").append(getCpu()).append(","); if (getHealthCheck() != null) sb.append("HealthCheck: ").append(getHealthCheck()).append(","); if (getCommand() != null) sb.append("Command: ").append(getCommand()).append(","); if (getEssential() != null) sb.append("Essential: ").append(getEssential()).append(","); if (getEntryPoint() != null) sb.append("EntryPoint: ").append(getEntryPoint()).append(","); if (getWorkingDirectory() != null) sb.append("WorkingDirectory: ").append(getWorkingDirectory()).append(","); if (getEnvironment() != null) sb.append("Environment: ").append(getEnvironment()).append(","); if (getDependsOn() != null) sb.append("DependsOn: ").append(getDependsOn()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ContainerDefinitionInput == false) return false; ContainerDefinitionInput other = (ContainerDefinitionInput) obj; if (other.getContainerName() == null ^ this.getContainerName() == null) return false; if (other.getContainerName() != null && other.getContainerName().equals(this.getContainerName()) == false) return false; if (other.getImageUri() == null ^ this.getImageUri() == null) return false; if (other.getImageUri() != null && other.getImageUri().equals(this.getImageUri()) == false) return false; if (other.getMemoryLimits() == null ^ this.getMemoryLimits() == null) return false; if (other.getMemoryLimits() != null && other.getMemoryLimits().equals(this.getMemoryLimits()) == false) return false; if (other.getPortConfiguration() == null ^ this.getPortConfiguration() == null) return false; if (other.getPortConfiguration() != null && other.getPortConfiguration().equals(this.getPortConfiguration()) == false) return false; if (other.getCpu() == null ^ this.getCpu() == null) return false; if (other.getCpu() != null && other.getCpu().equals(this.getCpu()) == false) return false; if (other.getHealthCheck() == null ^ this.getHealthCheck() == null) return false; if (other.getHealthCheck() != null && other.getHealthCheck().equals(this.getHealthCheck()) == false) return false; if (other.getCommand() == null ^ this.getCommand() == null) return false; if (other.getCommand() != null && other.getCommand().equals(this.getCommand()) == false) return false; if (other.getEssential() == null ^ this.getEssential() == null) return false; if (other.getEssential() != null && other.getEssential().equals(this.getEssential()) == false) return false; if (other.getEntryPoint() == null ^ this.getEntryPoint() == null) return false; if (other.getEntryPoint() != null && other.getEntryPoint().equals(this.getEntryPoint()) == false) return false; if (other.getWorkingDirectory() == null ^ this.getWorkingDirectory() == null) return false; if (other.getWorkingDirectory() != null && other.getWorkingDirectory().equals(this.getWorkingDirectory()) == false) return false; if (other.getEnvironment() == null ^ this.getEnvironment() == null) return false; if (other.getEnvironment() != null && other.getEnvironment().equals(this.getEnvironment()) == false) return false; if (other.getDependsOn() == null ^ this.getDependsOn() == null) return false; if (other.getDependsOn() != null && other.getDependsOn().equals(this.getDependsOn()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContainerName() == null) ? 0 : getContainerName().hashCode()); hashCode = prime * hashCode + ((getImageUri() == null) ? 0 : getImageUri().hashCode()); hashCode = prime * hashCode + ((getMemoryLimits() == null) ? 0 : getMemoryLimits().hashCode()); hashCode = prime * hashCode + ((getPortConfiguration() == null) ? 0 : getPortConfiguration().hashCode()); hashCode = prime * hashCode + ((getCpu() == null) ? 0 : getCpu().hashCode()); hashCode = prime * hashCode + ((getHealthCheck() == null) ? 0 : getHealthCheck().hashCode()); hashCode = prime * hashCode + ((getCommand() == null) ? 0 : getCommand().hashCode()); hashCode = prime * hashCode + ((getEssential() == null) ? 0 : getEssential().hashCode()); hashCode = prime * hashCode + ((getEntryPoint() == null) ? 0 : getEntryPoint().hashCode()); hashCode = prime * hashCode + ((getWorkingDirectory() == null) ? 0 : getWorkingDirectory().hashCode()); hashCode = prime * hashCode + ((getEnvironment() == null) ? 0 : getEnvironment().hashCode()); hashCode = prime * hashCode + ((getDependsOn() == null) ? 0 : getDependsOn().hashCode()); return hashCode; } @Override public ContainerDefinitionInput clone() { try { return (ContainerDefinitionInput) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.gamelift.model.transform.ContainerDefinitionInputMarshaller.getInstance().marshall(this, protocolMarshaller); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy