{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-ecs/json-schema/amazon-ecs-register-container-instance-request-schema.json",
  "title": "RegisterContainerInstanceRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-ecs-container-instances-api-openapi.yml#/components/schemas/RegisterContainerInstanceRequest",
  "type": "object",
  "properties": {
    "cluster": {
      "type": "string",
      "description": "The short name or full Amazon Resource Name (ARN) of the cluster to register your container instance with. If you do not specify a cluster, the default cluster is assumed."
    },
    "instanceIdentityDocument": {
      "type": "string",
      "description": "The instance identity document for the EC2 instance to register. This document can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/document/"
    },
    "instanceIdentityDocumentSignature": {
      "type": "string",
      "description": "The instance identity document signature for the EC2 instance to register. This signature can be found by running the following command from the instance: curl http://169.254.169.254/latest/dynamic/instance-identity/signature/"
    },
    "totalResources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Resource"
      },
      "description": "The resources available on the instance."
    },
    "versionInfo": {
      "$ref": "#/$defs/VersionInfo"
    },
    "containerInstanceArn": {
      "type": "string",
      "description": "The ARN of the container instance (if it was previously registered)."
    },
    "attributes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Attribute"
      },
      "description": "The container instance attributes that this container instance supports."
    },
    "platformDevices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PlatformDevice"
      },
      "description": "The devices that are available on the container instance. The supported device types are GPUs and Neuron devices."
    },
    "tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "description": "The metadata that you apply to the container instance to help you categorize and organize them. Each tag consists of a key and an optional value. You define both. The following basic restrictions apply to tags: Maximum number of tags per resource - 50 For each resource, each tag key must be unique, and each tag key can have only one value. Maximum key length - 128 Unicode characters in UTF-8 Maximum value length - 256 Unicode characters in UTF-8 If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Gener"
    }
  },
  "$defs": {
    "Attribute": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the attribute. The name must contain between 1 and 128 characters. The name may contain letters (uppercase and lowercase), numbers, hyphens (-), underscores (_), forward slashes (/), back slashes (\\), or periods (.)."
        },
        "value": {
          "type": "string",
          "description": "The value of the attribute. The value must contain between 1 and 128 characters. It can contain letters (uppercase and lowercase), numbers, hyphens (-), underscores (_), periods (.), at signs (@), forward slashes (/), back slashes (\\), colons (:), or spaces. The value can't start or end with a space."
        },
        "targetType": {
          "type": "string",
          "enum": [
            "container-instance"
          ],
          "description": "The type of the target to attach the attribute with. This parameter is required if you use the short form ID for a resource instead of the full ARN."
        },
        "targetId": {
          "type": "string",
          "description": "The ID of the target. You can specify the short form ID for a resource or the full Amazon Resource Name (ARN)."
        }
      },
      "required": [
        "name"
      ]
    },
    "PlatformDevice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID for the GPU or Neuron device on the container instance. For GPUs, the available GPU IDs can also be obtained on the container instance in the /var/lib/ecs/gpu/nvidia_gpu_info.json file. For Neuron devices, the ID corresponds to the device index (for example, 0 for /dev/neuron0)."
        },
        "type": {
          "type": "string",
          "enum": [
            "GPU",
            "NEURON_DEVICE"
          ],
          "description": "The type of device that's available on the container instance. The supported values are GPU and NEURON_DEVICE."
        }
      },
      "required": [
        "id",
        "type"
      ]
    },
    "Resource": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the resource, such as CPU, MEMORY, PORTS, PORTS_UDP, or a user-defined resource."
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. Valid values: INTEGER, DOUBLE, LONG, or STRINGSET."
        },
        "doubleValue": {
          "type": "number",
          "description": "When the doubleValue type is set, the value of the resource must be a double precision floating-point type."
        },
        "longValue": {
          "type": "integer",
          "description": "When the longValue type is set, the value of the resource must be an extended precision floating-point type."
        },
        "integerValue": {
          "type": "integer",
          "description": "When the integerValue type is set, the value of the resource must be an integer."
        },
        "stringSetValue": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "When the stringSetValue type is set, the value of the resource must be a string type."
        }
      }
    },
    "Tag": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "description": "One part of a key-value pair that make up a tag. A key is a general label that acts like a category for more specific tag values."
        },
        "value": {
          "type": "string",
          "description": "The optional part of a key-value pair that make up a tag. A value acts as a descriptor within a tag category (key)."
        }
      }
    },
    "VersionInfo": {
      "type": "object",
      "properties": {
        "agentVersion": {
          "type": "string",
          "description": "The version number of the Amazon ECS container agent."
        },
        "agentHash": {
          "type": "string",
          "description": "The Git commit hash for the Amazon ECS container agent build on the amazon-ecs-agent GitHub repository."
        },
        "dockerVersion": {
          "type": "string",
          "description": "The Docker version that's running on the container instance."
        }
      }
    }
  }
}