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.
Topics
Google Calendar configuration
properties
The following table provides information about configuration properties required in the schema.
Configuration | Description | Type | Required |
---|---|---|---|
connectionConfiguration |
Configuration information for the data source. |
This property has the following sub-property:
|
Yes |
repositoryEndpointMetadata |
The endpoint information for the data source. This data source doesn't specify an
endpoint. You choose your authentication type: serviceAccount and
OAuth2 . The connection information is included in an AWS Secrets Manager secret that you provide the secretArn . |
This property has the following sub-property:
|
Yes |
authType |
Choose between serviceAccount and OAuth2 , based on your
use case. |
|
Yes |
repositoryConfigurations |
Configuration information for the content of the data source. For example, configuring specific types of content and field mappings. |
This property has the following sub-properties: |
Yes |
|
A list of objects that map the attributes or field names of your Google alendar to Amazon Q index field names. |
These properties have the following sub-properties.
|
No |
|
The field name of your Google Drive to Amazon Q index field names. |
|
Yes |
|
The field type of your Google Drive to Amazon Q index field names. |
The allowed values are |
Yes |
|
The data source field name of your Google Calendar to Amazon Q index field names. |
|
Yes |
|
The date format of your Google Calendar to Amazon Q index field names. |
Specify the date format in the form |
No |
additionalProperties |
Additional configuration options for your content in your data source |
This property has the following sub-properties.
|
Yes |
isCrawlAcl |
Specify true to crawl access control information by default from
documents. NoteAmazon Q Business crawls ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details. |
|
No |
fieldForUserId |
Specify field to use for UserId for ACL crawling. |
|
No |
inclusionUsersList exclusionUsersLists |
A list of email IDs to exclude specific users from your Google Calendardata source. Users whose email IDs match these will be excluded from the index, while users whose email IDs do not match will be included. If a file matches both an exclusion and an inclusion, the exclusion takes precedence, and the file will not be included in the index. |
|
No |
|
The type of source. We recommend GOOGLECALENDAR as your data source type. |
Valid values are GOOGLECALENDAR. |
No |
|
true to activate 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 ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details. |
|
Yes |
|
Specify whether Amazon Q should update your index by syncing all documents or only new, modified, and deleted documents. |
You can choose between the following options: Use |
Yes |
|
The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key-value pairs required to connect to your Google Drive. . |
The secret must contain a JSON structure with the following keys: If using Google Service Account authentication: |
No |
|
The version of this template that's currently supported. |
|
No |
Google Calendar JSON schema
The following is the Google Calendar 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": [
"OAuth2",
"serviceAccount"
]
}
},
"required": [
"authType"
]
}
},
"required": [
"repositoryEndpointMetadata"
]
},
"repositoryConfigurations": {
"type": "object",
"properties": {
"calendar": {
"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"
]
}
]
}
}
},
"event": {
"type": "object",
"properties": {
"fieldMappings": {
"type": "array",
"items": [
{
"type": "object",
"properties": {
"indexFieldName": {
"type": "string"
},
"indexFieldType": {
"type": "string",
"enum": [
"STRING",
"DATE",
"STRING_LIST"
]
},
"dataSourceFieldName": {
"type": "string"
},
"dateFieldFormat": {
"type": "string",
"pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'"
}
},
"required": [
"indexFieldName",
"indexFieldType",
"dataSourceFieldName"
]
}
]
}
}
}
}
},
"additionalProperties": {
"type": "object",
"properties": {
"fieldForUserId": {
"type": "string"
},
"isCrawlAcl": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"enum": [
"true",
"false"
]
}
]
},
"inclusionUsersList": {
"type": "array",
"items": {
"type": "string"
}
},
"exclusionUsersList": {
"type": "array",
"items": {
"type": "string"
}
},
"enableDeletionProtection": {
"type": "boolean",
"default": false
},
"deletionProtectionThreshold": {
"type": "string",
"default": "15"
}
}
},
"enableIdentityCrawler": {
"type": "boolean"
},
"syncMode": {
"type": "string",
"enum": [
"FULL_CRAWL",
"FORCED_FULL_CRAWL"
]
},
"secretArn": {
"type": "string",
"minLength": 20,
"maxLength": 2048
},
"type": {
"type": "string",
"pattern": "GOOGLECALENDAR"
},
"version": {
"type": "string",
"anyOf": [
{
"pattern": "1.0.0"
}
]
}
},
"required": [
"connectionConfiguration",
"repositoryConfigurations",
"syncMode",
"additionalProperties",
"secretArn",
"type"
]
}
Google Calendar JSON schema example
The following is the Google Calendar JSON schema example:
{
{
"connectionConfiguration": {
"repositoryEndpointMetadata": {
"authType": "serviceAccount"
}
},
"repositoryConfigurations": {
"calendar": {
"fieldMappings": [
{
"indexFieldName": "_category",
"indexFieldType": "STRING",
"dataSourceFieldName": "category"
},
{
"indexFieldName": "_source_uri",
"indexFieldType": "STRING",
"dataSourceFieldName": "sourceUrl"
}
]
},
"event": {
"fieldMappings": [
{
"indexFieldName": "_category",
"indexFieldType": "STRING",
"dataSourceFieldName": "category"
},
{
"indexFieldName": "gcal_location",
"indexFieldType": "STRING",
"dataSourceFieldName": "location"
},
{
"indexFieldName": "_created_at",
"indexFieldType": "DATE",
"dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'",
"dataSourceFieldName": "created"
},
{
"indexFieldName": "_last_updated_at",
"indexFieldType": "DATE",
"dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'",
"dataSourceFieldName": "updated"
},
{
"indexFieldName": "gcal_event_start_time",
"indexFieldType": "DATE",
"dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'",
"dataSourceFieldName": "eventStartTime"
},
{
"indexFieldName": "gcal_event_end_time",
"indexFieldType": "DATE",
"dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'",
"dataSourceFieldName": "eventEndTime"
},
{
"indexFieldName": "_source_uri",
"indexFieldType": "STRING",
"dataSourceFieldName": "htmlLink"
},
{
"indexFieldName": "gcal_organizer",
"indexFieldType": "STRING",
"dataSourceFieldName": "organizer"
},
{
"indexFieldName": "gcal_attendees",
"indexFieldType": "STRING",
"dataSourceFieldName": "attendees"
},
{
"indexFieldName": "gcal_recurrence",
"indexFieldType": "STRING",
"dataSourceFieldName": "recurrence"
}
]
}
},
"additionalProperties": {
"fieldForUserId": "email",
"isCrawlAcl": true,
"inclusionUsersList": [
"ABC"
],
"exclusionUsersList": [
"TEST"
],
"enableDeletionProtection": true,
"deletionProtectionThreshold": "2"
},
"type": "GOOGLECALENDAR",
"syncMode": "FORCED_FULL_CRAWL",
"enableIdentityCrawler": true,
"secretArn": "arn:aws::secretsmanager:us-west-2:123:secret:AmazonKendra-GoogleCalendar",
"version": "1.0.0"
}