cdk-stepfunctions-patterns
Version:
A set of Step Functions high-level patterns.
1,118 lines (1,117 loc) • 89.9 kB
TypeScript
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config-base';
interface Blob {}
declare class Kendra extends Service {
/**
* Constructs a service object. This object has one method for each API operation.
*/
constructor(options?: Kendra.Types.ClientConfiguration)
config: Config & Kendra.Types.ClientConfiguration;
/**
* Removes one or more documents from an index. The documents must have been added with the BatchPutDocument operation. The documents are deleted asynchronously. You can see the progress of the deletion by using AWS CloudWatch. Any error messages releated to the processing of the batch are sent to you CloudWatch log.
*/
batchDeleteDocument(params: Kendra.Types.BatchDeleteDocumentRequest, callback?: (err: AWSError, data: Kendra.Types.BatchDeleteDocumentResponse) => void): Request<Kendra.Types.BatchDeleteDocumentResponse, AWSError>;
/**
* Removes one or more documents from an index. The documents must have been added with the BatchPutDocument operation. The documents are deleted asynchronously. You can see the progress of the deletion by using AWS CloudWatch. Any error messages releated to the processing of the batch are sent to you CloudWatch log.
*/
batchDeleteDocument(callback?: (err: AWSError, data: Kendra.Types.BatchDeleteDocumentResponse) => void): Request<Kendra.Types.BatchDeleteDocumentResponse, AWSError>;
/**
* Adds one or more documents to an index. The BatchPutDocument operation enables you to ingest inline documents or a set of documents stored in an Amazon S3 bucket. Use this operation to ingest your text and unstructured text into an index, add custom attributes to the documents, and to attach an access control list to the documents added to the index. The documents are indexed asynchronously. You can see the progress of the batch using AWS CloudWatch. Any error messages related to processing the batch are sent to your AWS CloudWatch log.
*/
batchPutDocument(params: Kendra.Types.BatchPutDocumentRequest, callback?: (err: AWSError, data: Kendra.Types.BatchPutDocumentResponse) => void): Request<Kendra.Types.BatchPutDocumentResponse, AWSError>;
/**
* Adds one or more documents to an index. The BatchPutDocument operation enables you to ingest inline documents or a set of documents stored in an Amazon S3 bucket. Use this operation to ingest your text and unstructured text into an index, add custom attributes to the documents, and to attach an access control list to the documents added to the index. The documents are indexed asynchronously. You can see the progress of the batch using AWS CloudWatch. Any error messages related to processing the batch are sent to your AWS CloudWatch log.
*/
batchPutDocument(callback?: (err: AWSError, data: Kendra.Types.BatchPutDocumentResponse) => void): Request<Kendra.Types.BatchPutDocumentResponse, AWSError>;
/**
* 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.
*/
createDataSource(params: Kendra.Types.CreateDataSourceRequest, callback?: (err: AWSError, data: Kendra.Types.CreateDataSourceResponse) => void): Request<Kendra.Types.CreateDataSourceResponse, AWSError>;
/**
* 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.
*/
createDataSource(callback?: (err: AWSError, data: Kendra.Types.CreateDataSourceResponse) => void): Request<Kendra.Types.CreateDataSourceResponse, AWSError>;
/**
* Creates an new set of frequently asked question (FAQ) questions and answers.
*/
createFaq(params: Kendra.Types.CreateFaqRequest, callback?: (err: AWSError, data: Kendra.Types.CreateFaqResponse) => void): Request<Kendra.Types.CreateFaqResponse, AWSError>;
/**
* Creates an new set of frequently asked question (FAQ) questions and answers.
*/
createFaq(callback?: (err: AWSError, data: Kendra.Types.CreateFaqResponse) => void): Request<Kendra.Types.CreateFaqResponse, AWSError>;
/**
* Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the Status field returned from a call to . The Status field is set to ACTIVE when the index is ready to use. Once the index is active you can index your documents using the operation or using one of the supported data sources.
*/
createIndex(params: Kendra.Types.CreateIndexRequest, callback?: (err: AWSError, data: Kendra.Types.CreateIndexResponse) => void): Request<Kendra.Types.CreateIndexResponse, AWSError>;
/**
* Creates a new Amazon Kendra index. Index creation is an asynchronous operation. To determine if index creation has completed, check the Status field returned from a call to . The Status field is set to ACTIVE when the index is ready to use. Once the index is active you can index your documents using the operation or using one of the supported data sources.
*/
createIndex(callback?: (err: AWSError, data: Kendra.Types.CreateIndexResponse) => void): Request<Kendra.Types.CreateIndexResponse, AWSError>;
/**
* Deletes an Amazon Kendra data source. An exception is not thrown if the data source is already being deleted. While the data source is being deleted, the Status field returned by a call to the operation is set to DELETING. For more information, see Deleting Data Sources.
*/
deleteDataSource(params: Kendra.Types.DeleteDataSourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Deletes an Amazon Kendra data source. An exception is not thrown if the data source is already being deleted. While the data source is being deleted, the Status field returned by a call to the operation is set to DELETING. For more information, see Deleting Data Sources.
*/
deleteDataSource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Removes an FAQ from an index.
*/
deleteFaq(params: Kendra.Types.DeleteFaqRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Removes an FAQ from an index.
*/
deleteFaq(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Deletes an existing Amazon Kendra index. An exception is not thrown if the index is already being deleted. While the index is being deleted, the Status field returned by a call to the DescribeIndex operation is set to DELETING.
*/
deleteIndex(params: Kendra.Types.DeleteIndexRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Deletes an existing Amazon Kendra index. An exception is not thrown if the index is already being deleted. While the index is being deleted, the Status field returned by a call to the DescribeIndex operation is set to DELETING.
*/
deleteIndex(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Gets information about a Amazon Kendra data source.
*/
describeDataSource(params: Kendra.Types.DescribeDataSourceRequest, callback?: (err: AWSError, data: Kendra.Types.DescribeDataSourceResponse) => void): Request<Kendra.Types.DescribeDataSourceResponse, AWSError>;
/**
* Gets information about a Amazon Kendra data source.
*/
describeDataSource(callback?: (err: AWSError, data: Kendra.Types.DescribeDataSourceResponse) => void): Request<Kendra.Types.DescribeDataSourceResponse, AWSError>;
/**
* Gets information about an FAQ list.
*/
describeFaq(params: Kendra.Types.DescribeFaqRequest, callback?: (err: AWSError, data: Kendra.Types.DescribeFaqResponse) => void): Request<Kendra.Types.DescribeFaqResponse, AWSError>;
/**
* Gets information about an FAQ list.
*/
describeFaq(callback?: (err: AWSError, data: Kendra.Types.DescribeFaqResponse) => void): Request<Kendra.Types.DescribeFaqResponse, AWSError>;
/**
* Describes an existing Amazon Kendra index
*/
describeIndex(params: Kendra.Types.DescribeIndexRequest, callback?: (err: AWSError, data: Kendra.Types.DescribeIndexResponse) => void): Request<Kendra.Types.DescribeIndexResponse, AWSError>;
/**
* Describes an existing Amazon Kendra index
*/
describeIndex(callback?: (err: AWSError, data: Kendra.Types.DescribeIndexResponse) => void): Request<Kendra.Types.DescribeIndexResponse, AWSError>;
/**
* Gets statistics about synchronizing Amazon Kendra with a data source.
*/
listDataSourceSyncJobs(params: Kendra.Types.ListDataSourceSyncJobsRequest, callback?: (err: AWSError, data: Kendra.Types.ListDataSourceSyncJobsResponse) => void): Request<Kendra.Types.ListDataSourceSyncJobsResponse, AWSError>;
/**
* Gets statistics about synchronizing Amazon Kendra with a data source.
*/
listDataSourceSyncJobs(callback?: (err: AWSError, data: Kendra.Types.ListDataSourceSyncJobsResponse) => void): Request<Kendra.Types.ListDataSourceSyncJobsResponse, AWSError>;
/**
* Lists the data sources that you have created.
*/
listDataSources(params: Kendra.Types.ListDataSourcesRequest, callback?: (err: AWSError, data: Kendra.Types.ListDataSourcesResponse) => void): Request<Kendra.Types.ListDataSourcesResponse, AWSError>;
/**
* Lists the data sources that you have created.
*/
listDataSources(callback?: (err: AWSError, data: Kendra.Types.ListDataSourcesResponse) => void): Request<Kendra.Types.ListDataSourcesResponse, AWSError>;
/**
* Gets a list of FAQ lists associated with an index.
*/
listFaqs(params: Kendra.Types.ListFaqsRequest, callback?: (err: AWSError, data: Kendra.Types.ListFaqsResponse) => void): Request<Kendra.Types.ListFaqsResponse, AWSError>;
/**
* Gets a list of FAQ lists associated with an index.
*/
listFaqs(callback?: (err: AWSError, data: Kendra.Types.ListFaqsResponse) => void): Request<Kendra.Types.ListFaqsResponse, AWSError>;
/**
* Lists the Amazon Kendra indexes that you have created.
*/
listIndices(params: Kendra.Types.ListIndicesRequest, callback?: (err: AWSError, data: Kendra.Types.ListIndicesResponse) => void): Request<Kendra.Types.ListIndicesResponse, AWSError>;
/**
* Lists the Amazon Kendra indexes that you have created.
*/
listIndices(callback?: (err: AWSError, data: Kendra.Types.ListIndicesResponse) => void): Request<Kendra.Types.ListIndicesResponse, AWSError>;
/**
* Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags associated with them.
*/
listTagsForResource(params: Kendra.Types.ListTagsForResourceRequest, callback?: (err: AWSError, data: Kendra.Types.ListTagsForResourceResponse) => void): Request<Kendra.Types.ListTagsForResourceResponse, AWSError>;
/**
* Gets a list of tags associated with a specified resource. Indexes, FAQs, and data sources can have tags associated with them.
*/
listTagsForResource(callback?: (err: AWSError, data: Kendra.Types.ListTagsForResourceResponse) => void): Request<Kendra.Types.ListTagsForResourceResponse, AWSError>;
/**
* Searches an active index. Use this API to search your documents using query. The Query operation enables to do faceted search and to filter results based on document attributes. It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results. Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results. Relevant passages Matching FAQs Relevant documents You can specify that the query return only one type of result using the QueryResultTypeConfig parameter.
*/
query(params: Kendra.Types.QueryRequest, callback?: (err: AWSError, data: Kendra.Types.QueryResult) => void): Request<Kendra.Types.QueryResult, AWSError>;
/**
* Searches an active index. Use this API to search your documents using query. The Query operation enables to do faceted search and to filter results based on document attributes. It also enables you to provide user context that Amazon Kendra uses to enforce document access control in the search results. Amazon Kendra searches your index for text content and question and answer (FAQ) content. By default the response contains three types of results. Relevant passages Matching FAQs Relevant documents You can specify that the query return only one type of result using the QueryResultTypeConfig parameter.
*/
query(callback?: (err: AWSError, data: Kendra.Types.QueryResult) => void): Request<Kendra.Types.QueryResult, AWSError>;
/**
* Starts a synchronization job for a data source. If a synchronization job is already in progress, Amazon Kendra returns a ResourceInUseException exception.
*/
startDataSourceSyncJob(params: Kendra.Types.StartDataSourceSyncJobRequest, callback?: (err: AWSError, data: Kendra.Types.StartDataSourceSyncJobResponse) => void): Request<Kendra.Types.StartDataSourceSyncJobResponse, AWSError>;
/**
* Starts a synchronization job for a data source. If a synchronization job is already in progress, Amazon Kendra returns a ResourceInUseException exception.
*/
startDataSourceSyncJob(callback?: (err: AWSError, data: Kendra.Types.StartDataSourceSyncJobResponse) => void): Request<Kendra.Types.StartDataSourceSyncJobResponse, AWSError>;
/**
* Stops a running synchronization job. You can't stop a scheduled synchronization job.
*/
stopDataSourceSyncJob(params: Kendra.Types.StopDataSourceSyncJobRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Stops a running synchronization job. You can't stop a scheduled synchronization job.
*/
stopDataSourceSyncJob(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Enables you to provide feedback to Amazon Kendra to improve the performance of the service.
*/
submitFeedback(params: Kendra.Types.SubmitFeedbackRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Enables you to provide feedback to Amazon Kendra to improve the performance of the service.
*/
submitFeedback(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Adds the specified tag to the specified index, FAQ, or data source resource. If the tag already exists, the existing value is replaced with the new value.
*/
tagResource(params: Kendra.Types.TagResourceRequest, callback?: (err: AWSError, data: Kendra.Types.TagResourceResponse) => void): Request<Kendra.Types.TagResourceResponse, AWSError>;
/**
* Adds the specified tag to the specified index, FAQ, or data source resource. If the tag already exists, the existing value is replaced with the new value.
*/
tagResource(callback?: (err: AWSError, data: Kendra.Types.TagResourceResponse) => void): Request<Kendra.Types.TagResourceResponse, AWSError>;
/**
* Removes a tag from an index, FAQ, or a data source.
*/
untagResource(params: Kendra.Types.UntagResourceRequest, callback?: (err: AWSError, data: Kendra.Types.UntagResourceResponse) => void): Request<Kendra.Types.UntagResourceResponse, AWSError>;
/**
* Removes a tag from an index, FAQ, or a data source.
*/
untagResource(callback?: (err: AWSError, data: Kendra.Types.UntagResourceResponse) => void): Request<Kendra.Types.UntagResourceResponse, AWSError>;
/**
* Updates an existing Amazon Kendra data source.
*/
updateDataSource(params: Kendra.Types.UpdateDataSourceRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Updates an existing Amazon Kendra data source.
*/
updateDataSource(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Updates an existing Amazon Kendra index.
*/
updateIndex(params: Kendra.Types.UpdateIndexRequest, callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
/**
* Updates an existing Amazon Kendra index.
*/
updateIndex(callback?: (err: AWSError, data: {}) => void): Request<{}, AWSError>;
}
declare namespace Kendra {
export interface AccessControlListConfiguration {
/**
* Path to the AWS S3 bucket that contains the ACL files.
*/
KeyPath?: S3ObjectKey;
}
export interface AclConfiguration {
/**
* A list of groups, separated by semi-colons, that filters a query response based on user context. The document is only returned to users that are in one of the groups specified in the UserContext field of the Query operation.
*/
AllowedGroupsColumnName: ColumnName;
}
export interface AdditionalResultAttribute {
/**
* The key that identifies the attribute.
*/
Key: String;
/**
* The data type of the Value property.
*/
ValueType: AdditionalResultAttributeValueType;
/**
* An object that contains the attribute value.
*/
Value: AdditionalResultAttributeValue;
}
export type AdditionalResultAttributeList = AdditionalResultAttribute[];
export interface AdditionalResultAttributeValue {
/**
* The text associated with the attribute and information about the highlight to apply to the text.
*/
TextWithHighlightsValue?: TextWithHighlights;
}
export type AdditionalResultAttributeValueType = "TEXT_WITH_HIGHLIGHTS_VALUE"|string;
export type AmazonResourceName = string;
export interface AttributeFilter {
/**
* Performs a logical AND operation on all supplied filters.
*/
AndAllFilters?: AttributeFilterList;
/**
* Performs a logical OR operation on all supplied filters.
*/
OrAllFilters?: AttributeFilterList;
/**
* Performs a logical NOT operation on all supplied filters.
*/
NotFilter?: AttributeFilter;
/**
* Performs an equals operation on two document attributes.
*/
EqualsTo?: DocumentAttribute;
/**
* Returns true when a document contains all of the specified document attributes. This filter is only appicable to StringListValue metadata.
*/
ContainsAll?: DocumentAttribute;
/**
* Returns true when a document contains any of the specified document attributes.This filter is only appicable to StringListValue metadata.
*/
ContainsAny?: DocumentAttribute;
/**
* Performs a greater than operation on two document attributes. Use with a document attribute of type Integer or Long.
*/
GreaterThan?: DocumentAttribute;
/**
* Performs a greater or equals than operation on two document attributes. Use with a document attribute of type Integer or Long.
*/
GreaterThanOrEquals?: DocumentAttribute;
/**
* Performs a less than operation on two document attributes. Use with a document attribute of type Integer or Long.
*/
LessThan?: DocumentAttribute;
/**
* Performs a less than or equals operation on two document attributes. Use with a document attribute of type Integer or Long.
*/
LessThanOrEquals?: DocumentAttribute;
}
export type AttributeFilterList = AttributeFilter[];
export interface BatchDeleteDocumentRequest {
/**
* The identifier of the index that contains the documents to delete.
*/
IndexId: IndexId;
/**
* One or more identifiers for documents to delete from the index.
*/
DocumentIdList: DocumentIdList;
DataSourceSyncJobMetricTarget?: DataSourceSyncJobMetricTarget;
}
export interface BatchDeleteDocumentResponse {
/**
* A list of documents that could not be removed from the index. Each entry contains an error message that indicates why the document couldn't be removed from the index.
*/
FailedDocuments?: BatchDeleteDocumentResponseFailedDocuments;
}
export interface BatchDeleteDocumentResponseFailedDocument {
/**
* The identifier of the document that couldn't be removed from the index.
*/
Id?: DocumentId;
/**
* The error code for why the document couldn't be removed from the index.
*/
ErrorCode?: ErrorCode;
/**
* An explanation for why the document couldn't be removed from the index.
*/
ErrorMessage?: ErrorMessage;
}
export type BatchDeleteDocumentResponseFailedDocuments = BatchDeleteDocumentResponseFailedDocument[];
export interface BatchPutDocumentRequest {
/**
* The identifier of the index to add the documents to. You need to create the index first using the CreateIndex operation.
*/
IndexId: IndexId;
/**
* The Amazon Resource Name (ARN) of a role that is allowed to run the BatchPutDocument operation. For more information, see IAM Roles for Amazon Kendra.
*/
RoleArn?: RoleArn;
/**
* One or more documents to add to the index. Documents have the following file size limits. 5 MB total size for inline documents 50 MB total size for files from an S3 bucket 5 MB extracted text for any file For more information about file size and transaction per second quotas, see Quotas.
*/
Documents: DocumentList;
}
export interface BatchPutDocumentResponse {
/**
* A list of documents that were not added to the index because the document failed a validation check. Each document contains an error message that indicates why the document couldn't be added to the index. If there was an error adding a document to an index the error is reported in your AWS CloudWatch log. For more information, see Monitoring Amazon Kendra with Amazon CloudWatch Logs
*/
FailedDocuments?: BatchPutDocumentResponseFailedDocuments;
}
export interface BatchPutDocumentResponseFailedDocument {
/**
* The unique identifier of the document.
*/
Id?: DocumentId;
/**
* The type of error that caused the document to fail to be indexed.
*/
ErrorCode?: ErrorCode;
/**
* A description of the reason why the document could not be indexed.
*/
ErrorMessage?: ErrorMessage;
}
export type BatchPutDocumentResponseFailedDocuments = BatchPutDocumentResponseFailedDocument[];
export type _Blob = Buffer|Uint8Array|Blob|string;
export type Boolean = boolean;
export interface CapacityUnitsConfiguration {
/**
* The amount of extra storage capacity for an index. Each capacity unit provides 150 Gb of storage space or 500,000 documents, whichever is reached first.
*/
StorageCapacityUnits: StorageCapacityUnit;
/**
* The amount of extra query capacity for an index. Each capacity unit provides 0.5 queries per second and 40,000 queries per day.
*/
QueryCapacityUnits: QueryCapacityUnit;
}
export type ChangeDetectingColumns = ColumnName[];
export interface ClickFeedback {
/**
* The unique identifier of the search result that was clicked.
*/
ResultId: ResultId;
/**
* The Unix timestamp of the date and time that the result was clicked.
*/
ClickTime: Timestamp;
}
export type ClickFeedbackList = ClickFeedback[];
export type ClientTokenName = string;
export interface ColumnConfiguration {
/**
* The column that provides the document's unique identifier.
*/
DocumentIdColumnName: ColumnName;
/**
* The column that contains the contents of the document.
*/
DocumentDataColumnName: ColumnName;
/**
* The column that contains the title of the document.
*/
DocumentTitleColumnName?: ColumnName;
/**
* An array of objects that map database column names to the corresponding fields in an index. You must first create the fields in the index using the UpdateIndex operation.
*/
FieldMappings?: DataSourceToIndexFieldMappingList;
/**
* One to five columns that indicate when a document in the database has changed.
*/
ChangeDetectingColumns: ChangeDetectingColumns;
}
export type ColumnName = string;
export interface ConnectionConfiguration {
/**
* The name of the host for the database. Can be either a string (host.subdomain.domain.tld) or an IPv4 or IPv6 address.
*/
DatabaseHost: DatabaseHost;
/**
* The port that the database uses for connections.
*/
DatabasePort: DatabasePort;
/**
* The name of the database containing the document data.
*/
DatabaseName: DatabaseName;
/**
* The name of the table that contains the document data.
*/
TableName: TableName;
/**
* The Amazon Resource Name (ARN) of credentials stored in AWS Secrets Manager. The credentials should be a user/password pair. For more information, see Using a Database Data Source. For more information about AWS Secrets Manager, see What Is AWS Secrets Manager in the AWS Secrets Manager user guide.
*/
SecretArn: SecretArn;
}
export type ContentType = "PDF"|"HTML"|"MS_WORD"|"PLAIN_TEXT"|"PPT"|string;
export interface CreateDataSourceRequest {
/**
* A unique name for the data source. A data source name can't be changed without deleting and recreating the data source.
*/
Name: DataSourceName;
/**
* The identifier of the index that should be associated with this data source.
*/
IndexId: IndexId;
/**
* The type of repository that contains the data source.
*/
Type: DataSourceType;
/**
* The connector configuration information that is required to access the repository.
*/
Configuration: DataSourceConfiguration;
/**
* A description for the data source.
*/
Description?: Description;
/**
* 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.
*/
Schedule?: ScanSchedule;
/**
* The Amazon Resource Name (ARN) of a role with permission to access the data source. For more information, see IAM Roles for Amazon Kendra.
*/
RoleArn: RoleArn;
/**
* 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.
*/
Tags?: TagList;
}
export interface CreateDataSourceResponse {
/**
* A unique identifier for the data source.
*/
Id: DataSourceId;
}
export interface CreateFaqRequest {
/**
* The identifier of the index that contains the FAQ.
*/
IndexId: IndexId;
/**
* The name that should be associated with the FAQ.
*/
Name: FaqName;
/**
* A description of the FAQ.
*/
Description?: Description;
/**
* The S3 location of the FAQ input data.
*/
S3Path: S3Path;
/**
* The Amazon Resource Name (ARN) of a role with permission to access the S3 bucket that contains the FAQs. For more information, see IAM Roles for Amazon Kendra.
*/
RoleArn: RoleArn;
/**
* A list of key-value pairs that identify the FAQ. You can use the tags to identify and organize your resources and to control access to resources.
*/
Tags?: TagList;
}
export interface CreateFaqResponse {
/**
* The unique identifier of the FAQ.
*/
Id?: FaqId;
}
export interface CreateIndexRequest {
/**
* The name for the new index.
*/
Name: IndexName;
/**
* The Amazon Kendra edition to use for the index. Choose DEVELOPER_EDITION for indexes intended for development, testing, or proof of concept. Use ENTERPRISE_EDITION for your production databases. Once you set the edition for an index, it can't be changed.
*/
Edition?: IndexEdition;
/**
* An IAM role that gives Amazon Kendra permissions to access your Amazon CloudWatch logs and metrics. This is also the role used when you use the BatchPutDocument operation to index documents from an Amazon S3 bucket.
*/
RoleArn: RoleArn;
/**
* The identifier of the AWS KMS customer managed key (CMK) to use to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs.
*/
ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration;
/**
* A description for the index.
*/
Description?: Description;
/**
* A token that you provide to identify the request to create an index. Multiple calls to the CreateIndex operation with the same client token will create only one index.”
*/
ClientToken?: ClientTokenName;
/**
* A list of key-value pairs that identify the index. You can use the tags to identify and organize your resources and to control access to resources.
*/
Tags?: TagList;
}
export interface CreateIndexResponse {
/**
* The unique identifier of the index. Use this identifier when you query an index, set up a data source, or index a document.
*/
Id?: IndexId;
}
export interface DataSourceConfiguration {
/**
* Provides information to create a connector for a document repository in an Amazon S3 bucket.
*/
S3Configuration?: S3DataSourceConfiguration;
/**
* Provides information necessary to create a connector for a Microsoft SharePoint site.
*/
SharePointConfiguration?: SharePointConfiguration;
/**
* Provides information necessary to create a connector for a database.
*/
DatabaseConfiguration?: DatabaseConfiguration;
/**
* Provides configuration information for data sources that connect to a Salesforce site.
*/
SalesforceConfiguration?: SalesforceConfiguration;
/**
* Provided configuration for data sources that connect to Microsoft OneDrive.
*/
OneDriveConfiguration?: OneDriveConfiguration;
/**
* Provides configuration for data sources that connect to ServiceNow instances.
*/
ServiceNowConfiguration?: ServiceNowConfiguration;
}
export type DataSourceDateFieldFormat = string;
export type DataSourceFieldName = string;
export type DataSourceId = string;
export type DataSourceInclusionsExclusionsStrings = DataSourceInclusionsExclusionsStringsMember[];
export type DataSourceInclusionsExclusionsStringsMember = string;
export type DataSourceName = string;
export type DataSourceStatus = "CREATING"|"DELETING"|"FAILED"|"UPDATING"|"ACTIVE"|string;
export interface DataSourceSummary {
/**
* The name of the data source.
*/
Name?: DataSourceName;
/**
* The unique identifier for the data source.
*/
Id?: DataSourceId;
/**
* The type of the data source.
*/
Type?: DataSourceType;
/**
* The UNIX datetime that the data source was created.
*/
CreatedAt?: Timestamp;
/**
* The UNIX datetime that the data source was lasted updated.
*/
UpdatedAt?: Timestamp;
/**
* The status of the data source. When the status is ATIVE the data source is ready to use.
*/
Status?: DataSourceStatus;
}
export type DataSourceSummaryList = DataSourceSummary[];
export interface DataSourceSyncJob {
/**
* A unique identifier for the synchronization job.
*/
ExecutionId?: String;
/**
* The UNIX datetime that the synchronization job was started.
*/
StartTime?: Timestamp;
/**
* The UNIX datetime that the synchronization job was completed.
*/
EndTime?: Timestamp;
/**
* The execution status of the synchronization job. When the Status field is set to SUCCEEDED, the synchronization job is done. If the status code is set to FAILED, the ErrorCode and ErrorMessage fields give you the reason for the failure.
*/
Status?: DataSourceSyncJobStatus;
/**
* If the Status field is set to ERROR, the ErrorMessage field contains a description of the error that caused the synchronization to fail.
*/
ErrorMessage?: ErrorMessage;
/**
* If the Status field is set to FAILED, the ErrorCode field contains a the reason that the synchronization failed.
*/
ErrorCode?: ErrorCode;
/**
* If the reason that the synchronization failed is due to an error with the underlying data source, this field contains a code that identifies the error.
*/
DataSourceErrorCode?: String;
/**
* Maps a batch delete document request to a specific data source sync job. This is optional and should only be supplied when documents are deleted by a connector.
*/
Metrics?: DataSourceSyncJobMetrics;
}
export type DataSourceSyncJobHistoryList = DataSourceSyncJob[];
export type DataSourceSyncJobId = string;
export interface DataSourceSyncJobMetricTarget {
/**
* The ID of the data source that is running the sync job.
*/
DataSourceId: DataSourceId;
/**
* The ID of the sync job that is running on the data source.
*/
DataSourceSyncJobId: DataSourceSyncJobId;
}
export interface DataSourceSyncJobMetrics {
/**
* The number of documents added from the data source up to now in the data source sync.
*/
DocumentsAdded?: MetricValue;
/**
* The number of documents modified in the data source up to now in the data source sync run.
*/
DocumentsModified?: MetricValue;
/**
* The number of documents deleted from the data source up to now in the data source sync run.
*/
DocumentsDeleted?: MetricValue;
/**
* The number of documents that failed to sync from the data source up to now in the data source sync run.
*/
DocumentsFailed?: MetricValue;
/**
* The current number of documents crawled by the current sync job in the data source.
*/
DocumentsScanned?: MetricValue;
}
export type DataSourceSyncJobStatus = "FAILED"|"SUCCEEDED"|"SYNCING"|"INCOMPLETE"|"STOPPING"|"ABORTED"|"SYNCING_INDEXING"|string;
export interface DataSourceToIndexFieldMapping {
/**
* The name of the column or attribute in the data source.
*/
DataSourceFieldName: DataSourceFieldName;
/**
* The type of data stored in the column or attribute.
*/
DateFieldFormat?: DataSourceDateFieldFormat;
/**
* The name of the field in the index.
*/
IndexFieldName: IndexFieldName;
}
export type DataSourceToIndexFieldMappingList = DataSourceToIndexFieldMapping[];
export type DataSourceType = "S3"|"SHAREPOINT"|"DATABASE"|"SALESFORCE"|"ONEDRIVE"|"SERVICENOW"|string;
export interface DataSourceVpcConfiguration {
/**
* A list of identifiers for subnets within your Amazon VPC. The subnets should be able to connect to each other in the VPC, and they should have outgoing access to the Internet through a NAT device.
*/
SubnetIds: SubnetIdList;
/**
* A list of identifiers of security groups within your Amazon VPC. The security groups should enable Amazon Kendra to connect to the data source.
*/
SecurityGroupIds: SecurityGroupIdList;
}
export interface DatabaseConfiguration {
/**
* The type of database engine that runs the database.
*/
DatabaseEngineType: DatabaseEngineType;
/**
* The information necessary to connect to a database.
*/
ConnectionConfiguration: ConnectionConfiguration;
VpcConfiguration?: DataSourceVpcConfiguration;
/**
* Information about where the index should get the document information from the database.
*/
ColumnConfiguration: ColumnConfiguration;
/**
* Information about the database column that provides information for user context filtering.
*/
AclConfiguration?: AclConfiguration;
/**
* Provides information about how Amazon Kendra uses quote marks around SQL identifiers when querying a database data source.
*/
SqlConfiguration?: SqlConfiguration;
}
export type DatabaseEngineType = "RDS_AURORA_MYSQL"|"RDS_AURORA_POSTGRESQL"|"RDS_MYSQL"|"RDS_POSTGRESQL"|string;
export type DatabaseHost = string;
export type DatabaseName = string;
export type DatabasePort = number;
export interface DeleteDataSourceRequest {
/**
* The unique identifier of the data source to delete.
*/
Id: DataSourceId;
/**
* The unique identifier of the index associated with the data source.
*/
IndexId: IndexId;
}
export interface DeleteFaqRequest {
/**
* The identifier of the FAQ to remove.
*/
Id: FaqId;
/**
* The index to remove the FAQ from.
*/
IndexId: IndexId;
}
export interface DeleteIndexRequest {
/**
* The identifier of the index to delete.
*/
Id: IndexId;
}
export interface DescribeDataSourceRequest {
/**
* The unique identifier of the data source to describe.
*/
Id: DataSourceId;
/**
* The identifier of the index that contains the data source.
*/
IndexId: IndexId;
}
export interface DescribeDataSourceResponse {
/**
* The identifier of the data source.
*/
Id?: DataSourceId;
/**
* The identifier of the index that contains the data source.
*/
IndexId?: IndexId;
/**
* The name that you gave the data source when it was created.
*/
Name?: DataSourceName;
/**
* The type of the data source.
*/
Type?: DataSourceType;
/**
* Information that describes where the data source is located and how the data source is configured. The specific information in the description depends on the data source provider.
*/
Configuration?: DataSourceConfiguration;
/**
* The Unix timestamp of when the data source was created.
*/
CreatedAt?: Timestamp;
/**
* The Unix timestamp of when the data source was last updated.
*/
UpdatedAt?: Timestamp;
/**
* The description of the data source.
*/
Description?: Description;
/**
* The current status of the data source. When the status is ACTIVE the data source is ready to use. When the status is FAILED, the ErrorMessage field contains the reason that the data source failed.
*/
Status?: DataSourceStatus;
/**
* The schedule that Amazon Kendra will update the data source.
*/
Schedule?: ScanSchedule;
/**
* The Amazon Resource Name (ARN) of the role that enables the data source to access its resources.
*/
RoleArn?: RoleArn;
/**
* When the Status field value is FAILED, the ErrorMessage field contains a description of the error that caused the data source to fail.
*/
ErrorMessage?: ErrorMessage;
}
export interface DescribeFaqRequest {
/**
* The unique identifier of the FAQ.
*/
Id: FaqId;
/**
* The identifier of the index that contains the FAQ.
*/
IndexId: IndexId;
}
export interface DescribeFaqResponse {
/**
* The identifier of the FAQ.
*/
Id?: FaqId;
/**
* The identifier of the index that contains the FAQ.
*/
IndexId?: IndexId;
/**
* The name that you gave the FAQ when it was created.
*/
Name?: FaqName;
/**
* The description of the FAQ that you provided when it was created.
*/
Description?: Description;
/**
* The date and time that the FAQ was created.
*/
CreatedAt?: Timestamp;
/**
* The date and time that the FAQ was last updated.
*/
UpdatedAt?: Timestamp;
S3Path?: S3Path;
/**
* The status of the FAQ. It is ready to use when the status is ACTIVE.
*/
Status?: FaqStatus;
/**
* The Amazon Resource Name (ARN) of the role that provides access to the S3 bucket containing the input files for the FAQ.
*/
RoleArn?: RoleArn;
/**
* If the Status field is FAILED, the ErrorMessage field contains the reason why the FAQ failed.
*/
ErrorMessage?: ErrorMessage;
}
export interface DescribeIndexRequest {
/**
* The name of the index to describe.
*/
Id: IndexId;
}
export interface DescribeIndexResponse {
/**
* The name of the index.
*/
Name?: IndexName;
/**
* the name of the index.
*/
Id?: IndexId;
/**
* The Amazon Kendra edition used for the index. You decide the edition when you create the index.
*/
Edition?: IndexEdition;
/**
* The Amazon Resource Name (ARN) of the IAM role that gives Amazon Kendra permission to write to your Amazon Cloudwatch logs.
*/
RoleArn?: RoleArn;
/**
* The identifier of the AWS KMS customer master key (CMK) used to encrypt your data. Amazon Kendra doesn't support asymmetric CMKs.
*/
ServerSideEncryptionConfiguration?: ServerSideEncryptionConfiguration;
/**
* The current status of the index. When the value is ACTIVE, the index is ready for use. If the Status field value is FAILED, the ErrorMessage field contains a message that explains why.
*/
Status?: IndexStatus;
/**
* The description of the index.
*/
Description?: Description;
/**
* The Unix datetime that the index was created.
*/
CreatedAt?: Timestamp;
/**
* The Unix datetime that the index was last updated.
*/
UpdatedAt?: Timestamp;
/**
* Configuration settings for any metadata applied to the documents in the index.
*/
DocumentMetadataConfigurations?: DocumentMetadataConfigurationList;
/**
* Provides information about the number of FAQ questions and answers and the number of text documents indexed.
*/
IndexStatistics?: IndexStatistics;
/**
* When th eStatus field value is FAILED, the ErrorMessage field contains a message that explains why.
*/
ErrorMessage?: ErrorMessage;
/**
* For enterprise edtion indexes, you can choose to use additional capacity to meet the needs of your application. This contains the capacity units used for the index. A 0 for the query capacity or the storage capacity indicates that the index is using the default capacity for the index.
*/
CapacityUnits?: CapacityUnitsConfiguration;
}
export type Description = string;
export interface Document {
/**
* A unique identifier of the document in the index.
*/
Id: DocumentId;
/**
* The title of the document.
*/
Title?: Title;
/**
* The contents of the document. Documents passed to the Blob parameter must be base64 encoded. Your code might not need to encode the document file bytes if you're using an AWS SDK to call Amazon Kendra operations. If you are calling the Amazon Kendra endpoint directly using REST, you must base64 encode the contents before sending.
*/
Blob?: _Blob;
S3Path?: S3Path;
/**
* Custom attributes to apply to the document. Use the custom attributes to provide additional information for searching, to provide facets for refining searches, and to provide additional information in the query response.
*/
Attributes?: DocumentAttributeList;
/**
* Information to use for user context filtering.
*/
AccessControlList?: PrincipalList;
/**
* The file type of the document in the Blob field.
*/
ContentType?: ContentType;
}
export interface DocumentAttribute {
/**
* The identifier for the attribute.
*/
Key: DocumentAttributeKey;
/**
* The value of the attribute.
*/
Value: DocumentAttributeValue;
}
export type DocumentAttributeKey = string;
export type DocumentAttributeKeyList = DocumentAttributeKey[];
export type DocumentAttributeList = DocumentAttribute[];
export type DocumentAttributeStringListValue = String[];
export type DocumentAttributeStringValue = string;
export interface DocumentAttributeValue {
/**
* A string, such as "department".
*/
StringValue?: DocumentAttributeStringValue;
/**
* A list of strings.
*/
StringListValue?: DocumentAttributeStringListValue;
/**
* A long integer value.
*/
LongValue?: Long;
/**
* A date expressed as an ISO 8601 string.
*/
DateValue?: Timestamp;
}
export interface DocumentAttributeValueCountPair {
/**
* The value of the attribute. For example, "HR."
*/
DocumentAttributeValue?: DocumentAttributeValue;
/**
* The number of documents in the response that have the attribute value for the key.
*/
Count?: Integer;
}
export type DocumentAttributeValueCountPairList = DocumentAttributeValueCountPair[];
export type DocumentAttributeValueType = "STRING_VALUE"|"STRING_LIST_VALUE"|"LONG_VALUE"|"DATE_VALUE"|string;
export type DocumentId = string;
export type DocumentIdList = DocumentId[];
export type DocumentList = Document[];
export type DocumentMetadataBoolean = boolean;
export interface DocumentMetadataConfiguration {
/**
* The name of the index field.
*/
Name: DocumentMetadataConfigurationName;
/**
* The data type of the index field.
*/
Type: DocumentAttributeValueType;
/**
* Provides manual tuning parameters to determine how the field affects the search results.
*/
Relevance?: Relevance;
/**
* Provides information about how the field is used during a search.
*/
Search?: Search;
}
export type DocumentMetadataConfigurationList = DocumentMetadataConfiguration[];
export type DocumentMetadataConfigurationName = string;
export interface DocumentsMetadataConfiguration {
/**
* A prefix used to filter metadata configuration files in the AWS S3 bucket. The S3 bucket might contain multiple metadata files. Use S3Prefix to include only the desired metadata files.
*/
S3Prefix?: S3ObjectKey;
}
export type Duration = string;
export type ErrorCode = "InternalError"|"InvalidRequest"|string;
export type ErrorMessage = string;
export interface Facet {
/**
* The unique key for the document attribute.
*/
DocumentAttributeKey?: DocumentAttributeKey;
}
export type FacetList = Facet[];
export interface FacetResult {
/**
* The key for the facet values. This is the same as the DocumentAttributeKey provided in the query.
*/
DocumentAttributeKey?: DocumentAttributeKey;
/**
* An array of key/value pairs, where the key is the value of the attribute and the count is the number of documents that share the key value.
*/
DocumentAttributeValueCountPairs?: DocumentAttributeValueCountPairList;
}
export type FacetResultList = FacetResult[];
export type FaqId = string;
export type FaqName = string;
export interface FaqStatistics {
/**
* The total number of FAQ questions and answers contained in the index.
*/
IndexedQuestionAnswersCount: IndexedQuestionAnswersCount;
}
export type FaqStatus = "CREATING"|"UPDATING"|"ACTIVE"|"DELETING"|"FAILED"|string;
export interface FaqSummary {
/**
* The unique identifier of the FAQ.
*/
Id?: FaqId;
/**
* The name that you assigned the FAQ when you created or updated the FAQ.
*/
Name?: FaqName;
/**
* The current status of the FAQ. When the status is ACTIVE the FAQ is ready for use.
*/
Status?: FaqStatus;
/**
* The UNIX datetime that the FAQ was added to the index.
*/
CreatedAt?: Timestamp;
/**
* The UNIX datetime that the FAQ was last updated.
*/
UpdatedAt?: Timestamp;
}
export type FaqSummaryItems = FaqSummary[];
export interface Highlight {
/**
* The zero-based location in the response string where the highlight starts.
*/
BeginOffset: Integer;
/**
* The zero-based location in the response string where the highlight ends.
*/
EndOffset: Integer;
/**
* Indicates whether the response is the best response. True if this is the best response; otherwise, false.
*/
TopAnswer?: Boolean;
}
export type HighlightList = Highlight[];
export type Importance = number;
export interface IndexConfigurationSummary {
/**
* The name of the index.
*/
Name?: IndexName;
/**
* A unique identifier for the index. Use this to identify the index when you are using operations such as Query, DescribeIndex, UpdateIndex, and DeleteIndex.
*/
Id?: IndexId;
/**
* Indicates whether the index is a enterprise edition index or a developer edition index.
*/
Edition?: IndexEdition;
/**
* The Unix timestamp when the index was created.
*/
CreatedAt: Timestamp;
/**
* The Unix timestamp when the index was last updated by the UpdateIndex operation.
*/
UpdatedAt: Timestamp;
/**
* The current status of the index. When the status is ACTIVE, the index is ready to search.
*/
Status: IndexStatus;
}
export type IndexConfigurationSummaryList = IndexConfigurationSummary[];
export type IndexEdition = "DEVELOPER_EDITION"|"ENTERPRISE_EDITION"|string;
export type IndexFieldName = string;
export type IndexId = string;
export type IndexName = string;
export interface IndexStatistics {
/**
* The number of question and answer topics in the index.
*/
FaqStatistics: FaqStatistics;
/**