選取您的 Cookie 偏好設定

我們使用提供自身網站和服務所需的基本 Cookie 和類似工具。我們使用效能 Cookie 收集匿名統計資料,以便了解客戶如何使用我們的網站並進行改進。基本 Cookie 無法停用,但可以按一下「自訂」或「拒絕」以拒絕效能 Cookie。

如果您同意,AWS 與經核准的第三方也會使用 Cookie 提供實用的網站功能、記住您的偏好設定,並顯示相關內容,包括相關廣告。若要接受或拒絕所有非必要 Cookie,請按一下「接受」或「拒絕」。若要進行更詳細的選擇,請按一下「自訂」。

Connecting Amazon Q Business to Google Calendar using APIs

焦點模式
Connecting Amazon Q Business to Google Calendar using APIs - Amazon Q Business
此頁面尚未翻譯為您的語言。 請求翻譯

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.

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.

object

This property has the following sub-property: repositoryEndpointMetadata.

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.

object

This property has the following sub-property: authType.

Yes
authType Choose between serviceAccount and OAuth2, based on your use case.

string

Yes
repositoryConfigurations Configuration information for the content of the data source. For example, configuring specific types of content and field mappings.

object

This property has the following sub-properties: file and comment.

Yes
  • 1) Calendar

  • 2) Event

A list of objects that map the attributes or field names of your Google alendar to Amazon Q index field names.

object

object

These properties have the following sub-properties.

  • indexFieldName

  • indexFieldType

  • dataSourceFieldName

  • dateFieldFormat

No

indexFieldName

The field name of your Google Drive to Amazon Q index field names.

string

Yes

indexFieldType

The field type of your Google Drive to Amazon Q index field names.

string

The allowed values are STRING, STRING_LIST, and DATE.

Yes

dataSourceFieldName

The data source field name of your Google Calendar to Amazon Q index field names.

string

Yes

dateFieldFormat

The date format of your Google Calendar to Amazon Q index field names.

string

Specify the date format in the form yyyy-MM-dd'T'HH:mm:ss'Z'

No
additionalProperties Additional configuration options for your content in your data source

object

This property has the following sub-properties.

  • isCrawlAcl

  • fielForUserId

  • InclusionUserList

  • exclusionUserList

  • enableDeletionProtection

  • DeletionProtectionThreshold

Yes
isCrawlAcl Specify true to crawl access control information by default from documents.
Note

Amazon Q Business crawls ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details.

boolean

No
fieldForUserId Specify field to use for UserId for ACL crawling.

string

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.

array

No
  • type

The type of source. We recommend GOOGLECALENDAR as your data source type.

string

Valid values are GOOGLECALENDAR.

No
  • enableIdentityCrawler

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.
Note

Amazon Q Business crawls ACL information to ensure responses are generated only from documents your end users have access to. See Authorization for more details.

boolean

Yes
  • syncMode

Specify whether Amazon Q should update your index by syncing all documents or only new, modified, and deleted documents.

string

You can choose between the following options: Use FORCED FULL CRAWL to freshly re-crawl all content and replace existing content each time your data source syncs with your indexUse.Use FULL CRAWL to incrementally crawl only new, modified, and deleted content each time your data source syncs with your index

Yes
  • SecretARN

The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key-value pairs required to connect to your Google Drive.

.

string

The secret must contain a JSON structure with the following keys:

If using Google Service Account authentication: {"clientEmail": "user account email","adminAccountEmail": "service account email","privateKey": "private key"}If using OAuth 2.0 authentication:{"clientID": "OAuth client ID","clientSecret": "client secret","refreshToken": "refresh token"}

No
  • version

The version of this template that's currently supported.

string

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" }

下一個主題:

ACL crawling

上一個主題:

Using the console
隱私權網站條款Cookie 偏好設定
© 2025, Amazon Web Services, Inc.或其附屬公司。保留所有權利。