{
  "typeName" : "AWS::Bedrock::DataSource",
  "description" : "Definition of AWS::Bedrock::DataSource Resource Type",
  "sourceUrl" : "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-aps",
  "definitions" : {
    "ContextEnrichmentConfiguration" : {
      "type" : "object",
      "description" : "Additional Enrichment Configuration for example when using GraphRag.",
      "properties" : {
        "Type" : {
          "$ref" : "#/definitions/ContextEnrichmentType"
        },
        "BedrockFoundationModelConfiguration" : {
          "$ref" : "#/definitions/BedrockFoundationModelContextEnrichmentConfiguration"
        }
      },
      "required" : [ "Type" ],
      "additionalProperties" : false
    },
    "ContextEnrichmentType" : {
      "type" : "string",
      "description" : "Enrichment type to be used for the vector database.",
      "enum" : [ "BEDROCK_FOUNDATION_MODEL" ]
    },
    "BedrockFoundationModelContextEnrichmentConfiguration" : {
      "type" : "object",
      "description" : "Bedrock Foundation Model configuration to be used for Context Enrichment.",
      "properties" : {
        "EnrichmentStrategyConfiguration" : {
          "$ref" : "#/definitions/EnrichmentStrategyConfiguration"
        },
        "ModelArn" : {
          "$ref" : "#/definitions/ModelArn"
        }
      },
      "required" : [ "EnrichmentStrategyConfiguration", "ModelArn" ],
      "additionalProperties" : false
    },
    "EnrichmentStrategyConfiguration" : {
      "type" : "object",
      "description" : "Strategy to be used when using Bedrock Foundation Model for Context Enrichment.",
      "properties" : {
        "Method" : {
          "$ref" : "#/definitions/EnrichmentStrategyMethod"
        }
      },
      "required" : [ "Method" ],
      "additionalProperties" : false
    },
    "EnrichmentStrategyMethod" : {
      "type" : "string",
      "description" : "Enrichment Strategy method.",
      "enum" : [ "CHUNK_ENTITY_EXTRACTION" ]
    },
    "BedrockFoundationModelConfiguration" : {
      "type" : "object",
      "description" : "Settings for a foundation model used to parse documents for a data source.",
      "properties" : {
        "ModelArn" : {
          "$ref" : "#/definitions/ModelArn"
        },
        "ParsingPrompt" : {
          "$ref" : "#/definitions/ParsingPrompt"
        },
        "ParsingModality" : {
          "$ref" : "#/definitions/ParsingModality"
        }
      },
      "required" : [ "ModelArn" ],
      "additionalProperties" : false
    },
    "ModelArn" : {
      "type" : "string",
      "maxLength" : 2048,
      "minLength" : 1,
      "pattern" : "^(arn:aws(-cn|-us-gov|-eusc|-iso(-[b-f])?)?:(bedrock):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-zA-Z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$",
      "description" : "The model's ARN."
    },
    "ChunkingConfiguration" : {
      "type" : "object",
      "description" : "Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.",
      "properties" : {
        "ChunkingStrategy" : {
          "$ref" : "#/definitions/ChunkingStrategy"
        },
        "FixedSizeChunkingConfiguration" : {
          "$ref" : "#/definitions/FixedSizeChunkingConfiguration"
        },
        "HierarchicalChunkingConfiguration" : {
          "$ref" : "#/definitions/HierarchicalChunkingConfiguration"
        },
        "SemanticChunkingConfiguration" : {
          "$ref" : "#/definitions/SemanticChunkingConfiguration"
        }
      },
      "required" : [ "ChunkingStrategy" ],
      "additionalProperties" : false
    },
    "ChunkingStrategy" : {
      "type" : "string",
      "description" : "Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.",
      "enum" : [ "FIXED_SIZE", "NONE", "HIERARCHICAL", "SEMANTIC" ]
    },
    "CustomTransformationConfiguration" : {
      "type" : "object",
      "description" : "Settings for customizing steps in the data source content ingestion pipeline.",
      "properties" : {
        "IntermediateStorage" : {
          "$ref" : "#/definitions/IntermediateStorage"
        },
        "Transformations" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/Transformation"
          },
          "maxItems" : 1,
          "minItems" : 1,
          "description" : "A list of Lambda functions that process documents.",
          "insertionOrder" : false
        }
      },
      "required" : [ "IntermediateStorage", "Transformations" ],
      "additionalProperties" : false
    },
    "DataSourceConfiguration" : {
      "type" : "object",
      "description" : "Specifies a raw data source location to ingest.",
      "properties" : {
        "Type" : {
          "$ref" : "#/definitions/DataSourceType"
        },
        "S3Configuration" : {
          "$ref" : "#/definitions/S3DataSourceConfiguration"
        },
        "ConfluenceConfiguration" : {
          "$ref" : "#/definitions/ConfluenceDataSourceConfiguration"
        },
        "SalesforceConfiguration" : {
          "$ref" : "#/definitions/SalesforceDataSourceConfiguration"
        },
        "SharePointConfiguration" : {
          "$ref" : "#/definitions/SharePointDataSourceConfiguration"
        },
        "WebConfiguration" : {
          "$ref" : "#/definitions/WebDataSourceConfiguration"
        },
        "ManagedKnowledgeBaseConnectorConfiguration" : {
          "$ref" : "#/definitions/ManagedKnowledgeBaseConnectorConfiguration"
        }
      },
      "required" : [ "Type" ],
      "additionalProperties" : false
    },
    "DataSourceStatus" : {
      "type" : "string",
      "description" : "The status of a data source.",
      "enum" : [ "AVAILABLE", "DELETING", "DELETE_UNSUCCESSFUL", "CREATING", "UPDATING", "FAILED" ]
    },
    "DataSourceType" : {
      "type" : "string",
      "description" : "The type of the data source location.",
      "enum" : [ "S3", "CONFLUENCE", "SALESFORCE", "SHAREPOINT", "WEB", "CUSTOM", "REDSHIFT_METADATA", "MANAGED_KNOWLEDGE_BASE_CONNECTOR" ]
    },
    "DataDeletionPolicy" : {
      "type" : "string",
      "description" : "The deletion policy for the data source.",
      "enum" : [ "RETAIN", "DELETE" ]
    },
    "FixedSizeChunkingConfiguration" : {
      "type" : "object",
      "description" : "Configurations for when you choose fixed-size chunking. If you set the chunkingStrategy as NONE, exclude this field.",
      "properties" : {
        "MaxTokens" : {
          "type" : "integer",
          "minimum" : 1,
          "description" : "The maximum number of tokens to include in a chunk."
        },
        "OverlapPercentage" : {
          "type" : "integer",
          "maximum" : 99,
          "minimum" : 1,
          "description" : "The percentage of overlap between adjacent chunks of a data source."
        }
      },
      "required" : [ "MaxTokens", "OverlapPercentage" ],
      "additionalProperties" : false
    },
    "HierarchicalChunkingConfiguration" : {
      "type" : "object",
      "description" : "Configurations for when you choose hierarchical chunking. If you set the chunkingStrategy as NONE, exclude this field.",
      "properties" : {
        "LevelConfigurations" : {
          "type" : "array",
          "items" : {
            "$ref" : "#/definitions/HierarchicalChunkingLevelConfiguration"
          },
          "maxItems" : 2,
          "minItems" : 2,
          "description" : "Token settings for each layer.",
          "insertionOrder" : false
        },
        "OverlapTokens" : {
          "type" : "integer",
          "minimum" : 1,
          "description" : "The number of tokens to repeat across chunks in the same layer."
        }
      },
      "required" : [ "LevelConfigurations", "OverlapTokens" ],
      "additionalProperties" : false
    },
    "HierarchicalChunkingLevelConfiguration" : {
      "type" : "object",
      "description" : "Token settings for a layer in a hierarchical chunking configuration.",
      "properties" : {
        "MaxTokens" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 8192,
          "description" : "The maximum number of tokens that a chunk can contain in this layer."
        }
      },
      "required" : [ "MaxTokens" ],
      "additionalProperties" : false
    },
    "IntermediateStorage" : {
      "type" : "object",
      "description" : "A location for storing content from data sources temporarily as it is processed by custom components in the ingestion pipeline.",
      "properties" : {
        "S3Location" : {
          "$ref" : "#/definitions/S3Location"
        }
      },
      "required" : [ "S3Location" ],
      "additionalProperties" : false
    },
    "ParsingConfiguration" : {
      "type" : "object",
      "description" : "Settings for parsing document contents",
      "properties" : {
        "ParsingStrategy" : {
          "$ref" : "#/definitions/ParsingStrategy"
        },
        "BedrockFoundationModelConfiguration" : {
          "$ref" : "#/definitions/BedrockFoundationModelConfiguration"
        },
        "BedrockDataAutomationConfiguration" : {
          "$ref" : "#/definitions/BedrockDataAutomationConfiguration"
        }
      },
      "required" : [ "ParsingStrategy" ],
      "additionalProperties" : false
    },
    "ParsingModality" : {
      "type" : "string",
      "description" : "Determine how will parsed content be stored.",
      "enum" : [ "MULTIMODAL" ]
    },
    "BedrockDataAutomationConfiguration" : {
      "type" : "object",
      "description" : "Settings for a Bedrock Data Automation used to parse documents for a data source.",
      "properties" : {
        "ParsingModality" : {
          "$ref" : "#/definitions/ParsingModality"
        }
      },
      "additionalProperties" : false
    },
    "ParsingPrompt" : {
      "type" : "object",
      "description" : "Instructions for interpreting the contents of a document.",
      "properties" : {
        "ParsingPromptText" : {
          "type" : "string",
          "maxLength" : 10000,
          "minLength" : 1,
          "description" : "Instructions for interpreting the contents of a document."
        }
      },
      "required" : [ "ParsingPromptText" ],
      "additionalProperties" : false
    },
    "ParsingStrategy" : {
      "type" : "string",
      "description" : "The parsing strategy for the data source.",
      "enum" : [ "BEDROCK_FOUNDATION_MODEL", "BEDROCK_DATA_AUTOMATION", "SMART_PARSING" ]
    },
    "EnabledOrDisabledState" : {
      "type" : "string",
      "description" : "Indicates whether a feature is enabled or disabled.",
      "enum" : [ "ENABLED", "DISABLED" ]
    },
    "ManagedKnowledgeBaseConnectorConfiguration" : {
      "type" : "object",
      "description" : "Configuration for managed knowledge base connector data sources.",
      "properties" : {
        "DeletionProtectionConfiguration" : {
          "$ref" : "#/definitions/DeletionProtectionConfiguration"
        },
        "MediaExtractionConfiguration" : {
          "$ref" : "#/definitions/MediaExtractionConfiguration"
        },
        "ConnectorParameters" : {
          "type" : "object",
          "description" : "Connector-specific parameters."
        }
      },
      "additionalProperties" : false
    },
    "DeletionProtectionConfiguration" : {
      "type" : "object",
      "description" : "Configuration for deletion protection.",
      "properties" : {
        "DeletionProtectionStatus" : {
          "$ref" : "#/definitions/EnabledOrDisabledState"
        },
        "DeletionProtectionThreshold" : {
          "type" : "integer",
          "minimum" : 0,
          "maximum" : 100,
          "default" : 15,
          "description" : "Threshold for deletion protection."
        }
      },
      "required" : [ "DeletionProtectionStatus" ],
      "additionalProperties" : false
    },
    "MediaExtractionConfiguration" : {
      "type" : "object",
      "description" : "Configuration for media extraction settings.",
      "properties" : {
        "ImageExtractionConfiguration" : {
          "$ref" : "#/definitions/ImageExtractionConfiguration"
        },
        "AudioExtractionConfiguration" : {
          "$ref" : "#/definitions/AudioExtractionConfiguration"
        },
        "VideoExtractionConfiguration" : {
          "$ref" : "#/definitions/VideoExtractionConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "ImageExtractionConfiguration" : {
      "type" : "object",
      "description" : "Configuration for image extraction.",
      "properties" : {
        "ImageExtractionStatus" : {
          "$ref" : "#/definitions/EnabledOrDisabledState"
        }
      },
      "required" : [ "ImageExtractionStatus" ],
      "additionalProperties" : false
    },
    "AudioExtractionConfiguration" : {
      "type" : "object",
      "description" : "Configuration for audio extraction.",
      "properties" : {
        "AudioExtractionStatus" : {
          "$ref" : "#/definitions/EnabledOrDisabledState"
        }
      },
      "required" : [ "AudioExtractionStatus" ],
      "additionalProperties" : false
    },
    "VideoExtractionConfiguration" : {
      "type" : "object",
      "description" : "Configuration for video extraction.",
      "properties" : {
        "VideoExtractionStatus" : {
          "$ref" : "#/definitions/EnabledOrDisabledState"
        }
      },
      "required" : [ "VideoExtractionStatus" ],
      "additionalProperties" : false
    },
    "S3DataSourceConfiguration" : {
      "type" : "object",
      "description" : "The configuration information to connect to Amazon S3 as your data source.",
      "properties" : {
        "BucketArn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^arn:aws(-cn|-us-gov|-eusc|-iso(-[b-f])?)?:s3:::[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$",
          "description" : "The ARN of the bucket that contains the data source."
        },
        "InclusionPrefixes" : {
          "type" : "array",
          "items" : {
            "type" : "string",
            "maxLength" : 300,
            "minLength" : 1,
            "description" : "Prefix for s3 object."
          },
          "maxItems" : 1,
          "minItems" : 1,
          "description" : "A list of S3 prefixes that define the object containing the data sources.",
          "insertionOrder" : false
        },
        "BucketOwnerAccountId" : {
          "type" : "string",
          "maxLength" : 12,
          "minLength" : 12,
          "pattern" : "^[0-9]{12}$",
          "description" : "The account ID for the owner of the S3 bucket."
        }
      },
      "required" : [ "BucketArn" ],
      "additionalProperties" : false
    },
    "ConfluenceDataSourceConfiguration" : {
      "type" : "object",
      "description" : "The configuration information to connect to Confluence as your data source.",
      "properties" : {
        "SourceConfiguration" : {
          "$ref" : "#/definitions/ConfluenceSourceConfiguration"
        },
        "CrawlerConfiguration" : {
          "$ref" : "#/definitions/ConfluenceCrawlerConfiguration"
        }
      },
      "required" : [ "SourceConfiguration" ],
      "additionalProperties" : false
    },
    "SalesforceDataSourceConfiguration" : {
      "type" : "object",
      "description" : "The configuration information to connect to Salesforce as your data source.",
      "properties" : {
        "SourceConfiguration" : {
          "$ref" : "#/definitions/SalesforceSourceConfiguration"
        },
        "CrawlerConfiguration" : {
          "$ref" : "#/definitions/SalesforceCrawlerConfiguration"
        }
      },
      "required" : [ "SourceConfiguration" ],
      "additionalProperties" : false
    },
    "SharePointDataSourceConfiguration" : {
      "type" : "object",
      "description" : "The configuration information to connect to SharePoint as your data source.",
      "properties" : {
        "SourceConfiguration" : {
          "$ref" : "#/definitions/SharePointSourceConfiguration"
        },
        "CrawlerConfiguration" : {
          "$ref" : "#/definitions/SharePointCrawlerConfiguration"
        }
      },
      "required" : [ "SourceConfiguration" ],
      "additionalProperties" : false
    },
    "WebDataSourceConfiguration" : {
      "type" : "object",
      "description" : "Configures a web data source location.",
      "properties" : {
        "SourceConfiguration" : {
          "$ref" : "#/definitions/WebSourceConfiguration"
        },
        "CrawlerConfiguration" : {
          "$ref" : "#/definitions/WebCrawlerConfiguration"
        }
      },
      "required" : [ "SourceConfiguration" ],
      "additionalProperties" : false
    },
    "S3Location" : {
      "type" : "object",
      "description" : "An Amazon S3 location.",
      "properties" : {
        "URI" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^s3://.{1,128}$",
          "description" : "The location's URI"
        }
      },
      "required" : [ "URI" ],
      "additionalProperties" : false
    },
    "SemanticChunkingConfiguration" : {
      "type" : "object",
      "description" : "Configurations for when you choose semantic chunking. If you set the chunkingStrategy as NONE, exclude this field.",
      "properties" : {
        "BreakpointPercentileThreshold" : {
          "type" : "integer",
          "minimum" : 50,
          "maximum" : 99,
          "description" : "The dissimilarity threshold for splitting chunks."
        },
        "BufferSize" : {
          "type" : "integer",
          "minimum" : 0,
          "maximum" : 1,
          "description" : "The buffer size."
        },
        "MaxTokens" : {
          "type" : "integer",
          "minimum" : 1,
          "description" : "The maximum number of tokens that a chunk can contain."
        }
      },
      "required" : [ "BreakpointPercentileThreshold", "BufferSize", "MaxTokens" ],
      "additionalProperties" : false
    },
    "ServerSideEncryptionConfiguration" : {
      "type" : "object",
      "description" : "Contains details about the server-side encryption for the data source.",
      "properties" : {
        "KmsKeyArn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^arn:aws(-cn|-us-gov|-eusc|-iso(-[b-f])?)?:kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}$",
          "description" : "The ARN of the AWS KMS key used to encrypt the resource."
        }
      },
      "additionalProperties" : false
    },
    "Transformation" : {
      "type" : "object",
      "description" : "A Lambda function that processes documents.",
      "properties" : {
        "StepToApply" : {
          "type" : "string",
          "description" : "When the service applies the transformation.",
          "enum" : [ "POST_CHUNKING" ]
        },
        "TransformationFunction" : {
          "$ref" : "#/definitions/TransformationFunction"
        }
      },
      "required" : [ "StepToApply", "TransformationFunction" ],
      "additionalProperties" : false
    },
    "TransformationFunction" : {
      "type" : "object",
      "description" : "A Lambda function that processes documents.",
      "properties" : {
        "TransformationLambdaConfiguration" : {
          "$ref" : "#/definitions/TransformationLambdaConfiguration"
        }
      },
      "required" : [ "TransformationLambdaConfiguration" ],
      "additionalProperties" : false
    },
    "TransformationLambdaConfiguration" : {
      "type" : "object",
      "description" : "A Lambda function that processes documents.",
      "properties" : {
        "LambdaArn" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 0,
          "pattern" : "^arn:(aws[a-zA-Z-]*)?:lambda:[a-z]{2}(-gov)?-[a-z]+-\\d{1}:\\d{12}:function:[a-zA-Z0-9-_\\.]+(:(\\$LATEST|[a-zA-Z0-9-_]+))?$",
          "description" : "The function's ARN identifier."
        }
      },
      "required" : [ "LambdaArn" ],
      "additionalProperties" : false
    },
    "VectorIngestionConfiguration" : {
      "type" : "object",
      "description" : "Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.",
      "properties" : {
        "ChunkingConfiguration" : {
          "$ref" : "#/definitions/ChunkingConfiguration"
        },
        "CustomTransformationConfiguration" : {
          "$ref" : "#/definitions/CustomTransformationConfiguration"
        },
        "ParsingConfiguration" : {
          "$ref" : "#/definitions/ParsingConfiguration"
        },
        "ContextEnrichmentConfiguration" : {
          "$ref" : "#/definitions/ContextEnrichmentConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "ConfluenceSourceConfiguration" : {
      "type" : "object",
      "description" : "The endpoint information to connect to your Confluence data source.",
      "properties" : {
        "HostUrl" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^https://[A-Za-z0-9][^\\s]*$",
          "description" : "The Confluence host URL or instance URL."
        },
        "HostType" : {
          "type" : "string",
          "description" : "The supported host type, whether online/cloud or server/on-premises.",
          "enum" : [ "SAAS" ]
        },
        "AuthType" : {
          "type" : "string",
          "description" : "The supported authentication type to authenticate and connect to your Confluence instance.",
          "enum" : [ "BASIC", "OAUTH2_CLIENT_CREDENTIALS" ]
        },
        "CredentialsSecretArn" : {
          "type" : "string",
          "description" : "The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration.",
          "pattern" : "^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$"
        }
      },
      "required" : [ "HostUrl", "HostType", "AuthType", "CredentialsSecretArn" ],
      "additionalProperties" : false
    },
    "ConfluenceCrawlerConfiguration" : {
      "type" : "object",
      "description" : "The configuration of the Confluence content. For example, configuring specific types of Confluence content.",
      "properties" : {
        "FilterConfiguration" : {
          "$ref" : "#/definitions/CrawlFilterConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "SalesforceSourceConfiguration" : {
      "type" : "object",
      "description" : "The endpoint information to connect to your Salesforce data source.",
      "properties" : {
        "HostUrl" : {
          "type" : "string",
          "maxLength" : 2048,
          "minLength" : 1,
          "pattern" : "^https://[A-Za-z0-9][^\\s]*$",
          "description" : "The Salesforce host URL or instance URL."
        },
        "AuthType" : {
          "type" : "string",
          "description" : "The supported authentication type to authenticate and connect to your Salesforce instance.",
          "enum" : [ "OAUTH2_CLIENT_CREDENTIALS" ]
        },
        "CredentialsSecretArn" : {
          "type" : "string",
          "description" : "The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration.",
          "pattern" : "^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$"
        }
      },
      "required" : [ "HostUrl", "AuthType", "CredentialsSecretArn" ],
      "additionalProperties" : false
    },
    "SalesforceCrawlerConfiguration" : {
      "type" : "object",
      "description" : "The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.",
      "properties" : {
        "FilterConfiguration" : {
          "$ref" : "#/definitions/CrawlFilterConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "SharePointSourceConfiguration" : {
      "type" : "object",
      "description" : "The endpoint information to connect to your SharePoint data source.",
      "properties" : {
        "SiteUrls" : {
          "type" : "array",
          "description" : "A list of one or more SharePoint site URLs.",
          "items" : {
            "type" : "string",
            "pattern" : "^https://[A-Za-z0-9][^\\s]*$",
            "description" : "A forced-HTTPS web url."
          },
          "maxItems" : 100,
          "minItems" : 1,
          "insertionOrder" : false
        },
        "HostType" : {
          "type" : "string",
          "description" : "The supported host type, whether online/cloud or server/on-premises.",
          "enum" : [ "ONLINE" ]
        },
        "AuthType" : {
          "type" : "string",
          "description" : "The supported authentication type to authenticate and connect to your SharePoint site/sites.",
          "enum" : [ "OAUTH2_CLIENT_CREDENTIALS", "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS" ]
        },
        "CredentialsSecretArn" : {
          "type" : "string",
          "description" : "The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your SharePoint site/sites. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see SharePoint connection configuration.",
          "pattern" : "^arn:aws(|-cn|-us-gov):secretsmanager:[a-z0-9-]{1,20}:([0-9]{12}|):secret:[a-zA-Z0-9!/_+=.@-]{1,512}$"
        },
        "TenantId" : {
          "type" : "string",
          "description" : "The identifier of your Microsoft 365 tenant.",
          "pattern" : "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
        },
        "Domain" : {
          "type" : "string",
          "description" : "The domain of your SharePoint instance or site URL/URLs.",
          "maxLength" : 50,
          "minLength" : 1
        }
      },
      "required" : [ "Domain", "SiteUrls", "HostType", "AuthType", "CredentialsSecretArn" ],
      "additionalProperties" : false
    },
    "SharePointCrawlerConfiguration" : {
      "type" : "object",
      "description" : "The configuration of the SharePoint content. For example, configuring specific types of SharePoint content.",
      "properties" : {
        "FilterConfiguration" : {
          "$ref" : "#/definitions/CrawlFilterConfiguration"
        }
      },
      "additionalProperties" : false
    },
    "WebSourceConfiguration" : {
      "type" : "object",
      "description" : "A web source configuration.",
      "properties" : {
        "UrlConfiguration" : {
          "$ref" : "#/definitions/UrlConfiguration"
        }
      },
      "required" : [ "UrlConfiguration" ],
      "additionalProperties" : false
    },
    "UrlConfiguration" : {
      "type" : "object",
      "description" : "A url configuration.",
      "properties" : {
        "SeedUrls" : {
          "$ref" : "#/definitions/SeedUrls"
        }
      },
      "required" : [ "SeedUrls" ],
      "additionalProperties" : false
    },
    "SeedUrl" : {
      "type" : "object",
      "description" : "A seed url object.",
      "properties" : {
        "Url" : {
          "type" : "string",
          "pattern" : "^https?://[A-Za-z0-9][^\\s]*$",
          "description" : "A web url."
        }
      },
      "required" : [ "Url" ],
      "additionalProperties" : false
    },
    "SeedUrls" : {
      "type" : "array",
      "description" : "A list of web urls.",
      "items" : {
        "$ref" : "#/definitions/SeedUrl"
      },
      "maxItems" : 100,
      "minItems" : 1,
      "insertionOrder" : false
    },
    "WebCrawlerConfiguration" : {
      "type" : "object",
      "description" : "Configuration for the web crawler.",
      "properties" : {
        "CrawlerLimits" : {
          "$ref" : "#/definitions/WebCrawlerLimits"
        },
        "InclusionFilters" : {
          "$ref" : "#/definitions/FilterList"
        },
        "ExclusionFilters" : {
          "$ref" : "#/definitions/FilterList"
        },
        "Scope" : {
          "$ref" : "#/definitions/WebScopeType"
        },
        "UserAgent" : {
          "type" : "string",
          "description" : "The suffix that will be included in the user agent header.",
          "maxLength" : 40,
          "minLength" : 15
        },
        "UserAgentHeader" : {
          "type" : "string",
          "description" : "The full user agent header, including UUID and suffix.",
          "maxLength" : 86,
          "minLength" : 61
        }
      },
      "additionalProperties" : false
    },
    "WebCrawlerLimits" : {
      "type" : "object",
      "description" : "Limit settings for the web crawler.",
      "properties" : {
        "RateLimit" : {
          "type" : "integer",
          "minimum" : 1,
          "maximum" : 300,
          "description" : "Rate of web URLs retrieved per minute."
        },
        "MaxPages" : {
          "type" : "integer",
          "minimum" : 1,
          "description" : "Maximum number of pages the crawler can crawl."
        }
      },
      "additionalProperties" : false
    },
    "WebScopeType" : {
      "type" : "string",
      "description" : "The scope that a web crawl job will be restricted to.",
      "enum" : [ "HOST_ONLY", "SUBDOMAINS" ]
    },
    "CrawlFilterConfiguration" : {
      "type" : "object",
      "description" : "The type of filtering that you want to apply to certain objects or content of the data source. For example, the PATTERN type is regular expression patterns you can apply to filter your content.",
      "properties" : {
        "Type" : {
          "type" : "string",
          "description" : "The crawl filter type.",
          "enum" : [ "PATTERN" ]
        },
        "PatternObjectFilter" : {
          "$ref" : "#/definitions/PatternObjectFilterConfiguration"
        }
      },
      "required" : [ "Type" ],
      "additionalProperties" : false
    },
    "PatternObjectFilterConfiguration" : {
      "type" : "object",
      "description" : "The configuration of specific filters applied to your data source content. You can filter out or include certain content.",
      "properties" : {
        "Filters" : {
          "$ref" : "#/definitions/PatternObjectFilterList"
        }
      },
      "required" : [ "Filters" ],
      "additionalProperties" : false
    },
    "PatternObjectFilterList" : {
      "type" : "array",
      "items" : {
        "$ref" : "#/definitions/PatternObjectFilter"
      },
      "maxItems" : 25,
      "minItems" : 1,
      "description" : "Contains information"
    },
    "PatternObjectFilter" : {
      "type" : "object",
      "description" : "The specific filters applied to your data source content. You can filter out or include certain content.",
      "properties" : {
        "ObjectType" : {
          "type" : "string",
          "maxLength" : 50,
          "minLength" : 1,
          "description" : "The supported object type or content type of the data source."
        },
        "InclusionFilters" : {
          "$ref" : "#/definitions/FilterList"
        },
        "ExclusionFilters" : {
          "$ref" : "#/definitions/FilterList"
        }
      },
      "required" : [ "ObjectType" ],
      "additionalProperties" : false
    },
    "FilterList" : {
      "type" : "array",
      "description" : "A set of regular expression filter patterns for a type of object.",
      "items" : {
        "type" : "string",
        "maxLength" : 1000,
        "description" : "A list of one or more inclusion/exclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn't crawled."
      },
      "maxItems" : 25,
      "minItems" : 1,
      "insertionOrder" : false
    }
  },
  "properties" : {
    "DataSourceConfiguration" : {
      "$ref" : "#/definitions/DataSourceConfiguration"
    },
    "DataSourceId" : {
      "type" : "string",
      "pattern" : "^[0-9a-zA-Z]{10}$",
      "description" : "Identifier for a resource."
    },
    "Description" : {
      "type" : "string",
      "maxLength" : 200,
      "minLength" : 1,
      "description" : "Description of the Resource."
    },
    "KnowledgeBaseId" : {
      "type" : "string",
      "pattern" : "^[0-9a-zA-Z]{10}$",
      "description" : "The unique identifier of the knowledge base to which to add the data source."
    },
    "DataSourceStatus" : {
      "$ref" : "#/definitions/DataSourceStatus"
    },
    "Name" : {
      "type" : "string",
      "pattern" : "^([0-9a-zA-Z][_-]?){1,100}$",
      "description" : "The name of the data source."
    },
    "ServerSideEncryptionConfiguration" : {
      "$ref" : "#/definitions/ServerSideEncryptionConfiguration"
    },
    "VectorIngestionConfiguration" : {
      "$ref" : "#/definitions/VectorIngestionConfiguration"
    },
    "DataDeletionPolicy" : {
      "$ref" : "#/definitions/DataDeletionPolicy"
    },
    "CreatedAt" : {
      "type" : "string",
      "description" : "The time at which the data source was created."
    },
    "UpdatedAt" : {
      "type" : "string",
      "description" : "The time at which the knowledge base was last updated."
    },
    "FailureReasons" : {
      "type" : "array",
      "items" : {
        "type" : "string",
        "maxLength" : 2048,
        "description" : "Failure Reason for Error."
      },
      "maxItems" : 2048,
      "description" : "The details of the failure reasons related to the data source.",
      "insertionOrder" : false
    }
  },
  "required" : [ "DataSourceConfiguration", "Name", "KnowledgeBaseId" ],
  "readOnlyProperties" : [ "/properties/DataSourceId", "/properties/DataSourceStatus", "/properties/CreatedAt", "/properties/UpdatedAt", "/properties/FailureReasons", "/properties/DataSourceConfiguration/WebConfiguration/CrawlerConfiguration/UserAgentHeader" ],
  "createOnlyProperties" : [ "/properties/KnowledgeBaseId", "/properties/VectorIngestionConfiguration/ChunkingConfiguration", "/properties/VectorIngestionConfiguration/ParsingConfiguration", "/properties/DataSourceConfiguration/Type" ],
  "primaryIdentifier" : [ "/properties/KnowledgeBaseId", "/properties/DataSourceId" ],
  "tagging" : {
    "taggable" : false,
    "cloudFormationSystemTags" : false
  },
  "handlers" : {
    "create" : {
      "permissions" : [ "bedrock:CreateDataSource", "bedrock:GetDataSource", "bedrock:GetKnowledgeBase", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "read" : {
      "permissions" : [ "bedrock:GetDataSource" ]
    },
    "update" : {
      "permissions" : [ "bedrock:GetDataSource", "bedrock:UpdateDataSource", "kms:GenerateDataKey", "kms:Decrypt" ]
    },
    "delete" : {
      "permissions" : [ "bedrock:GetDataSource", "bedrock:DeleteDataSource" ]
    },
    "list" : {
      "permissions" : [ "bedrock:ListDataSources" ],
      "handlerSchema" : {
        "properties" : {
          "KnowledgeBaseId" : {
            "$ref" : "resource-schema.json#/properties/KnowledgeBaseId"
          }
        },
        "required" : [ "KnowledgeBaseId" ]
      }
    }
  },
  "additionalProperties" : false
}