{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-update-task-request-schema.json",
  "title": "UpdateTaskRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-tasks-api-openapi.yml#/components/schemas/UpdateTaskRequest",
  "type": "object",
  "properties": {
    "workspaceName": {
      "type": "string",
      "description": "The name of the workspace."
    },
    "taskName": {
      "type": "string",
      "description": "The name of the task to update."
    },
    "description": {
      "type": "string",
      "description": "A new description for the task."
    },
    "taskConfiguration": {
      "$ref": "#/$defs/TaskConfiguration"
    }
  },
  "required": [
    "workspaceName",
    "taskName"
  ],
  "$defs": {
    "ContainerTaskConfiguration": {
      "type": "object",
      "properties": {
        "ecrUri": {
          "type": "string",
          "description": "The Amazon ECR image URI for the task container."
        },
        "taskExecutionRole": {
          "type": "string",
          "description": "The ARN of the IAM role that grants the containerized workload permissions to access AWS resources."
        },
        "processingType": {
          "type": "string",
          "enum": [
            "GENERIC_COMPUTE_PROCESSING",
            "HARDWARE_ACCELERATED_PROCESSING"
          ],
          "description": "The processing type for compute resources."
        },
        "processingUnit": {
          "type": "string",
          "enum": [
            "UNITS_2",
            "UNITS_4",
            "UNITS_8",
            "UNITS_12",
            "UNITS_16",
            "UNITS_24",
            "UNITS_32",
            "UNITS_36",
            "UNITS_48",
            "UNITS_60",
            "UNITS_64",
            "UNITS_72",
            "UNITS_84",
            "UNITS_96"
          ],
          "description": "The processing unit allocation that determines the vCPU, memory, and GPU resources."
        },
        "ephemeralStorageConfiguration": {
          "$ref": "#/$defs/EphemeralStorageConfiguration"
        },
        "command": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The command to execute in the container."
        },
        "timeoutSeconds": {
          "type": "integer",
          "description": "The timeout in seconds for task execution. Default: 3600 (1 hour)."
        },
        "environmentVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables passed to the container at runtime."
        },
        "mounts": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Mount"
          },
          "description": "Mounts attached to the container filesystem. Each mount exposes an external data source as a local directory inside the container. The service assigns each mount a container path based on the mount name. The container reads files through that path as if the data were on the local filesystem."
        }
      },
      "required": [
        "ecrUri",
        "taskExecutionRole",
        "processingType",
        "processingUnit"
      ]
    },
    "EphemeralStorageConfiguration": {
      "type": "object",
      "properties": {
        "storageClass": {
          "type": "string",
          "enum": [
            "STANDARD_1",
            "STANDARD_2",
            "THROUGHPUT_1",
            "THROUGHPUT_2"
          ],
          "description": "Storage type that determines I/O performance family and level."
        },
        "storageSizeInGiB": {
          "type": "integer",
          "description": "Storage volume size in GiB."
        }
      },
      "required": [
        "storageClass",
        "storageSizeInGiB"
      ]
    },
    "Mount": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "A unique name for the mount within the task."
        },
        "relativePath": {
          "type": "string",
          "description": "The relative path under the service-owned mount root where this mount is attached inside the container."
        },
        "source": {
          "$ref": "#/$defs/MountSource"
        },
        "storageType": {
          "type": "string",
          "enum": [
            "SHARED_STORAGE"
          ],
          "description": "The type of storage used for the mount."
        }
      },
      "required": [
        "name",
        "relativePath",
        "source",
        "storageType"
      ]
    },
    "MountSource": {
      "type": "object",
      "properties": {
        "s3AccessPoint": {
          "$ref": "#/$defs/S3AccessPointSource"
        }
      },
      "description": "Exactly one member is set."
    },
    "S3AccessPointSource": {
      "type": "object",
      "properties": {
        "accessPointArn": {
          "type": "string",
          "description": "The Amazon Resource Name (ARN) of the S3 access point."
        },
        "prefix": {
          "type": "string",
          "description": "An optional key prefix to scope the mount to a subset of objects at the access point."
        }
      },
      "required": [
        "accessPointArn"
      ]
    },
    "TaskConfiguration": {
      "type": "object",
      "properties": {
        "containerTaskConfiguration": {
          "$ref": "#/$defs/ContainerTaskConfiguration"
        }
      },
      "description": "Exactly one member is set."
    }
  }
}