/* * 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.ecs.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* The overrides that are associated with a task. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TaskOverride implements Serializable, Cloneable, StructuredPojo { /** ** One or more container overrides that are sent to a task. *
*/ private com.amazonaws.internal.SdkInternalList* The CPU override for the task. *
*/ private String cpu; /** ** The Elastic Inference accelerator override for the task. *
*/ private com.amazonaws.internal.SdkInternalList* The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see Amazon ECS task * execution IAM role in the Amazon Elastic Container Service Developer Guide. *
*/ private String executionRoleArn; /** ** The memory override for the task. *
*/ private String memory; /** ** The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this task * are granted the permissions that are specified in this role. For more information, see IAM Role for Tasks in * the Amazon Elastic Container Service Developer Guide. *
*/ private String taskRoleArn; /** ** The ephemeral storage setting override for the task. *
** This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* One or more container overrides that are sent to a task. *
* * @return One or more container overrides that are sent to a task. */ public java.util.List* One or more container overrides that are sent to a task. *
* * @param containerOverrides * One or more container overrides that are sent to a task. */ public void setContainerOverrides(java.util.Collection* One or more container overrides that are sent to a task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setContainerOverrides(java.util.Collection)} or {@link #withContainerOverrides(java.util.Collection)} if * you want to override the existing values. *
* * @param containerOverrides * One or more container overrides that are sent to a task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withContainerOverrides(ContainerOverride... containerOverrides) { if (this.containerOverrides == null) { setContainerOverrides(new com.amazonaws.internal.SdkInternalList* One or more container overrides that are sent to a task. *
* * @param containerOverrides * One or more container overrides that are sent to a task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withContainerOverrides(java.util.Collection* The CPU override for the task. *
* * @param cpu * The CPU override for the task. */ public void setCpu(String cpu) { this.cpu = cpu; } /** ** The CPU override for the task. *
* * @return The CPU override for the task. */ public String getCpu() { return this.cpu; } /** ** The CPU override for the task. *
* * @param cpu * The CPU override for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withCpu(String cpu) { setCpu(cpu); return this; } /** ** The Elastic Inference accelerator override for the task. *
* * @return The Elastic Inference accelerator override for the task. */ public java.util.List* The Elastic Inference accelerator override for the task. *
* * @param inferenceAcceleratorOverrides * The Elastic Inference accelerator override for the task. */ public void setInferenceAcceleratorOverrides(java.util.Collection* The Elastic Inference accelerator override for the task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInferenceAcceleratorOverrides(java.util.Collection)} or * {@link #withInferenceAcceleratorOverrides(java.util.Collection)} if you want to override the existing values. *
* * @param inferenceAcceleratorOverrides * The Elastic Inference accelerator override for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withInferenceAcceleratorOverrides(InferenceAcceleratorOverride... inferenceAcceleratorOverrides) { if (this.inferenceAcceleratorOverrides == null) { setInferenceAcceleratorOverrides(new com.amazonaws.internal.SdkInternalList* The Elastic Inference accelerator override for the task. *
* * @param inferenceAcceleratorOverrides * The Elastic Inference accelerator override for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withInferenceAcceleratorOverrides(java.util.Collection* The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see Amazon ECS task * execution IAM role in the Amazon Elastic Container Service Developer Guide. *
* * @param executionRoleArn * The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see * Amazon * ECS task execution IAM role in the Amazon Elastic Container Service Developer Guide. */ public void setExecutionRoleArn(String executionRoleArn) { this.executionRoleArn = executionRoleArn; } /** ** The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see Amazon ECS task * execution IAM role in the Amazon Elastic Container Service Developer Guide. *
* * @return The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, * see Amazon * ECS task execution IAM role in the Amazon Elastic Container Service Developer Guide. */ public String getExecutionRoleArn() { return this.executionRoleArn; } /** ** The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see Amazon ECS task * execution IAM role in the Amazon Elastic Container Service Developer Guide. *
* * @param executionRoleArn * The Amazon Resource Name (ARN) of the task execution role override for the task. For more information, see * Amazon * ECS task execution IAM role in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withExecutionRoleArn(String executionRoleArn) { setExecutionRoleArn(executionRoleArn); return this; } /** ** The memory override for the task. *
* * @param memory * The memory override for the task. */ public void setMemory(String memory) { this.memory = memory; } /** ** The memory override for the task. *
* * @return The memory override for the task. */ public String getMemory() { return this.memory; } /** ** The memory override for the task. *
* * @param memory * The memory override for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withMemory(String memory) { setMemory(memory); return this; } /** ** The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this task * are granted the permissions that are specified in this role. For more information, see IAM Role for Tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @param taskRoleArn * The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this * task are granted the permissions that are specified in this role. For more information, see IAM Role for * Tasks in the Amazon Elastic Container Service Developer Guide. */ public void setTaskRoleArn(String taskRoleArn) { this.taskRoleArn = taskRoleArn; } /** ** The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this task * are granted the permissions that are specified in this role. For more information, see IAM Role for Tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @return The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in * this task are granted the permissions that are specified in this role. For more information, see IAM Role for * Tasks in the Amazon Elastic Container Service Developer Guide. */ public String getTaskRoleArn() { return this.taskRoleArn; } /** ** The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this task * are granted the permissions that are specified in this role. For more information, see IAM Role for Tasks in * the Amazon Elastic Container Service Developer Guide. *
* * @param taskRoleArn * The Amazon Resource Name (ARN) of the role that containers in this task can assume. All containers in this * task are granted the permissions that are specified in this role. For more information, see IAM Role for * Tasks in the Amazon Elastic Container Service Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskOverride withTaskRoleArn(String taskRoleArn) { setTaskRoleArn(taskRoleArn); return this; } /** ** The ephemeral storage setting override for the task. *
** This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* The ephemeral storage setting override for the task. *
** This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* The ephemeral storage setting override for the task. *
** This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*
* This parameter is only supported for tasks hosted on Fargate that use the following platform versions: *
*
* Linux platform version 1.4.0
or later.
*
* Windows platform version 1.0.0
or later.
*