{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/amazon-eventbridge-pipes/refs/heads/main/json-structure/amazon-eventbridge-pipes-ecs-resource-requirement-structure.json",
  "name": "EcsResourceRequirement",
  "description": "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 <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html\">Working with GPUs on Amazon ECS</a> or <a href=\"https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-inference.html\">Working with Amazon Elastic Inference on Amazon ECS</a> in the <i>Amazon Elastic Container Service Developer Guide</i> ",
  "type": "object",
  "properties": {
    "type": {
      "allOf": [
        {
          "$ref": "#/components/schemas/EcsResourceRequirementType"
        },
        {
          "description": "The type of resource to assign to a container. The supported values are <code>GPU</code> or <code>InferenceAccelerator</code>."
        }
      ]
    },
    "value": {
      "allOf": [
        {
          "$ref": "#/components/schemas/String"
        },
        {
          "description": "<p>The value for the specified resource type.</p> <p>If the <code>GPU</code> type is used, the value is the number of physical <code>GPUs</code> 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.</p> <p>If the <code>InferenceAccelerator</code> type is used, the <code>value</code> matches the <code>deviceName</code> for an InferenceAccelerator specified in a task definition.</p>"
        }
      ]
    }
  },
  "required": [
    "type",
    "value"
  ]
}