You use the CreateDataSource action to connect a data source to your Amazon Q application.
Then, you use the
configuration
parameter to provide a JSON blob that conforms the AWS-defined JSON schema.
For an example of the API request, see CreateDataSource in the Amazon Q API Reference.
JSON schema
The following is the Smartsheet JSON schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"connectionConfiguration": {
"type": "object",
"properties": {
"repositoryEndpointMetadata": {
"type": "object",
"properties": {
"authType": {
"type": "string",
"enum": [
"APIToken"
]
}
},
"required": [
"authType"
]
}
},
"required": [
"repositoryEndpointMetadata"
]
},
"repositoryConfigurations": {
"type": "object",
"properties": {
"sheet": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"sheetAttachment": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"sheetConversation": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"sheetConversationAttachment": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"rowAttachment": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"rowConversation": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
},
"rowConversationAttachment": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST",
"LONG"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
},
"required": [
"fieldMappings"
]
}
}
},
"additionalProperties": {
"type": "object",
"properties": {
"workspaceIds": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"sheetIds": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"folderIds": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"fieldForUserId": {
"type": "string"
},
"userType": {
"type": "string"
},
"isCrawlAcl": {
"type": "boolean"
},
"isCrawlSheets": {
"type": "boolean"
},
"isCrawlSheetAttachments": {
"type": "boolean"
},
"isCrawlSheetConversations": {
"type": "boolean"
},
"isCrawlSheetConversationAttachments": {
"type": "boolean"
},
"isCrawlRows": {
"type": "boolean"
},
"isCrawlRowAttachments": {
"type": "boolean"
},
"isCrawlRowConversations": {
"type": "boolean"
},
"isCrawlRowConversationAttachments": {
"type": "boolean"
},
"isCrawlRowProofs": {
"type": "boolean"
},
"isMetadataAppended": {
"type": "boolean"
},
"isConversationAppended": {
"type": "boolean"
},
"inclusionAttachmentTypePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"exclusionAttachmentTypePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"inclusionAttachmentNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"exclusionAttachmentNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"inclusionFolderNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"exclusionFolderNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"inclusionSheetNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"exclusionSheetNamePatterns": {
"type": "array",
"items": {
"type": "string"
}
},
"enableDeletionProtection": {
"type": "boolean",
"default": false
},
"deletionProtectionThreshold": {
"type": "string",
"default": "15"
}
},
"not": {
"properties": {
"workspaceIds": { "maxItems": 0 },
"sheetIds": { "maxItems": 0 },
"folderIds": { "maxItems": 0 }
}
}
},
"enableIdentityCrawler": {
"type": "boolean"
},
"syncMode": {
"type": "string",
"enum": [
"FULL_CRAWL",
"FORCED_FULL_CRAWL",
"CHANGE_LOG"
]
},
"secretArn": {
"type": "string",
"minLength": 20,
"maxLength": 2048
},
"type": {
"type": "string",
"pattern": "SMARTSHEET"
},
"version": {
"type": "string",
"anyOf": [
{
"pattern": "1.0.0"
}
]
}
},
"required": [
"connectionConfiguration",
"repositoryConfigurations",
"syncMode",
"additionalProperties",
"secretArn",
"type"
]
}
The following table provides information about important JSON keys to configure.
Configuration | Description | Type | Required |
---|---|---|---|
|
Configuration details for connecting to the data source. |
|
Yes |
|
Metadata for the repository endpoint. |
|
Yes |
|
The authentication type. |
The only allowed value is:
|
Yes |
|
Configuration information for the content of the data source. For example, configuring specific types of content and field mappings. |
|
Yes |
|
Configuration for Smartsheet sheets. |
|
No |
|
Field mappings for Smartsheet sheets. |
|
Yes (if sheet is present) |
|
Configuration for Smartsheet sheet attachments. |
|
No |
|
Configuration for Smartsheet sheet conversations. |
|
No |
|
Configuration for Smartsheet sheet conversation attachments. |
|
No |
|
Configuration for Smartsheet rows. |
|
No |
|
Configuration for row attachments. |
|
No |
|
Configuration for Smartsheet row conversations. |
|
No |
|
Configuration for Smartsheet row conversation attachments. |
|
No |
|
Configuration for Smartsheet proof attachments. |
|
No |
|
Configuration for Smartsheet proof conversations. |
|
No |
|
Configuration for Smartsheet proof conversation attachments. |
|
No |
|
Additional configuration options for your content in your data source. |
|
Yes |
|
List of Smartsheet workspace IDs to crawl. |
|
No |
|
List of Smartsheet sheet IDs to crawl. |
|
No |
|
List of Smartsheet folder IDs to crawl. |
|
No |
|
Field for user ID. |
|
No |
|
User type. |
|
Yes |
|
Whether to crawl ACL. |
|
No |
|
Whether to crawl Smartsheet sheets. |
|
No |
|
Whether to crawl Smartsheet sheet attachments. |
|
No |
|
Whether to crawl Smartsheet sheet conversations. |
|
No |
|
Whether to crawl Smartsheet sheet conversation attachments. |
|
No |
|
Whether to crawl Smartsheet rows. |
|
No |
|
Whether to crawl Smartsheet row attachments. |
|
No |
|
Whether to crawl Smartsheet row conversations. |
|
No |
|
Whether to crawl Smartsheet row conversation attachments. |
|
No |
|
Whether to crawl Smartsheet row proofs. |
|
No |
|
Whether to append Smartsheet metadata. |
|
No |
|
Whether to append Smartsheet conversations. |
|
No |
|
Patterns for including Smartsheet attachment types. |
|
No |
|
Patterns for excluding Smartsheet attachment types. |
|
No |
|
Patterns for including Smartsheet attachment names. |
|
No |
|
Patterns for excluding Smartsheet attachment names. |
|
No |
|
Patterns for including Smartsheet folder names. |
|
No |
|
Patterns for excluding Smartsheet folder names. |
|
No |
|
Patterns for including Smartsheet sheet names. |
|
No |
|
Patterns for excluding Smartsheet sheet names. |
|
No |
|
Whether to enable deletion protection. To learn more, see Document deletion safeguard. |
|
No |
|
Threshold for deletion protection. To learn more, see Document deletion safeguard |
|
No |
|
Whether to enable the identity crawler. Identity crawler is activated by default.
Crawling identity information on users and groups with access to certain documents is
useful for user context filtering. Search results are filtered based on the user or
their group access to documents. NoteAmazon Q Business crawls identity information from your data source by default to ensure responses are generated only from documents end users have access to. For more information, see Identity crawler. |
|
No |
|
Specify whether Amazon Q should update your index by syncing all documents or only new, modified, and deleted documents. |
The allowed values are:
|
Yes |
|
The ARN of the secret containing the Smartsheet credentials required to connect Amazon Q Business to Smartsheet. |
The minimum length is 20 and the maximum length is 2,048 characters. |
Yes |
|
The type of the data source. |
The only allowed value is:
|
Yes |
|
The version of the template that's currently supported. |
Must match the pattern "1.0.0". |
No |