{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-greengrass/json-schema/amazon-iot-greengrass-get-deployment-response-schema.json",
  "title": "GetDeploymentResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-greengrass-greengrass-api-openapi.yml#/components/schemas/GetDeploymentResponse",
  "type": "object",
  "properties": {
    "targetArn": {
      "type": "string",
      "description": "The ARN of the target IoT thing or thing group."
    },
    "revisionId": {
      "type": "string",
      "description": "The revision number of the deployment."
    },
    "deploymentId": {
      "type": "string",
      "description": "The ID of the deployment."
    },
    "deploymentName": {
      "type": "string",
      "description": "The name of the deployment."
    },
    "deploymentStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "COMPLETED",
        "CANCELED",
        "FAILED",
        "INACTIVE"
      ],
      "description": "The status of the deployment."
    },
    "iotJobId": {
      "type": "string",
      "description": "The ID of the IoT job that applies the deployment to target devices."
    },
    "iotJobArn": {
      "type": "string",
      "description": "The ARN of the IoT job that applies the deployment to target devices."
    },
    "components": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComponentDeploymentSpecification"
      },
      "description": "The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component."
    },
    "deploymentPolicies": {
      "$ref": "#/$defs/DeploymentPolicies"
    },
    "iotJobConfiguration": {
      "$ref": "#/$defs/DeploymentIoTJobConfiguration"
    },
    "creationTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the deployment was created, expressed in ISO 8601 format."
    },
    "isLatestForTarget": {
      "type": "boolean",
      "description": "Whether or not the deployment is the latest revision for its target."
    },
    "parentTargetArn": {
      "type": "string",
      "description": "The parent deployment's target ARN within a subdeployment."
    },
    "tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "A list of key-value pairs that contain metadata for the resource. For more information, see Tag your resources in the IoT Greengrass V2 Developer Guide."
    }
  },
  "$defs": {
    "ComponentConfigurationUpdate": {
      "type": "object",
      "properties": {
        "merge": {
          "type": "string",
          "description": "A serialized JSON string that contains the configuration object to merge to target devices. The core device merges this configuration with the component's existing configuration. If this is the first time a component deploys on a device, the core device merges this configuration with the component's default configuration. This means that the core device keeps it's existing configuration for keys and values that you don't specify in this object. For more information, see Merge configuration updates in the IoT Greengrass V2 Developer Guide."
        },
        "reset": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The list of configuration nodes to reset to default values on target devices. Use JSON pointers to specify each node to reset. JSON pointers start with a forward slash (/) and use forward slashes to separate the key for each level in the object. For more information, see the JSON pointer specification and Reset configuration updates in the IoT Greengrass V2 Developer Guide."
        }
      }
    },
    "ComponentDeploymentSpecification": {
      "type": "object",
      "properties": {
        "componentVersion": {
          "type": "string",
          "description": "The version of the component."
        },
        "configurationUpdate": {
          "$ref": "#/$defs/ComponentConfigurationUpdate"
        },
        "runWith": {
          "$ref": "#/$defs/ComponentRunWith"
        }
      },
      "required": [
        "componentVersion"
      ]
    },
    "ComponentRunWith": {
      "type": "object",
      "properties": {
        "posixUser": {
          "type": "string",
          "description": "The POSIX system user and, optionally, group to use to run this component on Linux core devices. The user, and group if specified, must exist on each Linux core device. Specify the user and group separated by a colon (:) in the following format: user:group. The group is optional. If you don't specify a group, the IoT Greengrass Core software uses the primary user for the group. If you omit this parameter, the IoT Greengrass Core software uses the default system user and group that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run"
        },
        "systemResourceLimits": {
          "$ref": "#/$defs/SystemResourceLimits"
        },
        "windowsUser": {
          "type": "string",
          "description": "The Windows user to use to run this component on Windows core devices. The user must exist on each Windows core device, and its name and password must be in the LocalSystem account's Credentials Manager instance. If you omit this parameter, the IoT Greengrass Core software uses the default Windows user that you configure on the Greengrass nucleus component. For more information, see Configure the user and group that run components."
        }
      }
    },
    "DeploymentComponentUpdatePolicy": {
      "type": "object",
      "properties": {
        "timeoutInSeconds": {
          "type": "integer",
          "description": "The amount of time in seconds that each component on a device has to report that it's safe to update. If the component waits for longer than this timeout, then the deployment proceeds on the device. Default: 60"
        },
        "action": {
          "type": "string",
          "enum": [
            "NOTIFY_COMPONENTS",
            "SKIP_NOTIFY_COMPONENTS"
          ],
          "description": "Whether or not to notify components and wait for components to become safe to update. Choose from the following options: NOTIFY_COMPONENTS – The deployment notifies each component before it stops and updates that component. Components can use the SubscribeToComponentUpdates IPC operation to receive these notifications. Then, components can respond with the DeferComponentUpdate IPC operation. For more information, see Create deployments in the IoT Greengrass V2 Developer Guide. SKIP_NOTIFY_COMPONENTS – The deployment doesn't notify components or wait for them to be safe to update. Default: NOTI"
        }
      }
    },
    "DeploymentConfigurationValidationPolicy": {
      "type": "object",
      "properties": {
        "timeoutInSeconds": {
          "type": "integer",
          "description": "The amount of time in seconds that a component can validate its configuration updates. If the validation time exceeds this timeout, then the deployment proceeds for the device. Default: 30"
        }
      }
    },
    "DeploymentIoTJobConfiguration": {
      "type": "object",
      "properties": {
        "jobExecutionsRolloutConfig": {
          "$ref": "#/$defs/IoTJobExecutionsRolloutConfig"
        },
        "abortConfig": {
          "$ref": "#/$defs/IoTJobAbortConfig"
        },
        "timeoutConfig": {
          "$ref": "#/$defs/IoTJobTimeoutConfig"
        }
      }
    },
    "DeploymentPolicies": {
      "type": "object",
      "properties": {
        "failureHandlingPolicy": {
          "type": "string",
          "enum": [
            "ROLLBACK",
            "DO_NOTHING"
          ],
          "description": "The failure handling policy for the configuration deployment. This policy defines what to do if the deployment fails. Default: ROLLBACK"
        },
        "componentUpdatePolicy": {
          "$ref": "#/$defs/DeploymentComponentUpdatePolicy"
        },
        "configurationValidationPolicy": {
          "$ref": "#/$defs/DeploymentConfigurationValidationPolicy"
        }
      }
    },
    "IoTJobAbortConfig": {
      "type": "object",
      "properties": {
        "criteriaList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IoTJobAbortCriteria"
          },
          "description": "The list of criteria that define when and how to cancel the configuration deployment."
        }
      },
      "required": [
        "criteriaList"
      ]
    },
    "IoTJobAbortCriteria": {
      "type": "object",
      "properties": {
        "failureType": {
          "type": "string",
          "enum": [
            "FAILED",
            "REJECTED",
            "TIMED_OUT",
            "ALL"
          ],
          "description": "The type of job deployment failure that can cancel a job."
        },
        "action": {
          "type": "string",
          "enum": [
            "CANCEL"
          ],
          "description": "The action to perform when the criteria are met."
        },
        "thresholdPercentage": {
          "type": "number",
          "description": "The minimum percentage of failureType failures that occur before the job can cancel. This parameter supports up to two digits after the decimal (for example, you can specify 10.9 or 10.99, but not 10.999)."
        },
        "minNumberOfExecutedThings": {
          "type": "integer",
          "description": "The minimum number of things that receive the configuration before the job can cancel."
        }
      },
      "required": [
        "failureType",
        "action",
        "thresholdPercentage",
        "minNumberOfExecutedThings"
      ]
    },
    "IoTJobExecutionsRolloutConfig": {
      "type": "object",
      "properties": {
        "exponentialRate": {
          "$ref": "#/$defs/IoTJobExponentialRolloutRate"
        },
        "maximumPerMinute": {
          "type": "integer",
          "description": "The maximum number of devices that receive a pending job notification, per minute."
        }
      }
    },
    "IoTJobExponentialRolloutRate": {
      "type": "object",
      "properties": {
        "baseRatePerMinute": {
          "type": "integer",
          "description": "The minimum number of devices that receive a pending job notification, per minute, when the job starts. This parameter defines the initial rollout rate of the job."
        },
        "incrementFactor": {
          "type": "number",
          "description": "The exponential factor to increase the rollout rate for the job. This parameter supports up to one digit after the decimal (for example, you can specify 1.5, but not 1.55)."
        },
        "rateIncreaseCriteria": {
          "$ref": "#/$defs/IoTJobRateIncreaseCriteria"
        }
      },
      "required": [
        "baseRatePerMinute",
        "incrementFactor",
        "rateIncreaseCriteria"
      ]
    },
    "IoTJobRateIncreaseCriteria": {
      "type": "object",
      "properties": {
        "numberOfNotifiedThings": {
          "type": "integer",
          "description": "The number of devices to receive the job notification before the rollout rate increases."
        },
        "numberOfSucceededThings": {
          "type": "integer",
          "description": "The number of devices to successfully run the configuration job before the rollout rate increases."
        }
      }
    },
    "IoTJobTimeoutConfig": {
      "type": "object",
      "properties": {
        "inProgressTimeoutInMinutes": {
          "type": "integer",
          "description": "The amount of time, in minutes, that devices have to complete the job. The timer starts when the job status is set to IN_PROGRESS. If the job status doesn't change to a terminal state before the time expires, then the job status is set to TIMED_OUT. The timeout interval must be between 1 minute and 7 days (10080 minutes)."
        }
      }
    },
    "SystemResourceLimits": {
      "type": "object",
      "properties": {
        "memory": {
          "type": "integer",
          "description": "The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device."
        },
        "cpus": {
          "type": "number",
          "description": "The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage."
        }
      }
    }
  }
}