GitHubConfiguration - Amazon Kendra API Reference

GitHubConfiguration

Provides the configuration information to connect to GitHub as your data source.

Note

Amazon Kendra now supports an upgraded GitHub connector.

You must now use the TemplateConfiguration object instead of the GitHubConfiguration object to configure your connector.

Connectors configured using the older console and API architecture will continue to function as configured. However, you won’t be able to edit or update them. If you want to edit or update your connector configuration, you must create a new connector.

We recommended migrating your connector workflow to the upgraded version. Support for connectors configured using the older architecture is scheduled to end by June 2024.

Contents

SecretArn

The Amazon Resource Name (ARN) of an AWS Secrets Manager secret that contains the key-value pairs required to connect to your GitHub. The secret must contain a JSON structure with the following keys:

  • personalToken—The access token created in GitHub. For more information on creating a token in GitHub, see Using a GitHub data source.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1284.

Pattern: arn:[a-z0-9-\.]{1,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[a-z0-9-\.]{0,63}:[^/].{0,1023}

Required: Yes

ExclusionFileNamePatterns

A list of regular expression patterns to exclude certain file names in your GitHub repository or repositories. File names that match the patterns are excluded from the index. File names that don't match the patterns are included in the index. If a file matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

ExclusionFileTypePatterns

A list of regular expression patterns to exclude certain file types in your GitHub repository or repositories. File types that match the patterns are excluded from the index. File types that don't match the patterns are included in the index. If a file matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the file isn't included in the index.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

ExclusionFolderNamePatterns

A list of regular expression patterns to exclude certain folder names in your GitHub repository or repositories. Folder names that match the patterns are excluded from the index. Folder names that don't match the patterns are included in the index. If a folder matches both an exclusion and inclusion pattern, the exclusion pattern takes precedence and the folder isn't included in the index.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

GitHubCommitConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub commits to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubDocumentCrawlProperties

Configuration information to include certain types of GitHub content. You can configure to index repository files only, or also include issues and pull requests, comments, and comment attachments.

Type: GitHubDocumentCrawlProperties object

Required: No

GitHubIssueAttachmentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issue attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubIssueCommentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issue comments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubIssueDocumentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub issues to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubPullRequestCommentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull request comments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubPullRequestDocumentAttachmentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull request attachments to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubPullRequestDocumentConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map attributes or field names of GitHub pull requests to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

GitHubRepositoryConfigurationFieldMappings

A list of DataSourceToIndexFieldMapping objects that map GitHub repository attributes or field names to Amazon Kendra index field names. To create custom fields, use the UpdateIndex API before you map to GitHub fields. For more information, see Mapping data source fields. The GitHub data source field names must exist in your GitHub custom metadata.

Type: Array of DataSourceToIndexFieldMapping objects

Array Members: Minimum number of 1 item. Maximum number of 100 items.

Required: No

InclusionFileNamePatterns

A list of regular expression patterns to include certain file names in your GitHub repository or repositories. File names that match the patterns are included in the index. File names 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.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

InclusionFileTypePatterns

A list of regular expression patterns to include certain file types in your GitHub repository or repositories. File types that match the patterns are included in the index. File types 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.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

InclusionFolderNamePatterns

A list of regular expression patterns to include certain folder names in your GitHub repository or repositories. Folder names that match the patterns are included in the index. Folder names that don't match the patterns are excluded from the index. If a folder matches both an inclusion and exclusion pattern, the exclusion pattern takes precedence and the folder isn't included in the index.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

OnPremiseConfiguration

Configuration information to connect to GitHub Enterprise Server (on premises).

Type: OnPremiseConfiguration object

Required: No

RepositoryFilter

A list of names of the specific repositories you want to index.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: ^[A-Za-z0-9_.-]+$

Required: No

SaaSConfiguration

Configuration information to connect to GitHub Enterprise Cloud (SaaS).

Type: SaaSConfiguration object

Required: No

Type

The type of GitHub service you want to connect to—GitHub Enterprise Cloud (SaaS) or GitHub Enterprise Server (on premises).

Type: String

Valid Values: SAAS | ON_PREMISE

Required: No

UseChangeLog

TRUE to use the GitHub change log to determine which documents require updating in the index. Depending on the GitHub change log's size, it may take longer for Amazon Kendra to use the change log than to scan all of your documents in GitHub.

Type: Boolean

Required: No

VpcConfiguration

Configuration information of an Amazon Virtual Private Cloud to connect to your GitHub. For more information, see Configuring a VPC.

Type: DataSourceVpcConfiguration object

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: