/** * A list of container definitions in JSON format that describe the different containers that make * up your task. For more information about container definition parameters and defaults, see <a * href= "http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html" >Amazon * ECS Task Definitions</a> in the <i>Amazon EC2 Container Service Developer Guide</i>. * * <p><b>NOTE:</b> 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 A list of container definitions in JSON format that describe the * different containers that make up your task. For more information about container * definition parameters and defaults, see <a href= * "http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html" >Amazon * ECS Task Definitions</a> in the <i>Amazon EC2 Container Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskDefinition withContainerDefinitions(ContainerDefinition... containerDefinitions) { if (this.containerDefinitions == null) { setContainerDefinitions( new com.amazonaws.internal.SdkInternalList<ContainerDefinition>( containerDefinitions.length)); } for (ContainerDefinition ele : containerDefinitions) { this.containerDefinitions.add(ele); } return this; }
/** * A list of container definitions in JSON format that describe the different containers that make * up your task. For more information about container definition parameters and defaults, see <a * href= "http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html" >Amazon * ECS Task Definitions</a> in the <i>Amazon EC2 Container Service Developer Guide</i>. * * @param containerDefinitions A list of container definitions in JSON format that describe the * different containers that make up your task. For more information about container * definition parameters and defaults, see <a href= * "http://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html" >Amazon * ECS Task Definitions</a> in the <i>Amazon EC2 Container Service Developer Guide</i>. * @return Returns a reference to this object so that method calls can be chained together. */ public TaskDefinition withContainerDefinitions( java.util.Collection<ContainerDefinition> containerDefinitions) { setContainerDefinitions(containerDefinitions); return this; }