选择您的 Cookie 首选项

我们使用必要 Cookie 和类似工具提供我们的网站和服务。我们使用性能 Cookie 收集匿名统计数据,以便我们可以了解客户如何使用我们的网站并进行改进。必要 Cookie 无法停用,但您可以单击“自定义”或“拒绝”来拒绝性能 Cookie。

如果您同意,AWS 和经批准的第三方还将使用 Cookie 提供有用的网站功能、记住您的首选项并显示相关内容,包括相关广告。要接受或拒绝所有非必要 Cookie,请单击“接受”或“拒绝”。要做出更详细的选择,请单击“自定义”。

Connecting Amazon Q Business to Confluence (Cloud) using APIs

聚焦模式
Connecting Amazon Q Business to Confluence (Cloud) 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.

Confluence configuration properties

The following provides information about important configuration properties required in the schema.

Configuration Description Type Required

connectionConfiguration

Configuration information for the endpoint for the data source.

object

This property has a sub-property called repositoryEndpointMetadata.

Yes

repositoryEndpointMetadata

This is the endpoint information for the data source. This is a sub-property for the connectionConfiguration.

object

This property has the following sub-properties.

  • hostUrl

  • type

  • authType

Yes

hostUrl

The URL for your Confluence instance. For example, https://example.confluence.com.

string

Specify the URL in the pattern https://*

Yes

type

The hosting method for your Confluence instance.

string

The allowed values are SAAS or ON_PREM.

Yes

authType

The authentication method for your Confluence instance.

string

The allowed values are Basic or OAuth2.

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.

  • space

  • page

  • blog

  • comment

  • attachment

Yes
  • space

  • page

  • blog

  • comment

  • attachment

A list of objects that map the attributes or field names of your Confluence spaces, pages, blogs, comments, and attachments to Amazon Q index field names.

object

These properties have the following sub-properties.

  • indexFieldName

  • indexFieldType

  • dataSourceFieldName

  • dateFieldFormat

No

indexFieldName

The field name of your Confluence spaces, pages, blogs, comments, or attachments.

string

Yes

indexFieldType

The field type of your Confluence spaces, pages, blogs, comments, or attachments.

string

The allowed values are STRING, STRING_LIST, and DATE.

Yes

dataSourceFieldName

The data source field name of your Confluence spaces, pages, blogs, comments, or attachments.

string

Yes

dateFieldFormat

The date format of your Confluence spaces, pages, blogs, comments, or attachments.

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

  • isRotateSecret

  • isCrawlPersonalSpace

  • isCrawlArchivedSpace

  • isCrawlArchivedPage

  • isCrawlPage

  • isCrawlBlog

  • isCrawlPageComment

  • isCrawlPageAttachment

  • isCrawlBlogComment

  • isCrawlBlogAttachment

  • fieldForUserId

  • maxFileSizeInMegaBytes

  • inclusionSpaceKeyFilter

  • exclusionSpaceKeyFilter

  • pageTitleRegEX

  • blogTitleRegEX

  • commentTitleRegEX

  • attachmentTitleRegEX

  • inclusionFileTypePatterns

  • exclusionFileTypePatterns

  • inclusionUrlPatterns

  • exclusionUrlPatterns

Yes

isCrawlAcl

Specify true to crawl access control information from documents.

boolean

No

isRotateSecret

Specify true if you want to automatically rotate the secret.

boolean

No

fieldForUserId

Specify field to use for UserId for ACL crawling.

string

No

proxyHost

