{
  "typeName" : "AWS::Kendra::DataSource",
  "description" : "Kendra DataSource",
  "sourceUrl" : "https://docs.aws.amazon.com/kendra/latest/dg/hiw-data-source.html",
  "definitions" : {
    "IndexId" : {
      "description" : "ID of Index",
      "type" : "string",
      "minLength" : 36,
      "maxLength" : 36
    },
    "Tag" : {
      "description" : "A label for tagging Kendra resources",
      "type" : "object",
      "properties" : {
        "Key" : {
          "description" : "A string used to identify this tag",
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 128
        },
        "Value" : {
          "description" : "A string containing the value for the tag",
          "type" : "string",
          "minLength" : 0,
          "maxLength" : 256
        }
      },
      "required" : [ "Key", "Value" ],
      "additionalProperties" : false
    },
    "TagList" : {
      "description" : "List of tags",
      "type" : "array",
      "maxItems" : 200,
      "items" : {
        "$ref" : "#/definitions/Tag"
      }
    },
    "DataSourceInclusionsExclusionsStrings" : {
      "type" : "array",
      "maxItems" : 100,
      "items" : {
        "type" : "string",
        "minLength" : 1,
        "maxLength" : 50
      }
    },
    "S3Path" : {
      "type" : "object",
      "properties" : {
        "Bucket" : {
          "$ref" : "#/definitions/S3BucketName"
        },
        "Key" : {
          "$ref" : "#/definitions/S3ObjectKey"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Bucket", "Key" ]
    },
    "S3BucketName" : {
      "type" : "string",
      "minLength" : 3,
      "maxLength" : 63,
      "pattern" : "[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]"
    },
    "S3ObjectKey" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1024
    },
    "DocumentsMetadataConfiguration" : {
      "type" : "object",
      "properties" : {
        "S3Prefix" : {
          "$ref" : "#/definitions/S3ObjectKey"
        }
      },
      "additionalProperties" : false
    },
    "AccessControlListConfiguration" : {
      "type" : "object",
      "properties" : {
        "KeyPath" : {
          "$ref" : "#/definitions/S3ObjectKey"
        }
      },
      "additionalProperties" : false
    },
    "S3DataSourceConfiguration" : {
      "description" : "S3 data source configuration",
      "type" : "object",
      "properties" : {
        "BucketName" : {
          "$ref" : "#/definitions/S3BucketName"
        },
        "InclusionPrefixes" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "DocumentsMetadataConfiguration" : {
          "$ref" : "#/definitions/DocumentsMetadataConfiguration"
        },
        "AccessControlListConfiguration" : {
          "$ref" : "#/definitions/AccessControlListConfiguration"
        }
      },
      "additionalProperties" : false,
      "required" : [ "BucketName" ]
    },
    "Url" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : "^(https?|ftp|file)://([^\\s]*)"
    },
    "SecretArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1284,
      "pattern" : "arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}"
    },
    "DataSourceVpcConfiguration" : {
      "type" : "object",
      "properties" : {
        "SubnetIds" : {
          "type" : "array",
          "maxItems" : 6,
          "items" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 200,
            "pattern" : "[\\-0-9a-zA-Z]+"
          }
        },
        "SecurityGroupIds" : {
          "type" : "array",
          "maxItems" : 10,
          "items" : {
            "type" : "string",
            "minLength" : 1,
            "maxLength" : 200,
            "pattern" : "[\\-0-9a-zA-Z]+"
          }
        }
      },
      "additionalProperties" : false,
      "required" : [ "SubnetIds", "SecurityGroupIds" ]
    },
    "DataSourceFieldName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "DataSourceToIndexFieldMapping" : {
      "type" : "object",
      "properties" : {
        "DataSourceFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DateFieldFormat" : {
          "$ref" : "#/definitions/DateFieldFormat"
        },
        "IndexFieldName" : {
          "$ref" : "#/definitions/IndexFieldName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DataSourceFieldName", "IndexFieldName" ]
    },
    "DateFieldFormat" : {
      "type" : "string",
      "minLength" : 4,
      "maxLength" : 40
    },
    "IndexFieldName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 30
    },
    "DataSourceToIndexFieldMappingList" : {
      "type" : "array",
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/DataSourceToIndexFieldMapping"
      }
    },
    "DisableLocalGroups" : {
      "type" : "boolean"
    },
    "SharePointConfiguration" : {
      "description" : "SharePoint configuration",
      "type" : "object",
      "properties" : {
        "SharePointVersion" : {
          "type" : "string",
          "enum" : [ "SHAREPOINT_ONLINE", "SHAREPOINT_2013", "SHAREPOINT_2016" ]
        },
        "Urls" : {
          "type" : "array",
          "maxItems" : 100,
          "items" : {
            "$ref" : "#/definitions/Url"
          }
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "CrawlAttachments" : {
          "type" : "boolean"
        },
        "UseChangeLog" : {
          "type" : "boolean"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "VpcConfiguration" : {
          "$ref" : "#/definitions/DataSourceVpcConfiguration"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DisableLocalGroups" : {
          "$ref" : "#/definitions/DisableLocalGroups"
        },
        "SslCertificateS3Path" : {
          "$ref" : "#/definitions/S3Path"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Urls", "SecretArn", "SharePointVersion" ]
    },
    "SalesforceConfiguration" : {
      "type" : "object",
      "properties" : {
        "ServerUrl" : {
          "$ref" : "#/definitions/Url"
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "StandardObjectConfigurations" : {
          "$ref" : "#/definitions/SalesforceStandardObjectConfigurationList"
        },
        "KnowledgeArticleConfiguration" : {
          "$ref" : "#/definitions/SalesforceKnowledgeArticleConfiguration"
        },
        "ChatterFeedConfiguration" : {
          "$ref" : "#/definitions/SalesforceChatterFeedConfiguration"
        },
        "CrawlAttachments" : {
          "type" : "boolean"
        },
        "StandardObjectAttachmentConfiguration" : {
          "$ref" : "#/definitions/SalesforceStandardObjectAttachmentConfiguration"
        },
        "IncludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExcludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        }
      },
      "additionalProperties" : false,
      "required" : [ "ServerUrl", "SecretArn" ]
    },
    "SalesforceStandardObjectConfigurationList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 17,
      "items" : {
        "$ref" : "#/definitions/SalesforceStandardObjectConfiguration"
      }
    },
    "SalesforceStandardObjectConfiguration" : {
      "type" : "object",
      "properties" : {
        "Name" : {
          "$ref" : "#/definitions/SalesforceStandardObjectName"
        },
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Name", "DocumentDataFieldName" ]
    },
    "SalesforceStandardObjectName" : {
      "type" : "string",
      "enum" : [ "ACCOUNT", "CAMPAIGN", "CASE", "CONTACT", "CONTRACT", "DOCUMENT", "GROUP", "IDEA", "LEAD", "OPPORTUNITY", "PARTNER", "PRICEBOOK", "PRODUCT", "PROFILE", "SOLUTION", "TASK", "USER" ]
    },
    "SalesforceKnowledgeArticleConfiguration" : {
      "type" : "object",
      "properties" : {
        "IncludedStates" : {
          "$ref" : "#/definitions/SalesforceKnowledgeArticleStateList"
        },
        "StandardKnowledgeArticleTypeConfiguration" : {
          "$ref" : "#/definitions/SalesforceStandardKnowledgeArticleTypeConfiguration"
        },
        "CustomKnowledgeArticleTypeConfigurations" : {
          "$ref" : "#/definitions/SalesforceCustomKnowledgeArticleTypeConfigurationList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "IncludedStates" ]
    },
    "SalesforceKnowledgeArticleStateList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 3,
      "items" : {
        "$ref" : "#/definitions/SalesforceKnowledgeArticleState"
      }
    },
    "SalesforceKnowledgeArticleState" : {
      "type" : "string",
      "enum" : [ "DRAFT", "PUBLISHED", "ARCHIVED" ]
    },
    "SalesforceStandardKnowledgeArticleTypeConfiguration" : {
      "type" : "object",
      "properties" : {
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DocumentDataFieldName" ]
    },
    "SalesforceCustomKnowledgeArticleTypeConfigurationList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 10,
      "items" : {
        "$ref" : "#/definitions/SalesforceCustomKnowledgeArticleTypeConfiguration"
      }
    },
    "SalesforceCustomKnowledgeArticleTypeConfiguration" : {
      "type" : "object",
      "properties" : {
        "Name" : {
          "$ref" : "#/definitions/SalesforceCustomKnowledgeArticleTypeName"
        },
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Name", "DocumentDataFieldName" ]
    },
    "SalesforceCustomKnowledgeArticleTypeName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "SalesforceChatterFeedConfiguration" : {
      "type" : "object",
      "properties" : {
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "IncludeFilterTypes" : {
          "$ref" : "#/definitions/SalesforceChatterFeedIncludeFilterTypes"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DocumentDataFieldName" ]
    },
    "SalesforceChatterFeedIncludeFilterTypes" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 2,
      "items" : {
        "$ref" : "#/definitions/SalesforceChatterFeedIncludeFilterType"
      }
    },
    "SalesforceChatterFeedIncludeFilterType" : {
      "type" : "string",
      "enum" : [ "ACTIVE_USER", "STANDARD_USER" ]
    },
    "SalesforceStandardObjectAttachmentConfiguration" : {
      "type" : "object",
      "properties" : {
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false
    },
    "DatabaseConfiguration" : {
      "type" : "object",
      "properties" : {
        "DatabaseEngineType" : {
          "$ref" : "#/definitions/DatabaseEngineType"
        },
        "ConnectionConfiguration" : {
          "$ref" : "#/definitions/ConnectionConfiguration"
        },
        "VpcConfiguration" : {
          "$ref" : "#/definitions/DataSourceVpcConfiguration"
        },
        "ColumnConfiguration" : {
          "$ref" : "#/definitions/ColumnConfiguration"
        },
        "AclConfiguration" : {
          "$ref" : "#/definitions/AclConfiguration"
        },
        "SqlConfiguration" : {
          "$ref" : "#/definitions/SqlConfiguration"
        }
      },
      "additionalProperties" : false,
      "required" : [ "ConnectionConfiguration", "ColumnConfiguration", "DatabaseEngineType" ]
    },
    "DatabaseEngineType" : {
      "type" : "string",
      "enum" : [ "RDS_AURORA_MYSQL", "RDS_AURORA_POSTGRESQL", "RDS_MYSQL", "RDS_POSTGRESQL" ]
    },
    "ConnectionConfiguration" : {
      "type" : "object",
      "properties" : {
        "DatabaseHost" : {
          "$ref" : "#/definitions/DatabaseHost"
        },
        "DatabasePort" : {
          "$ref" : "#/definitions/DatabasePort"
        },
        "DatabaseName" : {
          "$ref" : "#/definitions/DatabaseName"
        },
        "TableName" : {
          "$ref" : "#/definitions/TableName"
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DatabaseHost", "DatabasePort", "DatabaseName", "TableName", "SecretArn" ]
    },
    "DatabaseHost" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 253
    },
    "DatabasePort" : {
      "type" : "integer",
      "minimum" : 1,
      "maximum" : 65535
    },
    "DatabaseName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "TableName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "ColumnConfiguration" : {
      "type" : "object",
      "properties" : {
        "DocumentIdColumnName" : {
          "$ref" : "#/definitions/ColumnName"
        },
        "DocumentDataColumnName" : {
          "$ref" : "#/definitions/ColumnName"
        },
        "DocumentTitleColumnName" : {
          "$ref" : "#/definitions/ColumnName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "ChangeDetectingColumns" : {
          "$ref" : "#/definitions/ChangeDetectingColumns"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DocumentIdColumnName", "DocumentDataColumnName", "ChangeDetectingColumns" ]
    },
    "ChangeDetectingColumns" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 5,
      "items" : {
        "$ref" : "#/definitions/ColumnName"
      }
    },
    "ColumnName" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "SqlConfiguration" : {
      "type" : "object",
      "properties" : {
        "QueryIdentifiersEnclosingOption" : {
          "$ref" : "#/definitions/QueryIdentifiersEnclosingOption"
        }
      },
      "additionalProperties" : false
    },
    "QueryIdentifiersEnclosingOption" : {
      "type" : "string",
      "enum" : [ "DOUBLE_QUOTES", "NONE" ]
    },
    "AclConfiguration" : {
      "type" : "object",
      "properties" : {
        "AllowedGroupsColumnName" : {
          "$ref" : "#/definitions/ColumnName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "AllowedGroupsColumnName" ]
    },
    "OneDriveConfiguration" : {
      "type" : "object",
      "properties" : {
        "TenantDomain" : {
          "$ref" : "#/definitions/TenantDomain"
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "OneDriveUsers" : {
          "$ref" : "#/definitions/OneDriveUsers"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "DisableLocalGroups" : {
          "$ref" : "#/definitions/DisableLocalGroups"
        }
      },
      "additionalProperties" : false,
      "required" : [ "TenantDomain", "SecretArn", "OneDriveUsers" ]
    },
    "TenantDomain" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256,
      "pattern" : "^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+[a-z]{2,}$"
    },
    "OneDriveUsers" : {
      "type" : "object",
      "properties" : {
        "OneDriveUserList" : {
          "$ref" : "#/definitions/OneDriveUserList"
        },
        "OneDriveUserS3Path" : {
          "$ref" : "#/definitions/S3Path"
        }
      },
      "additionalProperties" : false,
      "oneOf" : [ {
        "required" : [ "OneDriveUserList" ]
      }, {
        "required" : [ "OneDriveUserS3Path" ]
      } ]
    },
    "OneDriveUserList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/OneDriveUser"
      }
    },
    "OneDriveUser" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256,
      "pattern" : "^(?!\\s).+@([a-zA-Z0-9_\\-\\.]+)\\.([a-zA-Z]{2,5})$"
    },
    "ServiceNowConfiguration" : {
      "type" : "object",
      "properties" : {
        "HostUrl" : {
          "$ref" : "#/definitions/ServiceNowHostUrl"
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "ServiceNowBuildVersion" : {
          "$ref" : "#/definitions/ServiceNowBuildVersionType"
        },
        "AuthenticationType" : {
          "$ref" : "#/definitions/ServiceNowAuthenticationType"
        },
        "KnowledgeArticleConfiguration" : {
          "$ref" : "#/definitions/ServiceNowKnowledgeArticleConfiguration"
        },
        "ServiceCatalogConfiguration" : {
          "$ref" : "#/definitions/ServiceNowServiceCatalogConfiguration"
        }
      },
      "additionalProperties" : false,
      "required" : [ "HostUrl", "SecretArn", "ServiceNowBuildVersion" ]
    },
    "ServiceNowBuildVersionType" : {
      "type" : "string",
      "enum" : [ "LONDON", "OTHERS" ]
    },
    "ServiceNowAuthenticationType" : {
      "type" : "string",
      "enum" : [ "HTTP_BASIC", "OAUTH2" ]
    },
    "ServiceNowServiceCatalogConfiguration" : {
      "type" : "object",
      "properties" : {
        "CrawlAttachments" : {
          "type" : "boolean"
        },
        "IncludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExcludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DocumentDataFieldName" ]
    },
    "ServiceNowHostUrl" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048,
      "pattern" : "^(?!(^(https?|ftp|file):\\/\\/))[a-z0-9-]+(\\.service-now\\.com)$"
    },
    "ServiceNowKnowledgeArticleConfiguration" : {
      "type" : "object",
      "properties" : {
        "CrawlAttachments" : {
          "type" : "boolean"
        },
        "IncludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExcludeAttachmentFilePatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "DocumentDataFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "DocumentTitleFieldName" : {
          "$ref" : "#/definitions/DataSourceFieldName"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "FilterQuery" : {
          "$ref" : "#/definitions/ServiceNowKnowledgeArticleFilterQuery"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DocumentDataFieldName" ]
    },
    "ServiceNowKnowledgeArticleFilterQuery" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048
    },
    "ConfluenceConfiguration" : {
      "type" : "object",
      "properties" : {
        "ServerUrl" : {
          "$ref" : "#/definitions/Url"
        },
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "Version" : {
          "$ref" : "#/definitions/ConfluenceVersion"
        },
        "SpaceConfiguration" : {
          "$ref" : "#/definitions/ConfluenceSpaceConfiguration"
        },
        "PageConfiguration" : {
          "$ref" : "#/definitions/ConfluencePageConfiguration"
        },
        "BlogConfiguration" : {
          "$ref" : "#/definitions/ConfluenceBlogConfiguration"
        },
        "AttachmentConfiguration" : {
          "$ref" : "#/definitions/ConfluenceAttachmentConfiguration"
        },
        "VpcConfiguration" : {
          "$ref" : "#/definitions/DataSourceVpcConfiguration"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        }
      },
      "additionalProperties" : false,
      "required" : [ "ServerUrl", "SecretArn", "Version" ]
    },
    "ConfluenceVersion" : {
      "type" : "string",
      "enum" : [ "CLOUD", "SERVER" ]
    },
    "ConfluenceSpaceConfiguration" : {
      "type" : "object",
      "properties" : {
        "CrawlPersonalSpaces" : {
          "type" : "boolean"
        },
        "CrawlArchivedSpaces" : {
          "type" : "boolean"
        },
        "IncludeSpaces" : {
          "$ref" : "#/definitions/ConfluenceSpaceList"
        },
        "ExcludeSpaces" : {
          "$ref" : "#/definitions/ConfluenceSpaceList"
        },
        "SpaceFieldMappings" : {
          "$ref" : "#/definitions/ConfluenceSpaceFieldMappingsList"
        }
      },
      "additionalProperties" : false
    },
    "ConfluenceSpaceFieldMappingsList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 4,
      "items" : {
        "$ref" : "#/definitions/ConfluenceSpaceToIndexFieldMapping"
      }
    },
    "ConfluenceSpaceToIndexFieldMapping" : {
      "type" : "object",
      "properties" : {
        "DataSourceFieldName" : {
          "$ref" : "#/definitions/ConfluenceSpaceFieldName"
        },
        "DateFieldFormat" : {
          "$ref" : "#/definitions/DateFieldFormat"
        },
        "IndexFieldName" : {
          "$ref" : "#/definitions/IndexFieldName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DataSourceFieldName", "IndexFieldName" ]
    },
    "ConfluenceSpaceFieldName" : {
      "type" : "string",
      "enum" : [ "DISPLAY_URL", "ITEM_TYPE", "SPACE_KEY", "URL" ]
    },
    "ConfluenceSpaceList" : {
      "type" : "array",
      "minItems" : 1,
      "items" : {
        "$ref" : "#/definitions/ConfluenceSpaceIdentifier"
      }
    },
    "ConfluenceSpaceIdentifier" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 255
    },
    "ConfluencePageConfiguration" : {
      "type" : "object",
      "properties" : {
        "PageFieldMappings" : {
          "$ref" : "#/definitions/ConfluencePageFieldMappingsList"
        }
      },
      "additionalProperties" : false
    },
    "ConfluencePageFieldMappingsList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 12,
      "items" : {
        "$ref" : "#/definitions/ConfluencePageToIndexFieldMapping"
      }
    },
    "ConfluencePageToIndexFieldMapping" : {
      "type" : "object",
      "properties" : {
        "DataSourceFieldName" : {
          "$ref" : "#/definitions/ConfluencePageFieldName"
        },
        "DateFieldFormat" : {
          "$ref" : "#/definitions/DateFieldFormat"
        },
        "IndexFieldName" : {
          "$ref" : "#/definitions/IndexFieldName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DataSourceFieldName", "IndexFieldName" ]
    },
    "ConfluencePageFieldName" : {
      "type" : "string",
      "enum" : [ "AUTHOR", "CONTENT_STATUS", "CREATED_DATE", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "MODIFIED_DATE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION" ]
    },
    "ConfluenceBlogConfiguration" : {
      "type" : "object",
      "properties" : {
        "BlogFieldMappings" : {
          "$ref" : "#/definitions/ConfluenceBlogFieldMappingsList"
        }
      },
      "additionalProperties" : false
    },
    "ConfluenceBlogFieldMappingsList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 9,
      "items" : {
        "$ref" : "#/definitions/ConfluenceBlogToIndexFieldMapping"
      }
    },
    "ConfluenceBlogToIndexFieldMapping" : {
      "type" : "object",
      "properties" : {
        "DataSourceFieldName" : {
          "$ref" : "#/definitions/ConfluenceBlogFieldName"
        },
        "DateFieldFormat" : {
          "$ref" : "#/definitions/DateFieldFormat"
        },
        "IndexFieldName" : {
          "$ref" : "#/definitions/IndexFieldName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DataSourceFieldName", "IndexFieldName" ]
    },
    "ConfluenceBlogFieldName" : {
      "type" : "string",
      "enum" : [ "AUTHOR", "DISPLAY_URL", "ITEM_TYPE", "LABELS", "PUBLISH_DATE", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION" ]
    },
    "ConfluenceAttachmentConfiguration" : {
      "type" : "object",
      "properties" : {
        "CrawlAttachments" : {
          "type" : "boolean"
        },
        "AttachmentFieldMappings" : {
          "$ref" : "#/definitions/ConfluenceAttachmentFieldMappingsList"
        }
      },
      "additionalProperties" : false
    },
    "ConfluenceAttachmentFieldMappingsList" : {
      "type" : "array",
      "minItems" : 1,
      "maxItems" : 11,
      "items" : {
        "$ref" : "#/definitions/ConfluenceAttachmentToIndexFieldMapping"
      }
    },
    "ConfluenceAttachmentToIndexFieldMapping" : {
      "type" : "object",
      "properties" : {
        "DataSourceFieldName" : {
          "$ref" : "#/definitions/ConfluenceAttachmentFieldName"
        },
        "DateFieldFormat" : {
          "$ref" : "#/definitions/DateFieldFormat"
        },
        "IndexFieldName" : {
          "$ref" : "#/definitions/IndexFieldName"
        }
      },
      "additionalProperties" : false,
      "required" : [ "DataSourceFieldName", "IndexFieldName" ]
    },
    "GoogleDriveConfiguration" : {
      "type" : "object",
      "properties" : {
        "SecretArn" : {
          "$ref" : "#/definitions/SecretArn"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        },
        "ExcludeMimeTypes" : {
          "$ref" : "#/definitions/ExcludeMimeTypesList"
        },
        "ExcludeUserAccounts" : {
          "$ref" : "#/definitions/ExcludeUserAccountsList"
        },
        "ExcludeSharedDrives" : {
          "$ref" : "#/definitions/ExcludeSharedDrivesList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "SecretArn" ]
    },
    "ExcludeMimeTypesList" : {
      "type" : "array",
      "minItems" : 0,
      "maxItems" : 30,
      "items" : {
        "$ref" : "#/definitions/MimeType"
      }
    },
    "MimeType" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256
    },
    "ExcludeUserAccountsList" : {
      "type" : "array",
      "minItems" : 0,
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/UserAccount"
      }
    },
    "UserAccount" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256
    },
    "ExcludeSharedDrivesList" : {
      "type" : "array",
      "minItems" : 0,
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/SharedDriveId"
      }
    },
    "SharedDriveId" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 256
    },
    "ConfluenceAttachmentFieldName" : {
      "type" : "string",
      "enum" : [ "AUTHOR", "CONTENT_TYPE", "CREATED_DATE", "DISPLAY_URL", "FILE_SIZE", "ITEM_TYPE", "PARENT_ID", "SPACE_KEY", "SPACE_NAME", "URL", "VERSION" ]
    },
    "WebCrawlerSiteMap" : {
      "type" : "string",
      "pattern" : "^(https?):\\/\\/([^\\s]*)",
      "minLength" : 1,
      "maxLength" : 2048
    },
    "WebCrawlerSiteMaps" : {
      "type" : "array",
      "minItems" : 0,
      "maxItems" : 3,
      "items" : {
        "$ref" : "#/definitions/WebCrawlerSiteMap"
      }
    },
    "WebCrawlerSiteMapsConfiguration" : {
      "type" : "object",
      "properties" : {
        "SiteMaps" : {
          "$ref" : "#/definitions/WebCrawlerSiteMaps"
        }
      },
      "additionalProperties" : false,
      "required" : [ "SiteMaps" ]
    },
    "WebCrawlerSeedUrl" : {
      "type" : "string",
      "pattern" : "^(https?)://([^\\s]*)",
      "minLength" : 1,
      "maxLength" : 2048
    },
    "WebCrawlerSeedUrlList" : {
      "type" : "array",
      "minItems" : 0,
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/WebCrawlerSeedUrl"
      }
    },
    "WebCrawlerSeedUrlConfiguration" : {
      "type" : "object",
      "properties" : {
        "SeedUrls" : {
          "$ref" : "#/definitions/WebCrawlerSeedUrlList"
        },
        "WebCrawlerMode" : {
          "type" : "string",
          "enum" : [ "HOST_ONLY", "SUBDOMAINS", "EVERYTHING" ]
        }
      },
      "additionalProperties" : false,
      "required" : [ "SeedUrls" ]
    },
    "WebCrawlerUrls" : {
      "type" : "object",
      "properties" : {
        "SeedUrlConfiguration" : {
          "$ref" : "#/definitions/WebCrawlerSeedUrlConfiguration"
        },
        "SiteMapsConfiguration" : {
          "$ref" : "#/definitions/WebCrawlerSiteMapsConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "ProxyConfiguration" : {
      "type" : "object",
      "properties" : {
        "Host" : {
          "type" : "string",
          "pattern" : "([^\\s]*)",
          "minLength" : 1,
          "maxLength" : 253
        },
        "Port" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 65535
        },
        "Credentials" : {
          "$ref" : "#/definitions/SecretArn"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Host", "Port" ]
    },
    "WebCrawlerBasicAuthentication" : {
      "type" : "object",
      "properties" : {
        "Host" : {
          "type" : "string",
          "pattern" : "([^\\s]*)",
          "minLength" : 1,
          "maxLength" : 253
        },
        "Port" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 65535
        },
        "Credentials" : {
          "$ref" : "#/definitions/SecretArn"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Host", "Port", "Credentials" ]
    },
    "WebCrawlerBasicAuthenticationList" : {
      "type" : "array",
      "maxItems" : 10,
      "items" : {
        "$ref" : "#/definitions/WebCrawlerBasicAuthentication"
      }
    },
    "WebCrawlerAuthenticationConfiguration" : {
      "type" : "object",
      "properties" : {
        "BasicAuthentication" : {
          "$ref" : "#/definitions/WebCrawlerBasicAuthenticationList"
        }
      },
      "additionalProperties" : false
    },
    "WebCrawlerConfiguration" : {
      "type" : "object",
      "properties" : {
        "Urls" : {
          "$ref" : "#/definitions/WebCrawlerUrls"
        },
        "CrawlDepth" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 10
        },
        "MaxLinksPerPage" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 1000
        },
        "MaxContentSizePerPageInMegaBytes" : {
          "type" : "number",
          "minimum" : 0,
          "maximum" : 50
        },
        "MaxUrlsPerMinuteCrawlRate" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 300
        },
        "UrlInclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "UrlExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ProxyConfiguration" : {
          "$ref" : "#/definitions/ProxyConfiguration"
        },
        "AuthenticationConfiguration" : {
          "$ref" : "#/definitions/WebCrawlerAuthenticationConfiguration"
        }
      },
      "additionalProperties" : false,
      "required" : [ "Urls" ]
    },
    "WorkDocsConfiguration" : {
      "type" : "object",
      "properties" : {
        "OrganizationId" : {
          "type" : "string",
          "minLength" : 12,
          "maxLength" : 12,
          "pattern" : "d-[0-9a-fA-F]{10}"
        },
        "CrawlComments" : {
          "type" : "boolean"
        },
        "UseChangeLog" : {
          "type" : "boolean"
        },
        "InclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "ExclusionPatterns" : {
          "$ref" : "#/definitions/DataSourceInclusionsExclusionsStrings"
        },
        "FieldMappings" : {
          "$ref" : "#/definitions/DataSourceToIndexFieldMappingList"
        }
      },
      "additionalProperties" : false,
      "required" : [ "OrganizationId" ]
    },
    "DataSourceConfiguration" : {
      "type" : "object",
      "properties" : {
        "S3Configuration" : {
          "$ref" : "#/definitions/S3DataSourceConfiguration"
        },
        "SharePointConfiguration" : {
          "$ref" : "#/definitions/SharePointConfiguration"
        },
        "SalesforceConfiguration" : {
          "$ref" : "#/definitions/SalesforceConfiguration"
        },
        "OneDriveConfiguration" : {
          "$ref" : "#/definitions/OneDriveConfiguration"
        },
        "ServiceNowConfiguration" : {
          "$ref" : "#/definitions/ServiceNowConfiguration"
        },
        "DatabaseConfiguration" : {
          "$ref" : "#/definitions/DatabaseConfiguration"
        },
        "ConfluenceConfiguration" : {
          "$ref" : "#/definitions/ConfluenceConfiguration"
        },
        "GoogleDriveConfiguration" : {
          "$ref" : "#/definitions/GoogleDriveConfiguration"
        },
        "WebCrawlerConfiguration" : {
          "$ref" : "#/definitions/WebCrawlerConfiguration"
        },
        "WorkDocsConfiguration" : {
          "$ref" : "#/definitions/WorkDocsConfiguration"
        }
      },
      "additionalProperties" : false,
      "oneOf" : [ {
        "required" : [ "S3Configuration" ]
      }, {
        "required" : [ "SharePointConfiguration" ]
      }, {
        "required" : [ "SalesforceConfiguration" ]
      }, {
        "required" : [ "OneDriveConfiguration" ]
      }, {
        "required" : [ "ServiceNowConfiguration" ]
      }, {
        "required" : [ "DatabaseConfiguration" ]
      }, {
        "required" : [ "ConfluenceConfiguration" ]
      }, {
        "required" : [ "GoogleDriveConfiguration" ]
      }, {
        "required" : [ "WebCrawlerConfiguration" ]
      }, {
        "required" : [ "WorkDocsConfiguration" ]
      } ]
    },
    "Name" : {
      "description" : "Name of data source",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1000
    },
    "Type" : {
      "description" : "Data source type",
      "type" : "string",
      "enum" : [ "S3", "SHAREPOINT", "SALESFORCE", "ONEDRIVE", "SERVICENOW", "DATABASE", "CUSTOM", "CONFLUENCE", "GOOGLEDRIVE", "WEBCRAWLER", "WORKDOCS" ]
    },
    "Description" : {
      "description" : "Description of data source",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1000
    },
    "RoleArn" : {
      "description" : "Role ARN",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 1284,
      "pattern" : "arn:[a-z0-9-\\.]{1,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[a-z0-9-\\.]{0,63}:[^/].{0,1023}"
    },
    "Schedule" : {
      "description" : "Schedule",
      "type" : "string",
      "maxLength" : 1000
    },
    "Id" : {
      "description" : "ID of data source",
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 100
    },
    "Arn" : {
      "type" : "string",
      "maxLength" : 1000
    },
    "CustomDocumentEnrichmentConfiguration" : {
      "type" : "object",
      "properties" : {
        "InlineConfigurations" : {
          "$ref" : "#/definitions/InlineConfigurations"
        },
        "PreExtractionHookConfiguration" : {
          "$ref" : "#/definitions/HookConfiguration"
        },
        "PostExtractionHookConfiguration" : {
          "$ref" : "#/definitions/HookConfiguration"
        },
        "RoleArn" : {
          "$ref" : "#/definitions/RoleArn"
        }
      },
      "additionalProperties" : false
    },
    "InlineConfigurations" : {
      "description" : "List of InlineCustomDocumentEnrichmentConfigurations",
      "type" : "array",
      "maxItems" : 100,
      "items" : {
        "$ref" : "#/definitions/InlineCustomDocumentEnrichmentConfiguration"
      }
    },
    "InlineCustomDocumentEnrichmentConfiguration" : {
      "type" : "object",
      "properties" : {
        "Condition" : {
          "$ref" : "#/definitions/DocumentAttributeCondition"
        },
        "Target" : {
          "$ref" : "#/definitions/DocumentAttributeTarget"
        },
        "DocumentContentDeletion" : {
          "type" : "boolean"
        }
      },
      "additionalProperties" : false
    },
    "DocumentAttributeCondition" : {
      "type" : "object",
      "properties" : {
        "ConditionDocumentAttributeKey" : {
          "$ref" : "#/definitions/DocumentAttributeKey"
        },
        "Operator" : {
          "$ref" : "#/definitions/ConditionOperator"
        },
        "ConditionOnValue" : {
          "$ref" : "#/definitions/DocumentAttributeValue"
        }
      },
      "required" : [ "ConditionDocumentAttributeKey", "Operator" ],
      "additionalProperties" : false
    },
    "DocumentAttributeTarget" : {
      "type" : "object",
      "properties" : {
        "TargetDocumentAttributeKey" : {
          "$ref" : "#/definitions/DocumentAttributeKey"
        },
        "TargetDocumentAttributeValueDeletion" : {
          "type" : "boolean"
        },
        "TargetDocumentAttributeValue" : {
          "$ref" : "#/definitions/DocumentAttributeValue"
        }
      },
      "required" : [ "TargetDocumentAttributeKey" ],
      "additionalProperties" : false
    },
    "ConditionOperator" : {
      "type" : "string",
      "enum" : [ "GreaterThan", "GreaterThanOrEquals", "LessThan", "LessThanOrEquals", "Equals", "NotEquals", "Contains", "NotContains", "Exists", "NotExists", "BeginsWith" ]
    },
    "DocumentAttributeKey" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 200,
      "pattern" : "[a-zA-Z0-9_][a-zA-Z0-9_-]*"
    },
    "DocumentAttributeValue" : {
      "type" : "object",
      "properties" : {
        "StringValue" : {
          "type" : "string",
          "minLength" : 1,
          "maxLength" : 2048
        },
        "StringListValue" : {
          "type" : "array",
          "items" : {
            "type" : "string"
          }
        },
        "LongValue" : {
          "$ref" : "#/definitions/Long"
        },
        "DateValue" : {
          "$ref" : "#/definitions/Timestamp"
        }
      },
      "additionalProperties" : false
    },
    "Long" : {
      "type" : "integer",
      "format" : "int64"
    },
    "Timestamp" : {
      "type" : "string"
    },
    "HookConfiguration" : {
      "type" : "object",
      "properties" : {
        "InvocationCondition" : {
          "$ref" : "#/definitions/DocumentAttributeCondition"
        },
        "LambdaArn" : {
          "$ref" : "#/definitions/LambdaArn"
        },
        "S3Bucket" : {
          "$ref" : "#/definitions/S3BucketName"
        }
      },
      "required" : [ "LambdaArn", "S3Bucket" ],
      "additionalProperties" : false
    },
    "LambdaArn" : {
      "type" : "string",
      "minLength" : 1,
      "maxLength" : 2048
    }
  },
  "properties" : {
    "Id" : {
      "$ref" : "#/definitions/Id"
    },
    "Arn" : {
      "$ref" : "#/definitions/Arn"
    },
    "Name" : {
      "$ref" : "#/definitions/Name"
    },
    "IndexId" : {
      "$ref" : "#/definitions/IndexId"
    },
    "Type" : {
      "$ref" : "#/definitions/Type"
    },
    "DataSourceConfiguration" : {
      "$ref" : "#/definitions/DataSourceConfiguration"
    },
    "Description" : {
      "$ref" : "#/definitions/Description"
    },
    "Schedule" : {
      "$ref" : "#/definitions/Schedule"
    },
    "RoleArn" : {
      "$ref" : "#/definitions/RoleArn"
    },
    "Tags" : {
      "description" : "Tags for labeling the data source",
      "$ref" : "#/definitions/TagList"
    },
    "CustomDocumentEnrichmentConfiguration" : {
      "$ref" : "#/definitions/CustomDocumentEnrichmentConfiguration"
    }
  },
  "required" : [ "Name", "IndexId", "Type" ],
  "handlers" : {
    "create" : {
      "permissions" : [ "kendra:CreateDataSource", "kendra:DescribeDataSource", "kendra:ListTagsForResource", "iam:PassRole", "kendra:TagResource" ]
    },
    "read" : {
      "permissions" : [ "kendra:DescribeDataSource", "kendra:ListTagsForResource" ]
    },
    "delete" : {
      "permissions" : [ "kendra:DescribeDataSource", "kendra:DeleteDataSource" ],
      "timeoutInMinutes" : 720
    },
    "list" : {
      "permissions" : [ "kendra:ListDataSources" ]
    },
    "update" : {
      "permissions" : [ "kendra:DescribeDataSource", "kendra:UpdateDataSource", "kendra:ListTagsForResource", "kendra:TagResource", "kendra:UntagResource", "iam:PassRole" ]
    }
  },
  "additionalProperties" : false,
  "primaryIdentifier" : [ "/properties/Id", "/properties/IndexId" ],
  "readOnlyProperties" : [ "/properties/Id", "/properties/Arn" ],
  "createOnlyProperties" : [ "/properties/Type" ]
}