Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates a data source connector that you want to use with an Amazon Kendra index.
You specify a name, data source connector type and description for your data source. You also specify configuration information for the data source connector.
CreateDataSource
is a synchronous operation. The operation returns 200
if the data source was successfully created. Otherwise, an exception is
raised.
Amazon S3 and custom data sources are the only supported data sources in the Amazon Web Services GovCloud (US-West) region.
For an example of creating an index and data source using the Python SDK, see Getting started with Python SDK. For an example of creating an index and data source using the Java SDK, see Getting started with Java SDK.
Synopsis
- data CreateDataSource = CreateDataSource' {
- clientToken :: Maybe Text
- configuration :: Maybe DataSourceConfiguration
- customDocumentEnrichmentConfiguration :: Maybe CustomDocumentEnrichmentConfiguration
- description :: Maybe Text
- languageCode :: Maybe Text
- roleArn :: Maybe Text
- schedule :: Maybe Text
- tags :: Maybe [Tag]
- vpcConfiguration :: Maybe DataSourceVpcConfiguration
- name :: Text
- indexId :: Text
- type' :: DataSourceType
- newCreateDataSource :: Text -> Text -> DataSourceType -> CreateDataSource
- createDataSource_clientToken :: Lens' CreateDataSource (Maybe Text)
- createDataSource_configuration :: Lens' CreateDataSource (Maybe DataSourceConfiguration)
- createDataSource_customDocumentEnrichmentConfiguration :: Lens' CreateDataSource (Maybe CustomDocumentEnrichmentConfiguration)
- createDataSource_description :: Lens' CreateDataSource (Maybe Text)
- createDataSource_languageCode :: Lens' CreateDataSource (Maybe Text)
- createDataSource_roleArn :: Lens' CreateDataSource (Maybe Text)
- createDataSource_schedule :: Lens' CreateDataSource (Maybe Text)
- createDataSource_tags :: Lens' CreateDataSource (Maybe [Tag])
- createDataSource_vpcConfiguration :: Lens' CreateDataSource (Maybe DataSourceVpcConfiguration)
- createDataSource_name :: Lens' CreateDataSource Text
- createDataSource_indexId :: Lens' CreateDataSource Text
- createDataSource_type :: Lens' CreateDataSource DataSourceType
- data CreateDataSourceResponse = CreateDataSourceResponse' {
- httpStatus :: Int
- id :: Text
- newCreateDataSourceResponse :: Int -> Text -> CreateDataSourceResponse
- createDataSourceResponse_httpStatus :: Lens' CreateDataSourceResponse Int
- createDataSourceResponse_id :: Lens' CreateDataSourceResponse Text
Creating a Request
data CreateDataSource Source #
See: newCreateDataSource
smart constructor.
CreateDataSource' | |
|
Instances
:: Text | |
-> Text | |
-> DataSourceType | |
-> CreateDataSource |
Create a value of CreateDataSource
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:clientToken:CreateDataSource'
, createDataSource_clientToken
- A token that you provide to identify the request to create a data source
connector. Multiple calls to the CreateDataSource
API with the same
client token will create only one data source connector.
$sel:configuration:CreateDataSource'
, createDataSource_configuration
- Configuration information to connect to your data source repository.
You can't specify the Configuration
parameter when the Type
parameter is set to CUSTOM
. If you do, you receive a
ValidationException
exception.
The Configuration
parameter is required for all other data sources.
$sel:customDocumentEnrichmentConfiguration:CreateDataSource'
, createDataSource_customDocumentEnrichmentConfiguration
- Configuration information for altering document metadata and content
during the document ingestion process.
For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
$sel:description:CreateDataSource'
, createDataSource_description
- A description for the data source connector.
CreateDataSource
, createDataSource_languageCode
- The code for a language. This allows you to support a language for all
documents when creating the data source connector. English is supported
by default. For more information on supported languages, including their
codes, see
Adding documents in languages other than English.
CreateDataSource
, createDataSource_roleArn
- The Amazon Resource Name (ARN) of a role with permission to access the
data source and required resources. For more information, see
IAM roles for Amazon Kendra.
You can't specify the RoleArn
parameter when the Type
parameter is
set to CUSTOM
. If you do, you receive a ValidationException
exception.
The RoleArn
parameter is required for all other data sources.
$sel:schedule:CreateDataSource'
, createDataSource_schedule
- Sets the frequency for Amazon Kendra to check the documents in your data
source repository and update the index. If you don't set a schedule
Amazon Kendra will not periodically update the index. You can call the
StartDataSourceSyncJob
API to update the index.
You can't specify the Schedule
parameter when the Type
parameter is
set to CUSTOM
. If you do, you receive a ValidationException
exception.
$sel:tags:CreateDataSource'
, createDataSource_tags
- A list of key-value pairs that identify the data source connector. You
can use the tags to identify and organize your resources and to control
access to resources.
CreateDataSource
, createDataSource_vpcConfiguration
- Configuration information for an Amazon Virtual Private Cloud to connect
to your data source. For more information, see
Configuring a VPC.
CreateDataSource
, createDataSource_name
- A name for the data source connector.
$sel:indexId:CreateDataSource'
, createDataSource_indexId
- The identifier of the index you want to use with the data source
connector.
CreateDataSource
, createDataSource_type
- The type of data source repository. For example, SHAREPOINT
.
Request Lenses
createDataSource_clientToken :: Lens' CreateDataSource (Maybe Text) Source #
A token that you provide to identify the request to create a data source
connector. Multiple calls to the CreateDataSource
API with the same
client token will create only one data source connector.
createDataSource_configuration :: Lens' CreateDataSource (Maybe DataSourceConfiguration) Source #
Configuration information to connect to your data source repository.
You can't specify the Configuration
parameter when the Type
parameter is set to CUSTOM
. If you do, you receive a
ValidationException
exception.
The Configuration
parameter is required for all other data sources.
createDataSource_customDocumentEnrichmentConfiguration :: Lens' CreateDataSource (Maybe CustomDocumentEnrichmentConfiguration) Source #
Configuration information for altering document metadata and content during the document ingestion process.
For more information on how to create, modify and delete document metadata, or make other content alterations when you ingest documents into Amazon Kendra, see Customizing document metadata during the ingestion process.
createDataSource_description :: Lens' CreateDataSource (Maybe Text) Source #
A description for the data source connector.
createDataSource_languageCode :: Lens' CreateDataSource (Maybe Text) Source #
The code for a language. This allows you to support a language for all documents when creating the data source connector. English is supported by default. For more information on supported languages, including their codes, see Adding documents in languages other than English.
createDataSource_roleArn :: Lens' CreateDataSource (Maybe Text) Source #
The Amazon Resource Name (ARN) of a role with permission to access the data source and required resources. For more information, see IAM roles for Amazon Kendra.
You can't specify the RoleArn
parameter when the Type
parameter is
set to CUSTOM
. If you do, you receive a ValidationException
exception.
The RoleArn
parameter is required for all other data sources.
createDataSource_schedule :: Lens' CreateDataSource (Maybe Text) Source #
Sets the frequency for Amazon Kendra to check the documents in your data
source repository and update the index. If you don't set a schedule
Amazon Kendra will not periodically update the index. You can call the
StartDataSourceSyncJob
API to update the index.
You can't specify the Schedule
parameter when the Type
parameter is
set to CUSTOM
. If you do, you receive a ValidationException
exception.
createDataSource_tags :: Lens' CreateDataSource (Maybe [Tag]) Source #
A list of key-value pairs that identify the data source connector. You can use the tags to identify and organize your resources and to control access to resources.
createDataSource_vpcConfiguration :: Lens' CreateDataSource (Maybe DataSourceVpcConfiguration) Source #
Configuration information for an Amazon Virtual Private Cloud to connect to your data source. For more information, see Configuring a VPC.
createDataSource_name :: Lens' CreateDataSource Text Source #
A name for the data source connector.
createDataSource_indexId :: Lens' CreateDataSource Text Source #
The identifier of the index you want to use with the data source connector.
createDataSource_type :: Lens' CreateDataSource DataSourceType Source #
The type of data source repository. For example, SHAREPOINT
.
Destructuring the Response
data CreateDataSourceResponse Source #
See: newCreateDataSourceResponse
smart constructor.
CreateDataSourceResponse' | |
|
Instances
newCreateDataSourceResponse Source #
:: Int | |
-> Text | |
-> CreateDataSourceResponse |
Create a value of CreateDataSourceResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:httpStatus:CreateDataSourceResponse'
, createDataSourceResponse_httpStatus
- The response's http status code.
CreateDataSourceResponse
, createDataSourceResponse_id
- The identifier of the data source connector.
Response Lenses
createDataSourceResponse_httpStatus :: Lens' CreateDataSourceResponse Int Source #
The response's http status code.
createDataSourceResponse_id :: Lens' CreateDataSourceResponse Text Source #
The identifier of the data source connector.