The host where the web proxy is required. The host name should be without protocol (http:// or https://).

string

Yes

proxyPort

Port used by the host URL transport protocol. The port number should be a numeric value between 0 and 65535.

string

Yes

maxFileSizeInMegaBytes

Specify the maximum single file size limit in MBs that Amazon Q will crawl. Amazon Q will crawl only the files within the size limit you define. The default file size is 50MB. The maximum file size should be greater than 0MB and less than or equal to 50MB.

string

The allowed values are numbers between greater than 0 and less than or equal to 50.

No
  • inclusionSpaceKeyFilter

  • exclusionSpaceKeyFilter

  • pageTitleRegEX

  • blogTitleRegEX

  • commentTitleRegEX

  • attachmentTitleRegEX

  • inclusionFileTypePatterns

  • exclusionFileTypePatterns

  • inclusionUrlPatterns

  • exclusionUrlPatterns

A list of regular expression patterns to include and/or exclude certain files in your Confluence data source. Files that match the patterns are included in the index. Files that don't match the patterns are excluded from the index. If a file matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.

array (string)

No
  • isCrawlPersonalSpace

  • isCrawlArchivedSpace

  • isCrawlArchivedPage

  • isCrawlPage

  • isCrawlBlog

  • isCrawlPageComment

  • isCrawlPageAttachment

  • isCrawlBlogComment

  • isCrawlBlogAttachment

Specify true to index files in your Confluence personal spaces, pages, blogs, page comments, page attachments, blog comments, and blog attachments.

boolean

No

type

The type of data source. We recommend that you use CONFLUENCEV2 as your data source type.

string

Valid values are CONFLUENCEV2 and CONFLUENCE.

Yes

enableIdentityCrawler

Specify true to activate identity crawler. Identity crawler is activated by default. See Identity crawler for more information.

boolean

Yes

syncMode

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

string

Valid values are FORCED_FULL_CRAWL and FULL_CRAWL. 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 index

  • 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 a Secrets Manager secret that contains the key-value pairs required to connect to your Confluence instance.

string

The minimum length is 20 and the maximum length is 2,048 characters.

If you use basic authentication, the secret must contain a JSON structure with the following keys:
{ "username": "Confluence account user name", "password": "Confluence API token" }
If you use OAuth 2.0 authentication, the secret must contain a JSON structure with the following keys:
{ "confluenceAppKey": "app key for your Confluence account", "confluenceAppSecret": "app secret from your Confluence token", "confluenceAccessToken": "access token created in Confluence", "confluenceRefreshToken": "refresh token created in Confluence" }
Yes

version

The version of this template that's currently supported.

string

No

Confluence (Cloud) JSON schema

The following is the Confluence (Cloud) JSON schema:

{ "type": "object", "properties": { "type": { "type": "string", "enum": ["CONFLUENCEV2", "CONFLUENCE"] }, "syncMode": { "type": "string", "enum": ["FULL_CRAWL", "FORCED_FULL_CRAWL"] }, "secretArn": { "type": "string", "minLength": 20, "maxLength": 2048 }, "enableIdentityCrawler": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "connectionConfiguration": { "type": "object", "properties": { "repositoryEndpointMetadata": { "type": "object", "properties": { "hostUrl": { "type": "string", "pattern": "https:.*" }, "type": { "type": "string", "enum": ["SAAS"] }, "authType": { "type": "string", "enum": ["Basic", "OAuth2"] } }, "required": ["hostUrl", "type", "authType"] } }, "required": ["repositoryEndpointMetadata"] }, "repositoryConfigurations": { "type": "object", "properties": { "space": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": ["STRING", "STRING_LIST", "DATE"] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } }, "required": ["fieldMappings"] }, "page": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": ["STRING", "STRING_LIST", "DATE", "LONG"] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } }, "required": ["fieldMappings"] }, "blog": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": ["STRING", "STRING_LIST", "DATE", "LONG"] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } }, "required": ["fieldMappings"] }, "comment": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": ["STRING", "STRING_LIST", "DATE", "LONG"] }, "dataSourceFieldName": { "type": "string" }, "dateFieldFormat": { "type": "string", "pattern": "yyyy-MM-dd'T'HH:mm:ss'Z'" } }, "required": [ "indexFieldName", "indexFieldType", "dataSourceFieldName" ] } ] } }, "required": ["fieldMappings"] }, "attachment": { "type": "object", "properties": { "fieldMappings": { "type": "array", "items": [ { "type": "object", "properties": { "indexFieldName": { "type": "string" }, "indexFieldType": { "type": "string", "enum": ["STRING", "STRING_LIST", "DATE", "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": { "isCrawlAcl": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "fieldForUserId": { "type": "string" }, "inclusionSpaceKeyFilter": { "type": "array", "items": { "type": "string" } }, "exclusionSpaceKeyFilter": { "type": "array", "items": { "type": "string" } }, "pageTitleRegEX": { "type": "array", "items": { "type": "string" } }, "blogTitleRegEX": { "type": "array", "items": { "type": "string" } }, "commentTitleRegEX": { "type": "array", "items": { "type": "string" } }, "attachmentTitleRegEX": { "type": "array", "items": { "type": "string" } }, "isCrawlPersonalSpace": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlArchivedSpace": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlArchivedPage": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlPage": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlBlog": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlPageComment": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlPageAttachment": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlBlogComment": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "isCrawlBlogAttachment": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ] }, "maxFileSizeInMegaBytes": { "type": "string" }, "inclusionFileTypePatterns": { "type": "array", "items": { "type": "string" } }, "exclusionFileTypePatterns": { "type": "array", "items": { "type": "string" } }, "inclusionUrlPatterns": { "type": "array", "items": { "type": "string" } }, "exclusionUrlPatterns": { "type": "array", "items": { "type": "string" } }, "proxyHost": { "type": "string" }, "proxyPort": { "type": "string" }, "enableDeletionProtection": { "anyOf": [ { "type": "boolean" }, { "type": "string", "enum": ["true", "false"] } ], "default": false }, "deletionProtectionThreshold": { "type": "string", "default": "15" } }, "required": [] } }, "version": { "type": "string", "anyOf": [ { "pattern": "1.0.0" } ] }, "required": [ "type", "syncMode", "secretArn", "connectionConfiguration", "repositoryConfigurations", "additionalProperties" ] }

Confluence (Cloud) JSON schema example

The following is the Confluence (Cloud) JSON schema example:

{ "type": "CONFLUENCEV2", "syncMode": "FULL_CRAWL", "secretArn": "arn:aws:secretsmanager:us-west-2:123456789012:secret:my-confluence-secret", "enableIdentityCrawler": "true", "connectionConfiguration": { "repositoryEndpointMetadata": { "hostUrl": "https://mycompany.atlassian.net", "type": "SAAS", "authType": "OAuth2" } }, "repositoryConfigurations": { "space": { "fieldMappings": [ { "indexFieldName": "space_id", "indexFieldType": "STRING", "dataSourceFieldName": "id", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'" } ] }, "page": { "fieldMappings": [ { "indexFieldName": "page_id", "indexFieldType": "STRING", "dataSourceFieldName": "id", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'" } ] }, "blog": { "fieldMappings": [ { "indexFieldName": "blog_id", "indexFieldType": "STRING", "dataSourceFieldName": "id", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'" } ] }, "comment": { "fieldMappings": [ { "indexFieldName": "comment_id", "indexFieldType": "STRING", "dataSourceFieldName": "id", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'" } ] }, "attachment": { "fieldMappings": [ { "indexFieldName": "attachment_id", "indexFieldType": "STRING", "dataSourceFieldName": "id", "dateFieldFormat": "yyyy-MM-dd'T'HH:mm:ss'Z'" } ] } }, "additionalProperties": { "isCrawlAcl": "true", "fieldForUserId": "user_id", "inclusionSpaceKeyFilter": ["SPACE1", "SPACE2"], "exclusionSpaceKeyFilter": ["SPACE3"], "pageTitleRegEX": ["^.*$"], "blogTitleRegEX": ["^.*$"], "commentTitleRegEX": ["^.*$"], "attachmentTitleRegEX": ["^.*$"], "isCrawlPersonalSpace": "false", "isCrawlArchivedSpace": "false", "isCrawlArchivedPage": "true", "isCrawlPage": "true", "isCrawlBlog": "true", "isCrawlPageComment": "false", "isCrawlPageAttachment": "false", "isCrawlBlogComment": "true", "isCrawlBlogAttachment": "true", "maxFileSizeInMegaBytes": "50", "inclusionFileTypePatterns": ["*.pdf", "*.docx"], "exclusionFileTypePatterns": ["*.tmp"], "inclusionUrlPatterns": ["*"], "exclusionUrlPatterns": ["*.tmp"], "enableDeletionProtection": "false", "deletionProtectionThreshold": "15" } }
隐私网站条款Cookie 首选项
© 2025, Amazon Web Services, Inc. 或其附属公司。保留所有权利。