{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-iot-jobtemplate.json",
  "title": "AWSIoTJobTemplateProperties",
  "description": "Job templates enable you to preconfigure jobs so that you can deploy them to multiple sets of target devices.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-iot-jobtemplate.json",
    "sourceSha256": "60549a486f5d17c8dcefcc10c9b4018d170b7a9a16a9c8224c55b8ea7c9d75e0"
  },
  "type": "object",
  "properties": {
    "JobArn": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Optional for copying a JobTemplate from a pre-existing Job configuration."
    },
    "JobTemplateId": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "[a-zA-Z0-9_-]+",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "[^\\p{C}]+",
          "maxLength": 2028
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "A description of the Job Template."
    },
    "Document": {
      "oneOf": [
        {
          "type": "string",
          "maxLength": 32768
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The job document. Required if you don't specify a value for documentSource."
    },
    "DocumentSource": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1350
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "An S3 link to the job document to use in the template. Required if you don't specify a value for document."
    },
    "TimeoutConfig": {
      "description": "Specifies the amount of time each device has to finish its execution of the job.",
      "type": "object",
      "properties": {
        "InProgressTimeoutInMinutes": {
          "$ref": "#/$defs/InProgressTimeoutInMinutes"
        }
      },
      "required": [
        "InProgressTimeoutInMinutes"
      ],
      "additionalProperties": false
    },
    "JobExecutionsRolloutConfig": {
      "description": "Allows you to create a staged rollout of a job.",
      "type": "object",
      "properties": {
        "ExponentialRolloutRate": {
          "description": "The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.",
          "$ref": "#/$defs/ExponentialRolloutRate"
        },
        "MaximumPerMinute": {
          "description": "The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.",
          "$ref": "#/$defs/MaximumPerMinute"
        }
      },
      "additionalProperties": false
    },
    "AbortConfig": {
      "description": "The criteria that determine when and how a job abort takes place.",
      "type": "object",
      "properties": {
        "CriteriaList": {
          "type": "array",
          "insertionOrder": false,
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/AbortCriteria"
          }
        }
      },
      "required": [
        "CriteriaList"
      ],
      "additionalProperties": false
    },
    "PresignedUrlConfig": {
      "type": "object",
      "description": "Configuration for pre-signed S3 URLs.",
      "properties": {
        "RoleArn": {
          "$ref": "#/$defs/RoleArn"
        },
        "ExpiresInSec": {
          "$ref": "#/$defs/ExpiresInSec"
        }
      },
      "required": [
        "RoleArn"
      ],
      "additionalProperties": false
    },
    "JobExecutionsRetryConfig": {
      "type": "object",
      "properties": {
        "RetryCriteriaList": {
          "type": "array",
          "insertionOrder": false,
          "minItems": 1,
          "maxItems": 2,
          "items": {
            "$ref": "#/$defs/RetryCriteria"
          }
        }
      },
      "additionalProperties": false
    },
    "MaintenanceWindows": {
      "type": "array",
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/MaintenanceWindow"
      }
    },
    "Tags": {
      "description": "Metadata that can be used to manage the JobTemplate.",
      "type": "array",
      "maxItems": 50,
      "uniqueItems": true,
      "insertionOrder": false,
      "items": {
        "$ref": "#/$defs/Tag"
      }
    }
  },
  "typeName": "AWS::IoT::JobTemplate",
  "primaryIdentifier": [
    "/properties/JobTemplateId"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-iot.git",
  "documentationUrl": "https://docs.aws.amazon.com/iot/latest/developerguide/job-templates.html",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/JobTemplateId",
    "/properties/JobArn",
    "/properties/Description",
    "/properties/Document",
    "/properties/DocumentSource",
    "/properties/TimeoutConfig",
    "/properties/JobExecutionsRolloutConfig",
    "/properties/AbortConfig",
    "/properties/PresignedUrlConfig",
    "/properties/Tags"
  ],
  "required": [
    "JobTemplateId",
    "Description"
  ],
  "taggable": true,
  "$defs": {
    "ExponentialRolloutRate": {
      "description": "Allows you to create an exponential rate of rollout for a job.",
      "type": "object",
      "properties": {
        "BaseRatePerMinute": {
          "description": "The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.",
          "$ref": "#/$defs/BaseRatePerMinute"
        },
        "IncrementFactor": {
          "description": "The exponential factor to increase the rate of rollout for a job.",
          "$ref": "#/$defs/IncrementFactor"
        },
        "RateIncreaseCriteria": {
          "description": "The criteria to initiate the increase in rate of rollout for a job.",
          "type": "object",
          "$ref": "#/$defs/RateIncreaseCriteria"
        }
      },
      "title": "AWSIoTJobTemplateExponentialRolloutRateDefinition",
      "required": [
        "BaseRatePerMinute",
        "IncrementFactor",
        "RateIncreaseCriteria"
      ],
      "additionalProperties": false
    },
    "BaseRatePerMinute": {
      "type": "integer",
      "minimum": 1,
      "title": "AWSIoTJobTemplateBaseRatePerMinuteDefinition"
    },
    "IncrementFactor": {
      "type": "number",
      "minimum": 1,
      "maximum": 5,
      "title": "AWSIoTJobTemplateIncrementFactorDefinition"
    },
    "RateIncreaseCriteria": {
      "type": "object",
      "properties": {
        "NumberOfNotifiedThings": {
          "$ref": "#/$defs/NumberOfNotifiedThings"
        },
        "NumberOfSucceededThings": {
          "$ref": "#/$defs/NumberOfSucceededThings"
        }
      },
      "title": "AWSIoTJobTemplateRateIncreaseCriteriaDefinition",
      "additionalProperties": false
    },
    "NumberOfNotifiedThings": {
      "type": "integer",
      "minimum": 1,
      "title": "AWSIoTJobTemplateNumberOfNotifiedThingsDefinition"
    },
    "NumberOfSucceededThings": {
      "type": "integer",
      "minimum": 1,
      "title": "AWSIoTJobTemplateNumberOfSucceededThingsDefinition"
    },
    "MaximumPerMinute": {
      "type": "integer",
      "minimum": 1,
      "title": "AWSIoTJobTemplateMaximumPerMinuteDefinition"
    },
    "AbortCriteria": {
      "description": "The criteria that determine when and how a job abort takes place.",
      "type": "object",
      "properties": {
        "Action": {
          "description": "The type of job action to take to initiate the job abort.",
          "$ref": "#/$defs/Action"
        },
        "FailureType": {
          "description": "The type of job execution failures that can initiate a job abort.",
          "$ref": "#/$defs/FailureType"
        },
        "MinNumberOfExecutedThings": {
          "description": "The minimum number of things which must receive job execution notifications before the job can be aborted.",
          "$ref": "#/$defs/MinNumberOfExecutedThings"
        },
        "ThresholdPercentage": {
          "description": "The minimum percentage of job execution failures that must occur to initiate the job abort.",
          "$ref": "#/$defs/ThresholdPercentage"
        }
      },
      "title": "AWSIoTJobTemplateAbortCriteriaDefinition",
      "required": [
        "Action",
        "FailureType",
        "MinNumberOfExecutedThings",
        "ThresholdPercentage"
      ],
      "additionalProperties": false
    },
    "Action": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CANCEL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTJobTemplateActionDefinition"
    },
    "FailureType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "FAILED",
            "REJECTED",
            "TIMED_OUT",
            "ALL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTJobTemplateFailureTypeDefinition"
    },
    "MinNumberOfExecutedThings": {
      "type": "integer",
      "minimum": 1,
      "title": "AWSIoTJobTemplateMinNumberOfExecutedThingsDefinition"
    },
    "ThresholdPercentage": {
      "type": "number",
      "maximum": 100,
      "title": "AWSIoTJobTemplateThresholdPercentageDefinition"
    },
    "InProgressTimeoutInMinutes": {
      "description": "Specifies the amount of time, in minutes, this device has to finish execution of this job.",
      "type": "integer",
      "minimum": 1,
      "maximum": 10080,
      "title": "AWSIoTJobTemplateInProgressTimeoutInMinutesDefinition"
    },
    "RoleArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 20,
          "maxLength": 2048
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.",
      "title": "AWSIoTJobTemplateRoleArnDefinition"
    },
    "ExpiresInSec": {
      "description": "How number (in seconds) pre-signed URLs are valid.",
      "type": "integer",
      "minimum": 60,
      "maximum": 3600,
      "title": "AWSIoTJobTemplateExpiresInSecDefinition"
    },
    "RetryCriteria": {
      "description": "Specifies how many times a failure type should be retried.",
      "type": "object",
      "properties": {
        "NumberOfRetries": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10
        },
        "FailureType": {
          "$ref": "#/$defs/JobRetryFailureType"
        }
      },
      "title": "AWSIoTJobTemplateRetryCriteriaDefinition",
      "additionalProperties": false
    },
    "JobRetryFailureType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "FAILED",
            "TIMED_OUT",
            "ALL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSIoTJobTemplateJobRetryFailureTypeDefinition"
    },
    "MaintenanceWindow": {
      "description": "Specifies a start time and duration for a scheduled Job.",
      "type": "object",
      "properties": {
        "StartTime": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "DurationInMinutes": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1430
        }
      },
      "title": "AWSIoTJobTemplateMaintenanceWindowDefinition",
      "additionalProperties": false
    },
    "Tag": {
      "description": "A key-value pair to associate with a resource.",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The tag's key."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The tag's value."
        }
      },
      "required": [
        "Value",
        "Key"
      ],
      "title": "AWSIoTJobTemplateTagDefinition",
      "additionalProperties": false
    }
  },
  "readOnlyProperties": [
    "/properties/Arn"
  ],
  "writeOnlyProperties": [
    "/properties/JobArn",
    "/properties/Tags"
  ]
}
