/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details about a task definition. A task definition describes the container and volume definitions of an Amazon * Elastic Container Service task. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsEcsTaskDefinitionDetails implements Serializable, Cloneable, StructuredPojo { /** ** The container definitions that describe the containers that make up the task. *
*/ private java.util.List* The number of CPU units used by the task.Valid values are as follows: *
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* The ARN of the task execution role that grants the container agent permission to make API calls on behalf of the * container user. *
*/ private String executionRoleArn; /** ** The name of a family that this task definition is registered to. *
*/ private String family; /** ** The Elastic Inference accelerators to use for the containers in the task. *
*/ private java.util.List* The inter-process communication (IPC) resource namespace to use for the containers in the task. Valid values are * as follows: *
*
* host
*
* none
*
* task
*
* The amount (in MiB) of memory used by the task. *
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level memory
* value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which determines
* your range of supported values for the Cpu
and Memory
parameters.
*
* The Docker networking mode to use for the containers in the task. Valid values are as follows: *
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* The process namespace to use for the containers in the task. Valid values are host
or
* task
.
*
* The placement constraint objects to use for tasks. *
*/ private java.util.List* The configuration details for the App Mesh proxy. *
*/ private AwsEcsTaskDefinitionProxyConfigurationDetails proxyConfiguration; /** ** The task launch types that the task definition was validated against. *
*/ private java.util.List* The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web Services * API operations on your behalf. *
*/ private String taskRoleArn; /** ** The data volume definitions for the task. *
*/ private java.util.List* The container definitions that describe the containers that make up the task. *
* * @return The container definitions that describe the containers that make up the task. */ public java.util.List* The container definitions that describe the containers that make up the task. *
* * @param containerDefinitions * The container definitions that describe the containers that make up the task. */ public void setContainerDefinitions(java.util.Collection* The container definitions that describe the containers that make up the task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setContainerDefinitions(java.util.Collection)} or {@link #withContainerDefinitions(java.util.Collection)} * if you want to override the existing values. *
* * @param containerDefinitions * The container definitions that describe the containers that make up the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withContainerDefinitions(AwsEcsTaskDefinitionContainerDefinitionsDetails... containerDefinitions) { if (this.containerDefinitions == null) { setContainerDefinitions(new java.util.ArrayList* The container definitions that describe the containers that make up the task. *
* * @param containerDefinitions * The container definitions that describe the containers that make up the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withContainerDefinitions(java.util.Collection* The number of CPU units used by the task.Valid values are as follows: *
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* The number of CPU units used by the task.Valid values are as follows: *
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* The number of CPU units used by the task.Valid values are as follows: *
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* 256 (.25 vCPU)
*
* 512 (.5 vCPU)
*
* 1024 (1 vCPU)
*
* 2048 (2 vCPU)
*
* 4096 (4 vCPU)
*
* The ARN of the task execution role that grants the container agent permission to make API calls on behalf of the * container user. *
* * @param executionRoleArn * The ARN of the task execution role that grants the container agent permission to make API calls on behalf * of the container user. */ public void setExecutionRoleArn(String executionRoleArn) { this.executionRoleArn = executionRoleArn; } /** ** The ARN of the task execution role that grants the container agent permission to make API calls on behalf of the * container user. *
* * @return The ARN of the task execution role that grants the container agent permission to make API calls on behalf * of the container user. */ public String getExecutionRoleArn() { return this.executionRoleArn; } /** ** The ARN of the task execution role that grants the container agent permission to make API calls on behalf of the * container user. *
* * @param executionRoleArn * The ARN of the task execution role that grants the container agent permission to make API calls on behalf * of the container user. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withExecutionRoleArn(String executionRoleArn) { setExecutionRoleArn(executionRoleArn); return this; } /** ** The name of a family that this task definition is registered to. *
* * @param family * The name of a family that this task definition is registered to. */ public void setFamily(String family) { this.family = family; } /** ** The name of a family that this task definition is registered to. *
* * @return The name of a family that this task definition is registered to. */ public String getFamily() { return this.family; } /** ** The name of a family that this task definition is registered to. *
* * @param family * The name of a family that this task definition is registered to. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withFamily(String family) { setFamily(family); return this; } /** ** The Elastic Inference accelerators to use for the containers in the task. *
* * @return The Elastic Inference accelerators to use for the containers in the task. */ public java.util.List* The Elastic Inference accelerators to use for the containers in the task. *
* * @param inferenceAccelerators * The Elastic Inference accelerators to use for the containers in the task. */ public void setInferenceAccelerators(java.util.Collection* The Elastic Inference accelerators to use for the containers in the task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setInferenceAccelerators(java.util.Collection)} or * {@link #withInferenceAccelerators(java.util.Collection)} if you want to override the existing values. *
* * @param inferenceAccelerators * The Elastic Inference accelerators to use for the containers in the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withInferenceAccelerators(AwsEcsTaskDefinitionInferenceAcceleratorsDetails... inferenceAccelerators) { if (this.inferenceAccelerators == null) { setInferenceAccelerators(new java.util.ArrayList* The Elastic Inference accelerators to use for the containers in the task. *
* * @param inferenceAccelerators * The Elastic Inference accelerators to use for the containers in the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withInferenceAccelerators(java.util.Collection* The inter-process communication (IPC) resource namespace to use for the containers in the task. Valid values are * as follows: *
*
* host
*
* none
*
* task
*
* host
*
* none
*
* task
*
* The inter-process communication (IPC) resource namespace to use for the containers in the task. Valid values are * as follows: *
*
* host
*
* none
*
* task
*
* host
*
* none
*
* task
*
* The inter-process communication (IPC) resource namespace to use for the containers in the task. Valid values are * as follows: *
*
* host
*
* none
*
* task
*
* host
*
* none
*
* task
*
* The amount (in MiB) of memory used by the task. *
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level memory
* value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which determines
* your range of supported values for the Cpu
and Memory
parameters.
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level
* memory value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which
* determines your range of supported values for the Cpu
and Memory
parameters.
*/
public void setMemory(String memory) {
this.memory = memory;
}
/**
*
* The amount (in MiB) of memory used by the task. *
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level memory
* value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which determines
* your range of supported values for the Cpu
and Memory
parameters.
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level
* memory value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which
* determines your range of supported values for the Cpu
and Memory
parameters.
*/
public String getMemory() {
return this.memory;
}
/**
*
* The amount (in MiB) of memory used by the task. *
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level memory
* value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which determines
* your range of supported values for the Cpu
and Memory
parameters.
*
* For tasks that are hosted on Amazon EC2, you can provide a task-level memory value or a container-level
* memory value. For tasks that are hosted on Fargate, you must use one of the specified values in the Amazon Elastic Container Service Developer Guide , which
* determines your range of supported values for the Cpu
and Memory
parameters.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsTaskDefinitionDetails withMemory(String memory) {
setMemory(memory);
return this;
}
/**
*
* The Docker networking mode to use for the containers in the task. Valid values are as follows: *
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* The Docker networking mode to use for the containers in the task. Valid values are as follows: *
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* The Docker networking mode to use for the containers in the task. Valid values are as follows: *
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* awsvpc
*
* bridge
*
* host
*
* none
*
* The process namespace to use for the containers in the task. Valid values are host
or
* task
.
*
host
or
* task
.
*/
public void setPidMode(String pidMode) {
this.pidMode = pidMode;
}
/**
*
* The process namespace to use for the containers in the task. Valid values are host
or
* task
.
*
host
or
* task
.
*/
public String getPidMode() {
return this.pidMode;
}
/**
*
* The process namespace to use for the containers in the task. Valid values are host
or
* task
.
*
host
or
* task
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsEcsTaskDefinitionDetails withPidMode(String pidMode) {
setPidMode(pidMode);
return this;
}
/**
* * The placement constraint objects to use for tasks. *
* * @return The placement constraint objects to use for tasks. */ public java.util.List* The placement constraint objects to use for tasks. *
* * @param placementConstraints * The placement constraint objects to use for tasks. */ public void setPlacementConstraints(java.util.Collection* The placement constraint objects to use for tasks. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPlacementConstraints(java.util.Collection)} or {@link #withPlacementConstraints(java.util.Collection)} * if you want to override the existing values. *
* * @param placementConstraints * The placement constraint objects to use for tasks. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withPlacementConstraints(AwsEcsTaskDefinitionPlacementConstraintsDetails... placementConstraints) { if (this.placementConstraints == null) { setPlacementConstraints(new java.util.ArrayList* The placement constraint objects to use for tasks. *
* * @param placementConstraints * The placement constraint objects to use for tasks. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withPlacementConstraints(java.util.Collection* The configuration details for the App Mesh proxy. *
* * @param proxyConfiguration * The configuration details for the App Mesh proxy. */ public void setProxyConfiguration(AwsEcsTaskDefinitionProxyConfigurationDetails proxyConfiguration) { this.proxyConfiguration = proxyConfiguration; } /** ** The configuration details for the App Mesh proxy. *
* * @return The configuration details for the App Mesh proxy. */ public AwsEcsTaskDefinitionProxyConfigurationDetails getProxyConfiguration() { return this.proxyConfiguration; } /** ** The configuration details for the App Mesh proxy. *
* * @param proxyConfiguration * The configuration details for the App Mesh proxy. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withProxyConfiguration(AwsEcsTaskDefinitionProxyConfigurationDetails proxyConfiguration) { setProxyConfiguration(proxyConfiguration); return this; } /** ** The task launch types that the task definition was validated against. *
* * @return The task launch types that the task definition was validated against. */ public java.util.List* The task launch types that the task definition was validated against. *
* * @param requiresCompatibilities * The task launch types that the task definition was validated against. */ public void setRequiresCompatibilities(java.util.Collection* The task launch types that the task definition was validated against. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setRequiresCompatibilities(java.util.Collection)} or * {@link #withRequiresCompatibilities(java.util.Collection)} if you want to override the existing values. *
* * @param requiresCompatibilities * The task launch types that the task definition was validated against. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withRequiresCompatibilities(String... requiresCompatibilities) { if (this.requiresCompatibilities == null) { setRequiresCompatibilities(new java.util.ArrayList* The task launch types that the task definition was validated against. *
* * @param requiresCompatibilities * The task launch types that the task definition was validated against. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withRequiresCompatibilities(java.util.Collection* The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web Services * API operations on your behalf. *
* * @param taskRoleArn * The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web * Services API operations on your behalf. */ public void setTaskRoleArn(String taskRoleArn) { this.taskRoleArn = taskRoleArn; } /** ** The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web Services * API operations on your behalf. *
* * @return The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web * Services API operations on your behalf. */ public String getTaskRoleArn() { return this.taskRoleArn; } /** ** The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web Services * API operations on your behalf. *
* * @param taskRoleArn * The short name or ARN of the IAM role that grants containers in the task permission to call Amazon Web * Services API operations on your behalf. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withTaskRoleArn(String taskRoleArn) { setTaskRoleArn(taskRoleArn); return this; } /** ** The data volume definitions for the task. *
* * @return The data volume definitions for the task. */ public java.util.List* The data volume definitions for the task. *
* * @param volumes * The data volume definitions for the task. */ public void setVolumes(java.util.Collection* The data volume definitions for the task. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setVolumes(java.util.Collection)} or {@link #withVolumes(java.util.Collection)} if you want to override * the existing values. *
* * @param volumes * The data volume definitions for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withVolumes(AwsEcsTaskDefinitionVolumesDetails... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList* The data volume definitions for the task. *
* * @param volumes * The data volume definitions for the task. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsEcsTaskDefinitionDetails withVolumes(java.util.Collection