{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-greengrassv2-deployment.json",
  "title": "AWSGreengrassV2DeploymentProperties",
  "description": "Resource for Greengrass V2 deployment.. Source:- No source definition found, add manually please",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-greengrassv2-deployment.json",
    "sourceSha256": "afb8cc23fecce0689ede4366a8b9ff5b9133c62070d048bb020567e9b943adeb"
  },
  "type": "object",
  "properties": {
    "TargetArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "arn:[^:]*:iot:[^:]*:[0-9]+:(thing|thinggroup)/.+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "ParentTargetArn": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "arn:[^:]*:iot:[^:]*:[0-9]+:thinggroup/.+"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ]
    },
    "DeploymentName": {
      "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"
        }
      ]
    },
    "Components": {
      "type": "object",
      "additionalProperties": false,
      "patternProperties": {
        ".+": {
          "$ref": "#/$defs/ComponentDeploymentSpecification"
        }
      }
    },
    "IotJobConfiguration": {
      "$ref": "#/$defs/DeploymentIoTJobConfiguration"
    },
    "DeploymentPolicies": {
      "$ref": "#/$defs/DeploymentPolicies"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": false,
      "maxProperties": 200,
      "patternProperties": {
        ".*": {
          "type": "string",
          "maxLength": 256
        }
      }
    }
  },
  "typeName": "AWS::GreengrassV2::Deployment",
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": false,
    "tagProperty": "/properties/Tags"
  },
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/TargetArn",
    "/properties/ParentTargetArn",
    "/properties/DeploymentName",
    "/properties/Components",
    "/properties/IotJobConfiguration",
    "/properties/DeploymentPolicies"
  ],
  "required": [
    "TargetArn"
  ],
  "primaryIdentifier": [
    "/properties/DeploymentId"
  ],
  "$defs": {
    "ComponentDeploymentSpecification": {
      "type": "object",
      "properties": {
        "ComponentVersion": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ConfigurationUpdate": {
          "$ref": "#/$defs/ComponentConfigurationUpdate"
        },
        "RunWith": {
          "$ref": "#/$defs/ComponentRunWith"
        }
      },
      "title": "AWSGreengrassV2DeploymentComponentDeploymentSpecificationDefinition",
      "additionalProperties": false
    },
    "SystemResourceLimits": {
      "type": "object",
      "properties": {
        "Memory": {
          "type": "integer",
          "format": "int64",
          "minimum": 0,
          "maximum": 9223372036854772000
        },
        "Cpus": {
          "type": "number",
          "minimum": 0
        }
      },
      "title": "AWSGreengrassV2DeploymentSystemResourceLimitsDefinition",
      "additionalProperties": false
    },
    "ComponentRunWith": {
      "type": "object",
      "properties": {
        "PosixUser": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "SystemResourceLimits": {
          "$ref": "#/$defs/SystemResourceLimits"
        },
        "WindowsUser": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSGreengrassV2DeploymentComponentRunWithDefinition",
      "additionalProperties": false
    },
    "ComponentConfigurationUpdate": {
      "type": "object",
      "properties": {
        "Merge": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 10485760
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Reset": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 0,
            "maxLength": 256
          },
          "insertionOrder": false
        }
      },
      "title": "AWSGreengrassV2DeploymentComponentConfigurationUpdateDefinition",
      "additionalProperties": false
    },
    "DeploymentIoTJobConfiguration": {
      "type": "object",
      "properties": {
        "JobExecutionsRolloutConfig": {
          "$ref": "#/$defs/IoTJobExecutionsRolloutConfig"
        },
        "AbortConfig": {
          "$ref": "#/$defs/IoTJobAbortConfig"
        },
        "TimeoutConfig": {
          "$ref": "#/$defs/IoTJobTimeoutConfig"
        }
      },
      "title": "AWSGreengrassV2DeploymentDeploymentIoTJobConfigurationDefinition",
      "additionalProperties": false
    },
    "IoTJobExecutionsRolloutConfig": {
      "type": "object",
      "properties": {
        "ExponentialRate": {
          "$ref": "#/$defs/IoTJobExponentialRolloutRate"
        },
        "MaximumPerMinute": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        }
      },
      "title": "AWSGreengrassV2DeploymentIoTJobExecutionsRolloutConfigDefinition",
      "additionalProperties": false
    },
    "IoTJobAbortConfig": {
      "type": "object",
      "properties": {
        "CriteriaList": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/IoTJobAbortCriteria"
          },
          "minItems": 1,
          "insertionOrder": false
        }
      },
      "required": [
        "CriteriaList"
      ],
      "title": "AWSGreengrassV2DeploymentIoTJobAbortConfigDefinition",
      "additionalProperties": false
    },
    "IoTJobAbortCriteria": {
      "type": "object",
      "properties": {
        "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"
            }
          ]
        },
        "Action": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "CANCEL"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ThresholdPercentage": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "MinNumberOfExecutedThings": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2147483647
        }
      },
      "required": [
        "FailureType",
        "Action",
        "ThresholdPercentage",
        "MinNumberOfExecutedThings"
      ],
      "title": "AWSGreengrassV2DeploymentIoTJobAbortCriteriaDefinition",
      "additionalProperties": false
    },
    "IoTJobTimeoutConfig": {
      "type": "object",
      "properties": {
        "InProgressTimeoutInMinutes": {
          "type": "integer",
          "minimum": 0,
          "maximum": 2147483647
        }
      },
      "title": "AWSGreengrassV2DeploymentIoTJobTimeoutConfigDefinition",
      "additionalProperties": false
    },
    "IoTJobExponentialRolloutRate": {
      "type": "object",
      "properties": {
        "BaseRatePerMinute": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "IncrementFactor": {
          "type": "number",
          "minimum": 1,
          "maximum": 5
        },
        "RateIncreaseCriteria": {
          "$ref": "#/$defs/IoTJobRateIncreaseCriteria"
        }
      },
      "required": [
        "BaseRatePerMinute",
        "IncrementFactor",
        "RateIncreaseCriteria"
      ],
      "title": "AWSGreengrassV2DeploymentIoTJobExponentialRolloutRateDefinition",
      "additionalProperties": false
    },
    "IoTJobRateIncreaseCriteria": {
      "type": "object",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "NumberOfNotifiedThings": {
              "$ref": "#/$defs/NumberOfThings"
            }
          },
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "NumberOfSucceededThings": {
              "$ref": "#/$defs/NumberOfThings"
            }
          },
          "additionalProperties": false
        }
      ],
      "title": "AWSGreengrassV2DeploymentIoTJobRateIncreaseCriteriaDefinition"
    },
    "NumberOfThings": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647,
      "title": "AWSGreengrassV2DeploymentNumberOfThingsDefinition"
    },
    "DeploymentPolicies": {
      "type": "object",
      "properties": {
        "FailureHandlingPolicy": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "ROLLBACK",
                "DO_NOTHING"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ComponentUpdatePolicy": {
          "$ref": "#/$defs/DeploymentComponentUpdatePolicy"
        },
        "ConfigurationValidationPolicy": {
          "$ref": "#/$defs/DeploymentConfigurationValidationPolicy"
        }
      },
      "title": "AWSGreengrassV2DeploymentDeploymentPoliciesDefinition",
      "additionalProperties": false
    },
    "DeploymentComponentUpdatePolicy": {
      "type": "object",
      "properties": {
        "TimeoutInSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2147483647
        },
        "Action": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "NOTIFY_COMPONENTS",
                "SKIP_NOTIFY_COMPONENTS"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSGreengrassV2DeploymentDeploymentComponentUpdatePolicyDefinition",
      "additionalProperties": false
    },
    "DeploymentConfigurationValidationPolicy": {
      "type": "object",
      "properties": {
        "TimeoutInSeconds": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2147483647
        }
      },
      "title": "AWSGreengrassV2DeploymentDeploymentConfigurationValidationPolicyDefinition",
      "additionalProperties": false
    }
  },
  "readOnlyProperties": [
    "/properties/DeploymentId"
  ]
}
