{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Name"
 ],
 "definitions": {
  "BucketOwner": {
   "maxLength": 12,
   "minLength": 12,
   "pattern": "^[0-9]{12}$",
   "type": "string"
  },
  "CsvOptions": {
   "additionalProperties": false,
   "properties": {
    "Delimiter": {
     "maxLength": 1,
     "minLength": 1,
     "type": "string"
    },
    "HeaderRow": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "DataCatalogInputDefinition": {
   "additionalProperties": false,
   "properties": {
    "CatalogId": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "DatabaseName": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "TableName": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "TempDirectory": {
     "$ref": "#/definitions/S3Location"
    }
   },
   "type": "object"
  },
  "DatabaseInputDefinition": {
   "additionalProperties": false,
   "properties": {
    "DatabaseTableName": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "GlueConnectionName": {
     "maxLength": 255,
     "minLength": 1,
     "type": "string"
    },
    "QueryString": {
     "maxLength": 10000,
     "minLength": 1,
     "type": "string"
    },
    "TempDirectory": {
     "$ref": "#/definitions/S3Location"
    }
   },
   "required": [
    "GlueConnectionName"
   ],
   "type": "object"
  },
  "DatasetParameter": {
   "additionalProperties": false,
   "properties": {
    "CreateColumn": {
     "type": "boolean"
    },
    "DatetimeOptions": {
     "$ref": "#/definitions/DatetimeOptions"
    },
    "Filter": {
     "$ref": "#/definitions/FilterExpression"
    },
    "Name": {
     "$ref": "#/definitions/PathParameterName"
    },
    "Type": {
     "enum": [
      "String",
      "Number",
      "Datetime"
     ],
     "type": "string"
    }
   },
   "required": [
    "Name",
    "Type"
   ],
   "type": "object"
  },
  "DatetimeOptions": {
   "additionalProperties": false,
   "properties": {
    "Format": {
     "maxLength": 100,
     "minLength": 2,
     "type": "string"
    },
    "LocaleCode": {
     "maxLength": 100,
     "minLength": 2,
     "pattern": "^[A-Za-z0-9_\\.#@\\-]+$",
     "type": "string"
    },
    "TimezoneOffset": {
     "maxLength": 6,
     "minLength": 1,
     "pattern": "^(Z|[-+](\\d|\\d{2}|\\d{2}:?\\d{2}))$",
     "type": "string"
    }
   },
   "required": [
    "Format"
   ],
   "type": "object"
  },
  "ExcelOptions": {
   "additionalProperties": false,
   "oneOf": [
    {
     "required": [
      "SheetNames"
     ]
    },
    {
     "required": [
      "SheetIndexes"
     ]
    }
   ],
   "properties": {
    "HeaderRow": {
     "type": "boolean"
    },
    "SheetIndexes": {
     "insertionOrder": true,
     "items": {
      "maximum": 200,
      "minimum": 0,
      "type": "integer"
     },
     "maxItems": 1,
     "minItems": 1,
     "type": "array"
    },
    "SheetNames": {
     "insertionOrder": true,
     "items": {
      "maxLength": 31,
      "minLength": 1,
      "type": "string"
     },
     "maxItems": 1,
     "minItems": 1,
     "type": "array"
    }
   },
   "type": "object"
  },
  "FilesLimit": {
   "additionalProperties": false,
   "properties": {
    "MaxFiles": {
     "minimum": 1,
     "type": "integer"
    },
    "Order": {
     "enum": [
      "ASCENDING",
      "DESCENDING"
     ],
     "type": "string"
    },
    "OrderedBy": {
     "enum": [
      "LAST_MODIFIED_DATE"
     ],
     "type": "string"
    }
   },
   "required": [
    "MaxFiles"
   ],
   "type": "object"
  },
  "FilterExpression": {
   "additionalProperties": false,
   "properties": {
    "Expression": {
     "maxLength": 1024,
     "minLength": 4,
     "pattern": "^[><0-9A-Za-z_.,:)(!= ]+$",
     "type": "string"
    },
    "ValuesMap": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/FilterValue"
     },
     "type": "array"
    }
   },
   "required": [
    "Expression",
    "ValuesMap"
   ],
   "type": "object"
  },
  "FilterValue": {
   "additionalProperties": false,
   "properties": {
    "Value": {
     "maxLength": 1024,
     "minLength": 0,
     "type": "string"
    },
    "ValueReference": {
     "maxLength": 128,
     "minLength": 2,
     "pattern": "^:[A-Za-z0-9_]+$",
     "type": "string"
    }
   },
   "required": [
    "ValueReference",
    "Value"
   ],
   "type": "object"
  },
  "FormatOptions": {
   "additionalProperties": false,
   "properties": {
    "Csv": {
     "$ref": "#/definitions/CsvOptions"
    },
    "Excel": {
     "$ref": "#/definitions/ExcelOptions"
    },
    "Json": {
     "$ref": "#/definitions/JsonOptions"
    }
   },
   "type": "object"
  },
  "Input": {
   "additionalProperties": false,
   "properties": {
    "DataCatalogInputDefinition": {
     "$ref": "#/definitions/DataCatalogInputDefinition"
    },
    "DatabaseInputDefinition": {
     "$ref": "#/definitions/DatabaseInputDefinition"
    },
    "Metadata": {
     "$ref": "#/definitions/Metadata"
    },
    "S3InputDefinition": {
     "$ref": "#/definitions/S3Location"
    }
   },
   "type": "object"
  },
  "JsonOptions": {
   "additionalProperties": false,
   "properties": {
    "MultiLine": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "Metadata": {
   "additionalProperties": false,
   "properties": {
    "SourceArn": {
     "maxLength": 2048,
     "minLength": 20,
     "type": "string"
    }
   },
   "type": "object"
  },
  "PathOptions": {
   "additionalProperties": false,
   "properties": {
    "FilesLimit": {
     "$ref": "#/definitions/FilesLimit"
    },
    "LastModifiedDateCondition": {
     "$ref": "#/definitions/FilterExpression"
    },
    "Parameters": {
     "insertionOrder": true,
     "items": {
      "$ref": "#/definitions/PathParameter"
     },
     "type": "array"
    }
   },
   "type": "object"
  },
  "PathParameter": {
   "additionalProperties": false,
   "properties": {
    "DatasetParameter": {
     "$ref": "#/definitions/DatasetParameter"
    },
    "PathParameterName": {
     "$ref": "#/definitions/PathParameterName"
    }
   },
   "required": [
    "PathParameterName",
    "DatasetParameter"
   ],
   "type": "object"
  },
  "PathParameterName": {
   "maxLength": 255,
   "minLength": 1,
   "type": "string"
  },
  "S3Location": {
   "additionalProperties": false,
   "properties": {
    "Bucket": {
     "maxLength": 63,
     "minLength": 3,
     "type": "string"
    },
    "BucketOwner": {
     "$ref": "#/definitions/BucketOwner"
    },
    "Key": {
     "maxLength": 1280,
     "minLength": 1,
     "type": "string"
    }
   },
   "required": [
    "Bucket"
   ],
   "type": "object"
  },
  "Tag": {
   "additionalProperties": false,
   "properties": {
    "Key": {
     "maxLength": 128,
     "minLength": 1,
     "type": "string"
    },
    "Value": {
     "maxLength": 256,
     "minLength": 0,
     "type": "string"
    }
   },
   "required": [
    "Value",
    "Key"
   ],
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Name"
 ],
 "properties": {
  "Format": {
   "enum": [
    "CSV",
    "JSON",
    "PARQUET",
    "EXCEL",
    "ORC"
   ],
   "type": "string"
  },
  "FormatOptions": {
   "$ref": "#/definitions/FormatOptions"
  },
  "Input": {
   "$ref": "#/definitions/Input"
  },
  "Name": {
   "maxLength": 255,
   "minLength": 1,
   "type": "string"
  },
  "PathOptions": {
   "$ref": "#/definitions/PathOptions"
  },
  "Source": {
   "enum": [
    "S3",
    "DATA-CATALOG",
    "DATABASE"
   ],
   "type": "string"
  },
  "Tags": {
   "insertionOrder": false,
   "items": {
    "$ref": "#/definitions/Tag"
   },
   "type": "array",
   "uniqueItems": false
  }
 },
 "required": [
  "Name",
  "Input"
 ],
 "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-databrew.git",
 "tagging": {
  "cloudFormationSystemTags": true,
  "tagOnCreate": true,
  "tagProperty": "/properties/Tags",
  "tagUpdatable": true,
  "taggable": true
 },
 "typeName": "AWS::DataBrew::Dataset"
}
