{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-create-pipeline-request-schema.json",
  "title": "CreatePipelineRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-pipelines-api-openapi.yml#/components/schemas/CreatePipelineRequest",
  "type": "object",
  "properties": {
    "workspaceName": {
      "type": "string",
      "description": "The name of the workspace."
    },
    "pipelineName": {
      "type": "string",
      "description": "The name of the pipeline to create. Must be unique within the workspace."
    },
    "description": {
      "type": "string",
      "description": "A description of the pipeline."
    },
    "environmentVariables": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Environment variables shared across all compute nodes in the pipeline. Individual compute nodes can override these values with their own environment variables."
    },
    "computations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ComputeNode"
      },
      "description": "The list of compute nodes that form the pipeline DAG. Each compute node references a task and can declare dependencies on other nodes."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of key-value pairs that contain metadata for the pipeline. For more information, see Tagging your AWS IoT SiteWise resources in the AWS IoT SiteWise User Guide."
    },
    "clientToken": {
      "type": "string",
      "description": "A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you retry a request that completed successfully using the same client token, the server returns the cached result from the original successful request without performing the operation again."
    }
  },
  "required": [
    "workspaceName",
    "pipelineName",
    "computations"
  ],
  "$defs": {
    "ComputeNode": {
      "type": "object",
      "properties": {
        "computeNodeName": {
          "type": "string",
          "description": "The unique name for this compute node within the pipeline."
        },
        "taskName": {
          "type": "string",
          "description": "The name of the task to execute for this compute node."
        },
        "environmentVariables": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "Environment variables specific to this compute node. These override pipeline-level environment variables with the same key."
        },
        "dependsOn": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of compute node names that must complete successfully before this node can start."
        }
      },
      "required": [
        "computeNodeName",
        "taskName"
      ]
    }
  }
}