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

The type and amount of a resource to assign to a container. The supported * resource types are GPUs and Elastic Inference accelerators. For more * information, see Working * with GPUs on Amazon ECS or Working * with Amazon Elastic Inference on Amazon ECS in the Amazon Elastic * Container Service Developer Guide

See Also:

AWS * API Reference

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

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline ResourceRequirement& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline ResourceRequirement& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The value for the specified resource type.

If the GPU * type is used, the value is the number of physical GPUs the Amazon * ECS container agent reserves for the container. The number of GPUs that's * reserved for all containers in a task can't exceed the number of available GPUs * on the container instance that the task is launched on.

If the * InferenceAccelerator type is used, the value matches * the deviceName for an InferenceAccelerator * specified in a task definition.

*/ inline ResourceRequirement& WithValue(const char* value) { SetValue(value); return *this;} /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline const ResourceType& GetType() const{ return m_type; } /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline void SetType(const ResourceType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline void SetType(ResourceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline ResourceRequirement& WithType(const ResourceType& value) { SetType(value); return *this;} /** *

The type of resource to assign to a container. The supported values are * GPU or InferenceAccelerator.

*/ inline ResourceRequirement& WithType(ResourceType&& value) { SetType(std::move(value)); return *this;} private: Aws::String m_value; bool m_valueHasBeenSet = false; ResourceType m_type; bool m_typeHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws