import * as core from "@terrascript/core"; export interface SeedUrlConfigurationArgs extends core.SchemaArgs { seedUrls: core.Array | core.ArrayOut; webCrawlerMode?: string | core.StringOut; } export class SeedUrlConfiguration extends core.Schema { @core.attr(String, { kind: "array" }) public seedUrls!: core.Array | core.ArrayOut; @core.attr(String) public webCrawlerMode?: string | core.StringOut; } export interface SiteMapsConfigurationArgs extends core.SchemaArgs { siteMaps: core.Array | core.ArrayOut; } export class SiteMapsConfiguration extends core.Schema { @core.attr(String, { kind: "array" }) public siteMaps!: core.Array | core.ArrayOut; } export interface UrlsArgs extends core.SchemaArgs { seedUrlConfiguration?: SeedUrlConfiguration; siteMapsConfiguration?: SiteMapsConfiguration; } export class Urls extends core.Schema { @core.attr(SeedUrlConfiguration) public seedUrlConfiguration?: SeedUrlConfiguration; @core.attr(SiteMapsConfiguration) public siteMapsConfiguration?: SiteMapsConfiguration; } export interface ProxyConfigurationArgs extends core.SchemaArgs { credentials?: string | core.StringOut; host: string | core.StringOut; port: number | core.NumberOut; } export class ProxyConfiguration extends core.Schema { @core.attr(String) public credentials?: string | core.StringOut; @core.attr(String) public host!: string | core.StringOut; @core.attr(Number) public port!: number | core.NumberOut; } export interface BasicAuthenticationArgs extends core.SchemaArgs { credentials: string | core.StringOut; host: string | core.StringOut; port: number | core.NumberOut; } export class BasicAuthentication extends core.Schema { @core.attr(String) public credentials!: string | core.StringOut; @core.attr(String) public host!: string | core.StringOut; @core.attr(Number) public port!: number | core.NumberOut; } export interface AuthenticationConfigurationArgs extends core.SchemaArgs { basicAuthentication?: | core.Array | core.ArrayOut; } export class AuthenticationConfiguration extends core.Schema { @core.attr(BasicAuthentication, { kind: "array" }) public basicAuthentication?: | core.Array | core.ArrayOut; } export interface WebCrawlerConfigurationArgs extends core.SchemaArgs { authenticationConfiguration?: AuthenticationConfiguration; crawlDepth?: number | core.NumberOut; maxContentSizePerPageInMegaBytes?: number | core.NumberOut; maxLinksPerPage?: number | core.NumberOut; maxUrlsPerMinuteCrawlRate?: number | core.NumberOut; proxyConfiguration?: ProxyConfiguration; urlExclusionPatterns?: core.Array | core.ArrayOut; urlInclusionPatterns?: core.Array | core.ArrayOut; urls: Urls; } export class WebCrawlerConfiguration extends core.Schema { @core.attr(AuthenticationConfiguration) public authenticationConfiguration?: AuthenticationConfiguration; @core.attr(Number) public crawlDepth?: number | core.NumberOut; @core.attr(Number) public maxContentSizePerPageInMegaBytes?: number | core.NumberOut; @core.attr(Number) public maxLinksPerPage?: number | core.NumberOut; @core.attr(Number) public maxUrlsPerMinuteCrawlRate?: number | core.NumberOut; @core.attr(ProxyConfiguration) public proxyConfiguration?: ProxyConfiguration; @core.attr(String, { kind: "array" }) public urlExclusionPatterns?: | core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public urlInclusionPatterns?: | core.Array | core.ArrayOut; @core.attr(Urls) public urls!: Urls; } export interface AccessControlListConfigurationArgs extends core.SchemaArgs { keyPath?: string | core.StringOut; } export class AccessControlListConfiguration extends core.Schema { @core.attr(String) public keyPath?: string | core.StringOut; } export interface DocumentsMetadataConfigurationArgs extends core.SchemaArgs { s3Prefix?: string | core.StringOut; } export class DocumentsMetadataConfiguration extends core.Schema { @core.attr(String) public s3Prefix?: string | core.StringOut; } export interface S3ConfigurationArgs extends core.SchemaArgs { accessControlListConfiguration?: AccessControlListConfiguration; bucketName: string | core.StringOut; documentsMetadataConfiguration?: DocumentsMetadataConfiguration; exclusionPatterns?: core.Array | core.ArrayOut; inclusionPatterns?: core.Array | core.ArrayOut; inclusionPrefixes?: core.Array | core.ArrayOut; } export class S3Configuration extends core.Schema { @core.attr(AccessControlListConfiguration) public accessControlListConfiguration?: AccessControlListConfiguration; @core.attr(String) public bucketName!: string | core.StringOut; @core.attr(DocumentsMetadataConfiguration) public documentsMetadataConfiguration?: DocumentsMetadataConfiguration; @core.attr(String, { kind: "array" }) public exclusionPatterns?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public inclusionPatterns?: core.Array | core.ArrayOut; @core.attr(String, { kind: "array" }) public inclusionPrefixes?: core.Array | core.ArrayOut; } export interface ConfigurationArgs extends core.SchemaArgs { s3Configuration?: S3Configuration; webCrawlerConfiguration?: WebCrawlerConfiguration; } export class Configuration extends core.Schema { @core.attr(S3Configuration) public s3Configuration?: S3Configuration; @core.attr(WebCrawlerConfiguration) public webCrawlerConfiguration?: WebCrawlerConfiguration; } export interface ConditionOnValueArgs extends core.SchemaArgs { dateValue?: string | core.StringOut; longValue?: number | core.NumberOut; stringListValue?: core.Array | core.ArrayOut; stringValue?: string | core.StringOut; } export class ConditionOnValue extends core.Schema { @core.attr(String) public dateValue?: string | core.StringOut; @core.attr(Number) public longValue?: number | core.NumberOut; @core.attr(String, { kind: "array" }) public stringListValue?: core.Array | core.ArrayOut; @core.attr(String) public stringValue?: string | core.StringOut; } export interface ConditionArgs extends core.SchemaArgs { conditionDocumentAttributeKey: string | core.StringOut; conditionOnValue?: ConditionOnValue; operator: string | core.StringOut; } export class Condition extends core.Schema { @core.attr(String) public conditionDocumentAttributeKey!: string | core.StringOut; @core.attr(ConditionOnValue) public conditionOnValue?: ConditionOnValue; @core.attr(String) public operator!: string | core.StringOut; } export interface TargetDocumentAttributeValueArgs extends core.SchemaArgs { dateValue?: string | core.StringOut; longValue?: number | core.NumberOut; stringListValue?: core.Array | core.ArrayOut; stringValue?: string | core.StringOut; } export class TargetDocumentAttributeValue extends core.Schema { @core.attr(String) public dateValue?: string | core.StringOut; @core.attr(Number) public longValue?: number | core.NumberOut; @core.attr(String, { kind: "array" }) public stringListValue?: core.Array | core.ArrayOut; @core.attr(String) public stringValue?: string | core.StringOut; } export interface TargetArgs extends core.SchemaArgs { targetDocumentAttributeKey?: string | core.StringOut; targetDocumentAttributeValue?: TargetDocumentAttributeValue; targetDocumentAttributeValueDeletion?: boolean | core.BooleanOut; } export class Target extends core.Schema { @core.attr(String) public targetDocumentAttributeKey?: string | core.StringOut; @core.attr(TargetDocumentAttributeValue) public targetDocumentAttributeValue?: TargetDocumentAttributeValue; @core.attr(Boolean) public targetDocumentAttributeValueDeletion?: boolean | core.BooleanOut; } export interface InlineConfigurationsArgs extends core.SchemaArgs { condition?: Condition; documentContentDeletion?: boolean | core.BooleanOut; target?: Target; } export class InlineConfigurations extends core.Schema { @core.attr(Condition) public condition?: Condition; @core.attr(Boolean) public documentContentDeletion?: boolean | core.BooleanOut; @core.attr(Target) public target?: Target; } export interface InvocationConditionArgs extends core.SchemaArgs { conditionDocumentAttributeKey: string | core.StringOut; conditionOnValue?: ConditionOnValue; operator: string | core.StringOut; } export class InvocationCondition extends core.Schema { @core.attr(String) public conditionDocumentAttributeKey!: string | core.StringOut; @core.attr(ConditionOnValue) public conditionOnValue?: ConditionOnValue; @core.attr(String) public operator!: string | core.StringOut; } export interface PostExtractionHookConfigurationArgs extends core.SchemaArgs { invocationCondition?: InvocationCondition; lambdaArn: string | core.StringOut; s3Bucket: string | core.StringOut; } export class PostExtractionHookConfiguration extends core.Schema { @core.attr(InvocationCondition) public invocationCondition?: InvocationCondition; @core.attr(String) public lambdaArn!: string | core.StringOut; @core.attr(String) public s3Bucket!: string | core.StringOut; } export interface PreExtractionHookConfigurationArgs extends core.SchemaArgs { invocationCondition?: InvocationCondition; lambdaArn: string | core.StringOut; s3Bucket: string | core.StringOut; } export class PreExtractionHookConfiguration extends core.Schema { @core.attr(InvocationCondition) public invocationCondition?: InvocationCondition; @core.attr(String) public lambdaArn!: string | core.StringOut; @core.attr(String) public s3Bucket!: string | core.StringOut; } export interface CustomDocumentEnrichmentConfigurationArgs extends core.SchemaArgs { inlineConfigurations?: | core.Array | core.ArrayOut; postExtractionHookConfiguration?: PostExtractionHookConfiguration; preExtractionHookConfiguration?: PreExtractionHookConfiguration; roleArn?: string | core.StringOut; } export class CustomDocumentEnrichmentConfiguration extends core.Schema { @core.attr(InlineConfigurations, { kind: "array" }) public inlineConfigurations?: | core.Array | core.ArrayOut; @core.attr(PostExtractionHookConfiguration) public postExtractionHookConfiguration?: PostExtractionHookConfiguration; @core.attr(PreExtractionHookConfiguration) public preExtractionHookConfiguration?: PreExtractionHookConfiguration; @core.attr(String) public roleArn?: string | core.StringOut; } export interface DataSourceArgs extends core.ResourceArgs { /** * (Optional) A block with the configuration information to connect to your Data Source repository. You * can't specify the `configuration` argument when the `type` parameter is set to `CUSTOM`. [Detailed * below](#configuration). */ configuration?: Configuration; /** * (Optional) A block with the configuration information for altering document metadata and content dur * ing the document ingestion process. For more information on how to create, modify and delete documen * t metadata, or make other content alterations when you ingest documents into Amazon Kendra, see [Cus * tomizing document metadata during the ingestion process](https://docs.aws.amazon.com/kendra/latest/d * g/custom-document-enrichment.html). [Detailed below](#custom_document_enrichment_configuration). */ customDocumentEnrichmentConfiguration?: CustomDocumentEnrichmentConfiguration; /** * (Optional) A description for the Data Source connector. */ description?: string | core.StringOut; /** * (Required, Forces new resource) The identifier of the index for your Amazon Kendra data_source. */ indexId: string | core.StringOut; /** * (Optional) The code for a language. This allows you to support a language for all documents when cre * ating 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](https://doc * s.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). */ languageCode?: string | core.StringOut; /** * (Required) A name for your Data Source connector. */ name: string | core.StringOut; /** * (Required, Optional in one scenario) The Amazon Resource Name (ARN) of a role with permission to acc * ess the data source connector. For more information, see [IAM roles for Amazon Kendra](https://docs. * aws.amazon.com/kendra/latest/dg/iam-roles.html). You can't specify the `role_arn` parameter when the * type` parameter is set to `CUSTOM`. The `role_arn` parameter is required for all other data source * s. */ roleArn?: string | core.StringOut; /** * (Optional) Sets the frequency for Amazon Kendra to check the documents in your Data Source repositor * y and update the index. If you don't set a schedule Amazon Kendra will not periodically update the i * ndex. You can call the `StartDataSourceSyncJob` API to update the index. */ schedule?: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) p * resent, tags with matching keys will overwrite those defined at the provider-level. */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](/docs/providers/aws/index.html#default_tags-configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Required, Forces new resource) The type of data source repository. For an updated list of values, r * efer to [Valid Values for Type](https://docs.aws.amazon.com/kendra/latest/dg/API_CreateDataSource.ht * ml#Kendra-CreateDataSource-request-Type). */ type: string | core.StringOut; } export class DataSource extends core.Resource { /** * ARN of the Data Source. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A block with the configuration information to connect to your Data Source repository. You * can't specify the `configuration` argument when the `type` parameter is set to `CUSTOM`. [Detailed * below](#configuration). */ @core.attr(Configuration) public configuration?: Configuration; /** * The Unix timestamp of when the Data Source was created. */ @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; /** * (Optional) A block with the configuration information for altering document metadata and content dur * ing the document ingestion process. For more information on how to create, modify and delete documen * t metadata, or make other content alterations when you ingest documents into Amazon Kendra, see [Cus * tomizing document metadata during the ingestion process](https://docs.aws.amazon.com/kendra/latest/d * g/custom-document-enrichment.html). [Detailed below](#custom_document_enrichment_configuration). */ @core.attr(CustomDocumentEnrichmentConfiguration) public customDocumentEnrichmentConfiguration?: CustomDocumentEnrichmentConfiguration; /** * The unique identifiers of the Data Source. */ @core.attr(String, { computed: true }) public dataSourceId!: string | core.StringOut; /** * (Optional) A description for the Data Source connector. */ @core.attr(String) public description?: string | core.StringOut; /** * When the Status field value is `FAILED`, the ErrorMessage field contains a description of the error * that caused the Data Source to fail. */ @core.attr(String, { computed: true }) public errorMessage!: string | core.StringOut; /** * The unique identifiers of the Data Source and index separated by a slash (`/`). */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Required, Forces new resource) The identifier of the index for your Amazon Kendra data_source. */ @core.attr(String) public indexId!: string | core.StringOut; /** * (Optional) The code for a language. This allows you to support a language for all documents when cre * ating 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](https://doc * s.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). */ @core.attr(String, { computed: true }) public languageCode?: string | core.StringOut; /** * (Required) A name for your Data Source connector. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required, Optional in one scenario) The Amazon Resource Name (ARN) of a role with permission to acc * ess the data source connector. For more information, see [IAM roles for Amazon Kendra](https://docs. * aws.amazon.com/kendra/latest/dg/iam-roles.html). You can't specify the `role_arn` parameter when the * type` parameter is set to `CUSTOM`. The `role_arn` parameter is required for all other data source * s. */ @core.attr(String) public roleArn?: string | core.StringOut; /** * (Optional) Sets the frequency for Amazon Kendra to check the documents in your Data Source repositor * y and update the index. If you don't set a schedule Amazon Kendra will not periodically update the i * ndex. You can call the `StartDataSourceSyncJob` API to update the index. */ @core.attr(String) public schedule?: string | core.StringOut; /** * 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 `error_message` field contains the reason that the Data Source fail * ed. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Key-value map of resource tags. If configured with a provider [`default_tags` configurati * on block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) p * resent, tags with matching keys will overwrite those defined at the provider-level. */ @core.attr(String, { kind: "map" }) public tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](/docs/providers/aws/index.html#default_tags-configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * (Required, Forces new resource) The type of data source repository. For an updated list of values, r * efer to [Valid Values for Type](https://docs.aws.amazon.com/kendra/latest/dg/API_CreateDataSource.ht * ml#Kendra-CreateDataSource-request-Type). */ @core.attr(String) public type!: string | core.StringOut; /** * The Unix timestamp of when the Data Source was last updated. */ @core.attr(String, { computed: true }) public updatedAt!: string | core.StringOut; constructor(name: string, args?: DataSourceArgs) { super(name, "aws_kendra_data_source", args); } public override getNamespace(): string { return "aws_kendra"; } }