{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-appintegrations-dataintegration.json",
  "title": "AWSAppIntegrationsDataIntegrationProperties",
  "description": "Resource Type definition for AWS::AppIntegrations::DataIntegration. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-appintegrations-dataintegration.json",
    "sourceSha256": "11313c43c5f804b73889b50e246794839e6778aa586fe9c9b6e8f47fd0f58a8f"
  },
  "type": "object",
  "properties": {
    "Description": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The data integration description."
    },
    "Name": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9/\\._\\-]+$",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The name of the data integration."
    },
    "KmsKey": {
      "oneOf": [
        {
          "type": "string",
          "pattern": ".*\\S.*",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The KMS key of the data integration."
    },
    "ScheduleConfig": {
      "description": "The name of the data and how often it should be pulled from the source.",
      "$ref": "#/$defs/ScheduleConfig"
    },
    "SourceURI": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^(\\w+\\:\\/\\/[\\w.-]+[\\w/!@#+=.-]+$)|(\\w+\\:\\/\\/[\\w.-]+[\\w/!@#+=.-]+[\\w/!@#+=.-]+[\\w/!@#+=.,-]+$)",
          "minLength": 1,
          "maxLength": 1000
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The URI of the data source."
    },
    "Tags": {
      "description": "The tags (keys and values) associated with the data integration.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "minItems": 0,
      "maxItems": 200
    },
    "FileConfiguration": {
      "description": "The configuration for what files should be pulled from the source.",
      "$ref": "#/$defs/FileConfiguration"
    },
    "ObjectConfiguration": {
      "description": "The configuration for what data should be pulled from the source.",
      "$ref": "#/$defs/ObjectConfiguration"
    }
  },
  "typeName": "AWS::AppIntegrations::DataIntegration",
  "primaryIdentifier": [
    "/properties/Id"
  ],
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
  "additionalProperties": false,
  "createOnlyProperties": [
    "/properties/KmsKey",
    "/properties/ScheduleConfig",
    "/properties/SourceURI"
  ],
  "tagging": {
    "taggable": true,
    "tagOnCreate": true,
    "tagUpdatable": true,
    "cloudFormationSystemTags": true,
    "tagProperty": "/properties/Tags"
  },
  "$defs": {
    "ScheduleConfig": {
      "type": "object",
      "properties": {
        "FirstExecutionFrom": {
          "oneOf": [
            {
              "type": "string",
              "pattern": ".*\\S.*",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The start date for objects to import in the first flow run. Epoch or ISO timestamp format is supported."
        },
        "Object": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9/\\._\\-]+$",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "The name of the object to pull from the data source."
        },
        "ScheduleExpression": {
          "oneOf": [
            {
              "type": "string",
              "pattern": ".*\\S.*",
              "minLength": 1,
              "maxLength": 255
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "How often the data should be pulled from data source."
        }
      },
      "title": "AWSAppIntegrationsDataIntegrationScheduleConfigDefinition",
      "required": [
        "ScheduleExpression"
      ],
      "additionalProperties": false
    },
    "Tag": {
      "description": "A label for tagging DataIntegration resources",
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^(?!aws:)[a-zA-Z+-=._:/]+$",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "A key to identify the tag."
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Corresponding tag value for the key."
        }
      },
      "title": "AWSAppIntegrationsDataIntegrationTagDefinition",
      "required": [
        "Key",
        "Value"
      ],
      "additionalProperties": false
    },
    "FileConfiguration": {
      "description": "The configuration for what files should be pulled from the source.",
      "type": "object",
      "properties": {
        "Folders": {
          "description": "Identifiers for the source folders to pull all files from recursively.",
          "type": "array",
          "minItems": 1,
          "maxItems": 10,
          "items": {
            "type": "string",
            "pattern": ".*\\S.*",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "Filters": {
          "description": "Restrictions for what files should be pulled from the source.",
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "^[A-Za-z]": {
              "type": "array",
              "minItems": 1,
              "maxItems": 2048,
              "items": {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              }
            }
          }
        }
      },
      "title": "AWSAppIntegrationsDataIntegrationFileConfigurationDefinition",
      "required": [
        "Folders"
      ],
      "additionalProperties": false
    },
    "ObjectConfiguration": {
      "description": "The configuration for what data should be pulled from the source.",
      "type": "object",
      "additionalProperties": false,
      "title": "AWSAppIntegrationsDataIntegrationObjectConfigurationDefinition",
      "patternProperties": {
        "^.+$": {
          "type": "object",
          "additionalProperties": false,
          "patternProperties": {
            "^[A-Za-z]": {
              "type": "array",
              "minItems": 1,
              "maxItems": 2048,
              "items": {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              }
            }
          }
        }
      }
    }
  },
  "required": [
    "Name",
    "KmsKey",
    "ScheduleConfig",
    "SourceURI"
  ],
  "readOnlyProperties": [
    "/properties/Id",
    "/properties/DataIntegrationArn"
  ]
}
