Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . kendra ]

create-data-source

Description

Creates a data source that you use to with an Amazon Kendra index.

You specify a name, connector type and description for your data source. You can choose between an S3 connector, a SharePoint Online connector, and a database connector.

You also specify configuration information such as document metadata (author, source URI, and so on) and user context information.

CreateDataSource is a synchronous operation. The operation returns 200 if the data source was successfully created. Otherwise, an exception is raised.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  create-data-source
--name <value>
--index-id <value>
--type <value>
--configuration <value>
[--description <value>]
[--schedule <value>]
--role-arn <value>
[--tags <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--name (string)

A unique name for the data source. A data source name can't be changed without deleting and recreating the data source.

--index-id (string)

The identifier of the index that should be associated with this data source.

--type (string)

The type of repository that contains the data source.

Possible values:

  • S3
  • SHAREPOINT
  • DATABASE
  • SALESFORCE
  • ONEDRIVE
  • SERVICENOW

--configuration (structure)

The connector configuration information that is required to access the repository.

JSON Syntax:

{
  "S3Configuration": {
    "BucketName": "string",
    "InclusionPrefixes": ["string", ...],
    "ExclusionPatterns": ["string", ...],
    "DocumentsMetadataConfiguration": {
      "S3Prefix": "string"
    },
    "AccessControlListConfiguration": {
      "KeyPath": "string"
    }
  },
  "SharePointConfiguration": {
    "SharePointVersion": "SHAREPOINT_ONLINE",
    "Urls": ["string", ...],
    "SecretArn": "string",
    "CrawlAttachments": true|false,
    "UseChangeLog": true|false,
    "InclusionPatterns": ["string", ...],
    "ExclusionPatterns": ["string", ...],
    "VpcConfiguration": {
      "SubnetIds": ["string", ...],
      "SecurityGroupIds": ["string", ...]
    },
    "FieldMappings": [
      {
        "DataSourceFieldName": "string",
        "DateFieldFormat": "string",
        "IndexFieldName": "string"
      }
      ...
    ],
    "DocumentTitleFieldName": "string"
  },
  "DatabaseConfiguration": {
    "DatabaseEngineType": "RDS_AURORA_MYSQL"|"RDS_AURORA_POSTGRESQL"|"RDS_MYSQL"|"RDS_POSTGRESQL",
    "ConnectionConfiguration": {
      "DatabaseHost": "string",
      "DatabasePort": integer,
      "DatabaseName": "string",
      "TableName": "string",
      "SecretArn": "string"
    },
    "VpcConfiguration": {
      "SubnetIds": ["string", ...],
      "SecurityGroupIds": ["string", ...]
    },
    "ColumnConfiguration": {
      "DocumentIdColumnName": "string",
      "DocumentDataColumnName": "string",
      "DocumentTitleColumnName": "string",
      "FieldMappings": [
        {
          "DataSourceFieldName": "string",
          "DateFieldFormat": "string",
          "IndexFieldName": "string"
        }
        ...
      ],
      "ChangeDetectingColumns": ["string", ...]
    },
    "AclConfiguration": {
      "AllowedGroupsColumnName": "string"
    }
  },
  "SalesforceConfiguration": {
    "ServerUrl": "string",
    "SecretArn": "string",
    "StandardObjectConfigurations": [
      {
        "Name": "ACCOUNT"|"CAMPAIGN"|"CASE"|"CONTACT"|"CONTRACT"|"DOCUMENT"|"GROUP"|"IDEA"|"LEAD"|"OPPORTUNITY"|"PARTNER"|"PRICEBOOK"|"PRODUCT"|"PROFILE"|"SOLUTION"|"TASK"|"USER",
        "DocumentDataFieldName": "string",
        "DocumentTitleFieldName": "string",
        "FieldMappings": [
          {
            "DataSourceFieldName": "string",
            "DateFieldFormat": "string",
            "IndexFieldName": "string"
          }
          ...
        ]
      }
      ...
    ],
    "KnowledgeArticleConfiguration": {
      "IncludedStates": ["DRAFT"|"PUBLISHED"|"ARCHIVED", ...],
      "StandardKnowledgeArticleTypeConfiguration": {
        "DocumentDataFieldName": "string",
        "DocumentTitleFieldName": "string",
        "FieldMappings": [
          {
            "DataSourceFieldName": "string",
            "DateFieldFormat": "string",
            "IndexFieldName": "string"
          }
          ...
        ]
      },
      "CustomKnowledgeArticleTypeConfigurations": [
        {
          "Name": "string",
          "DocumentDataFieldName": "string",
          "DocumentTitleFieldName": "string",
          "FieldMappings": [
            {
              "DataSourceFieldName": "string",
              "DateFieldFormat": "string",
              "IndexFieldName": "string"
            }
            ...
          ]
        }
        ...
      ]
    },
    "ChatterFeedConfiguration": {
      "DocumentDataFieldName": "string",
      "DocumentTitleFieldName": "string",
      "FieldMappings": [
        {
          "DataSourceFieldName": "string",
          "DateFieldFormat": "string",
          "IndexFieldName": "string"
        }
        ...
      ],
      "IncludeFilterTypes": ["ACTIVE_USER"|"STANDARD_USER", ...]
    },
    "CrawlAttachments": true|false,
    "StandardObjectAttachmentConfiguration": {
      "DocumentTitleFieldName": "string",
      "FieldMappings": [
        {
          "DataSourceFieldName": "string",
          "DateFieldFormat": "string",
          "IndexFieldName": "string"
        }
        ...
      ]
    },
    "IncludeAttachmentFilePatterns": ["string", ...],
    "ExcludeAttachmentFilePatterns": ["string", ...]
  },
  "OneDriveConfiguration": {
    "TenantDomain": "string",
    "SecretArn": "string",
    "OneDriveUsers": {
      "OneDriveUserList": ["string", ...],
      "OneDriveUserS3Path": {
        "Bucket": "string",
        "Key": "string"
      }
    },
    "InclusionPatterns": ["string", ...],
    "ExclusionPatterns": ["string", ...],
    "FieldMappings": [
      {
        "DataSourceFieldName": "string",
        "DateFieldFormat": "string",
        "IndexFieldName": "string"
      }
      ...
    ]
  },
  "ServiceNowConfiguration": {
    "HostUrl": "string",
    "SecretArn": "string",
    "ServiceNowBuildVersion": "LONDON"|"OTHERS",
    "KnowledgeArticleConfiguration": {
      "CrawlAttachments": true|false,
      "IncludeAttachmentFilePatterns": ["string", ...],
      "ExcludeAttachmentFilePatterns": ["string", ...],
      "DocumentDataFieldName": "string",
      "DocumentTitleFieldName": "string",
      "FieldMappings": [
        {
          "DataSourceFieldName": "string",
          "DateFieldFormat": "string",
          "IndexFieldName": "string"
        }
        ...
      ]
    },
    "ServiceCatalogConfiguration": {
      "CrawlAttachments": true|false,
      "IncludeAttachmentFilePatterns": ["string", ...],
      "ExcludeAttachmentFilePatterns": ["string", ...],
      "DocumentDataFieldName": "string",
      "DocumentTitleFieldName": "string",
      "FieldMappings": [
        {
          "DataSourceFieldName": "string",
          "DateFieldFormat": "string",
          "IndexFieldName": "string"
        }
        ...
      ]
    }
  }
}

--description (string)

A description for the data source.

--schedule (string)

Sets the frequency that Amazon Kendra will check the documents in your 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 operation to update the index.

--role-arn (string)

The Amazon Resource Name (ARN) of a role with permission to access the data source. For more information, see IAM Roles for Amazon Kendra .

--tags (list)

A list of key-value pairs that identify the data source. You can use the tags to identify and organize your resources and to control access to resources.

Shorthand Syntax:

Key=string,Value=string ...

JSON Syntax:

[
  {
    "Key": "string",
    "Value": "string"
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Output

Id -> (string)

A unique identifier for the data source.