/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Batch { namespace Model { /** *

The overrides that should be sent to a container.

See Also:

* AWS * API Reference

*/ class AWS_BATCH_API ContainerOverrides { public: ContainerOverrides(); ContainerOverrides(Aws::Utils::Json::JsonView jsonValue); ContainerOverrides& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

The number of vCPUs to reserve for the container. This value overrides the * value set in the job definition.

*/ inline int GetVcpus() const{ return m_vcpus; } /** *

The number of vCPUs to reserve for the container. This value overrides the * value set in the job definition.

*/ inline bool VcpusHasBeenSet() const { return m_vcpusHasBeenSet; } /** *

The number of vCPUs to reserve for the container. This value overrides the * value set in the job definition.

*/ inline void SetVcpus(int value) { m_vcpusHasBeenSet = true; m_vcpus = value; } /** *

The number of vCPUs to reserve for the container. This value overrides the * value set in the job definition.

*/ inline ContainerOverrides& WithVcpus(int value) { SetVcpus(value); return *this;} /** *

The number of MiB of memory reserved for the job. This value overrides the * value set in the job definition.

*/ inline int GetMemory() const{ return m_memory; } /** *

The number of MiB of memory reserved for the job. This value overrides the * value set in the job definition.

*/ inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; } /** *

The number of MiB of memory reserved for the job. This value overrides the * value set in the job definition.

*/ inline void SetMemory(int value) { m_memoryHasBeenSet = true; m_memory = value; } /** *

The number of MiB of memory reserved for the job. This value overrides the * value set in the job definition.

*/ inline ContainerOverrides& WithMemory(int value) { SetMemory(value); return *this;} /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline const Aws::Vector& GetCommand() const{ return m_command; } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline void SetCommand(const Aws::Vector& value) { m_commandHasBeenSet = true; m_command = value; } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline void SetCommand(Aws::Vector&& value) { m_commandHasBeenSet = true; m_command = std::move(value); } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline ContainerOverrides& WithCommand(const Aws::Vector& value) { SetCommand(value); return *this;} /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline ContainerOverrides& WithCommand(Aws::Vector&& value) { SetCommand(std::move(value)); return *this;} /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline ContainerOverrides& AddCommand(const Aws::String& value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline ContainerOverrides& AddCommand(Aws::String&& value) { m_commandHasBeenSet = true; m_command.push_back(std::move(value)); return *this; } /** *

The command to send to the container that overrides the default command from * the Docker image or the job definition.

*/ inline ContainerOverrides& AddCommand(const char* value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline const Aws::String& GetInstanceType() const{ return m_instanceType; } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline bool InstanceTypeHasBeenSet() const { return m_instanceTypeHasBeenSet; } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline void SetInstanceType(const Aws::String& value) { m_instanceTypeHasBeenSet = true; m_instanceType = value; } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline void SetInstanceType(Aws::String&& value) { m_instanceTypeHasBeenSet = true; m_instanceType = std::move(value); } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline void SetInstanceType(const char* value) { m_instanceTypeHasBeenSet = true; m_instanceType.assign(value); } /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline ContainerOverrides& WithInstanceType(const Aws::String& value) { SetInstanceType(value); return *this;} /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline ContainerOverrides& WithInstanceType(Aws::String&& value) { SetInstanceType(std::move(value)); return *this;} /** *

The instance type to use for a multi-node parallel job. This parameter is not * valid for single-node container jobs.

*/ inline ContainerOverrides& WithInstanceType(const char* value) { SetInstanceType(value); return *this;} /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline const Aws::Vector& GetEnvironment() const{ return m_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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; } /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline void SetEnvironment(const Aws::Vector& value) { m_environmentHasBeenSet = true; m_environment = value; } /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline void SetEnvironment(Aws::Vector&& value) { m_environmentHasBeenSet = true; m_environment = std::move(value); } /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline ContainerOverrides& WithEnvironment(const Aws::Vector& value) { SetEnvironment(value); return *this;} /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline ContainerOverrides& WithEnvironment(Aws::Vector&& value) { SetEnvironment(std::move(value)); return *this;} /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline ContainerOverrides& AddEnvironment(const KeyValuePair& value) { m_environmentHasBeenSet = true; m_environment.push_back(value); return *this; } /** *

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 job * definition.

Environment variables must not start with * AWS_BATCH; this naming convention is reserved for variables that * are set by the AWS Batch service.

*/ inline ContainerOverrides& AddEnvironment(KeyValuePair&& value) { m_environmentHasBeenSet = true; m_environment.push_back(std::move(value)); return *this; } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline const Aws::Vector& GetResourceRequirements() const{ return m_resourceRequirements; } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline void SetResourceRequirements(const Aws::Vector& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements = value; } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline void SetResourceRequirements(Aws::Vector&& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements = std::move(value); } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline ContainerOverrides& WithResourceRequirements(const Aws::Vector& value) { SetResourceRequirements(value); return *this;} /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline ContainerOverrides& WithResourceRequirements(Aws::Vector&& value) { SetResourceRequirements(std::move(value)); return *this;} /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline ContainerOverrides& AddResourceRequirements(const ResourceRequirement& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements.push_back(value); return *this; } /** *

The type and amount of a resource to assign to a container. This value * overrides the value set in the job definition. Currently, the only supported * resource is GPU.

*/ inline ContainerOverrides& AddResourceRequirements(ResourceRequirement&& value) { m_resourceRequirementsHasBeenSet = true; m_resourceRequirements.push_back(std::move(value)); return *this; } private: int m_vcpus; bool m_vcpusHasBeenSet; int m_memory; bool m_memoryHasBeenSet; Aws::Vector m_command; bool m_commandHasBeenSet; Aws::String m_instanceType; bool m_instanceTypeHasBeenSet; Aws::Vector m_environment; bool m_environmentHasBeenSet; Aws::Vector m_resourceRequirements; bool m_resourceRequirementsHasBeenSet; }; } // namespace Model } // namespace Batch } // namespace Aws