/* * Copyright 2018-2023 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.pipes.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The overrides that are sent to a container. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class BatchContainerOverrides implements Serializable, Cloneable, StructuredPojo { /** ** The command to send to the container that overrides the default command from the Docker image or the task * definition. *
*/ private java.util.List* The environment variables to send to the container. You can add new environment variables, which are added to the * container at launch, or you can override the existing environment variables from the Docker image or the task * definition. *
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for variables
* that Batch sets.
*
* The instance type to use for a multi-node parallel job. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*
* The type and amount of resources to assign to a container. This overrides the settings in the job definition. The
* supported resources include GPU
, MEMORY
, and VCPU
.
*
* The command to send to the container that overrides the default command from the Docker image or the task * definition. *
* * @return The command to send to the container that overrides the default command from the Docker image or the task * definition. */ public java.util.List* The command to send to the container that overrides the default command from the Docker image or the task * definition. *
* * @param command * The command to send to the container that overrides the default command from the Docker image or the task * definition. */ public void setCommand(java.util.Collection* The command to send to the container that overrides the default command from the Docker image or the task * definition. *
** 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 * The command to send to the container that overrides the default command from the Docker image or the task * definition. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchContainerOverrides withCommand(String... command) { if (this.command == null) { setCommand(new java.util.ArrayList* The command to send to the container that overrides the default command from the Docker image or the task * definition. *
* * @param command * The command to send to the container that overrides the default command from the Docker image or the task * definition. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchContainerOverrides withCommand(java.util.Collection* The environment variables to send to the container. You can add new environment variables, which are added to the * container at launch, or you can override the existing environment variables from the Docker image or the task * definition. *
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for variables
* that Batch sets.
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for
* variables that Batch sets.
*
* The environment variables to send to the container. You can add new environment variables, which are added to the * container at launch, or you can override the existing environment variables from the Docker image or the task * definition. *
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for variables
* that Batch sets.
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for
* variables that Batch sets.
*
* The environment variables to send to the container. You can add new environment variables, which are added to the * container at launch, or you can override the existing environment variables from the Docker image or the task * definition. *
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for variables
* that Batch sets.
*
* 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 * The environment variables to send to the container. You can add new environment variables, which are added * to the container at launch, or you can override the existing environment variables from the Docker image * or the task definition.
* Environment variables cannot start with "Batch
". This naming convention is reserved for
* variables that Batch sets.
*
* The environment variables to send to the container. You can add new environment variables, which are added to the * container at launch, or you can override the existing environment variables from the Docker image or the task * definition. *
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for variables
* that Batch sets.
*
* Environment variables cannot start with "Batch
". This naming convention is reserved for
* variables that Batch sets.
*
* The instance type to use for a multi-node parallel job. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*/ public void setInstanceType(String instanceType) { this.instanceType = instanceType; } /** ** The instance type to use for a multi-node parallel job. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
*/ public String getInstanceType() { return this.instanceType; } /** ** The instance type to use for a multi-node parallel job. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
** This parameter isn't applicable to single-node container jobs or jobs that run on Fargate resources, and * shouldn't be provided. *
* @return Returns a reference to this object so that method calls can be chained together. */ public BatchContainerOverrides withInstanceType(String instanceType) { setInstanceType(instanceType); return this; } /** *
* The type and amount of resources to assign to a container. This overrides the settings in the job definition. The
* supported resources include GPU
, MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
*/
public java.util.List
* The type and amount of resources to assign to a container. This overrides the settings in the job definition. The
* supported resources include GPU
, MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
*/
public void setResourceRequirements(java.util.Collection
* The type and amount of resources to assign to a container. This overrides the settings in the job definition. The
* supported resources include GPU
, MEMORY
, and VCPU
.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceRequirements(java.util.Collection)} or {@link #withResourceRequirements(java.util.Collection)} * if you want to override the existing values. *
* * @param resourceRequirements * The type and amount of resources to assign to a container. This overrides the settings in the job * definition. The supported resources includeGPU
, MEMORY
, and VCPU
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchContainerOverrides withResourceRequirements(BatchResourceRequirement... resourceRequirements) {
if (this.resourceRequirements == null) {
setResourceRequirements(new java.util.ArrayList
* The type and amount of resources to assign to a container. This overrides the settings in the job definition. The
* supported resources include GPU
, MEMORY
, and VCPU
.
*
GPU
, MEMORY
, and VCPU
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public BatchContainerOverrides withResourceRequirements(java.util.Collection