import * as core from "@terrascript/core"; export interface JsonTokenTypeConfigurationArgs extends core.SchemaArgs { groupAttributeField: string | core.StringOut; userNameAttributeField: string | core.StringOut; } export class JsonTokenTypeConfiguration extends core.Schema { @core.attr(String) public groupAttributeField!: string | core.StringOut; @core.attr(String) public userNameAttributeField!: string | core.StringOut; } export interface JwtTokenTypeConfigurationArgs extends core.SchemaArgs { claimRegex?: string | core.StringOut; groupAttributeField?: string | core.StringOut; issuer?: string | core.StringOut; keyLocation: string | core.StringOut; secretsManagerArn?: string | core.StringOut; url?: string | core.StringOut; userNameAttributeField?: string | core.StringOut; } export class JwtTokenTypeConfiguration extends core.Schema { @core.attr(String) public claimRegex?: string | core.StringOut; @core.attr(String) public groupAttributeField?: string | core.StringOut; @core.attr(String) public issuer?: string | core.StringOut; @core.attr(String) public keyLocation!: string | core.StringOut; @core.attr(String) public secretsManagerArn?: string | core.StringOut; @core.attr(String) public url?: string | core.StringOut; @core.attr(String) public userNameAttributeField?: string | core.StringOut; } export interface UserTokenConfigurationsArgs extends core.SchemaArgs { jsonTokenTypeConfiguration?: JsonTokenTypeConfiguration; jwtTokenTypeConfiguration?: JwtTokenTypeConfiguration; } export class UserTokenConfigurations extends core.Schema { @core.attr(JsonTokenTypeConfiguration) public jsonTokenTypeConfiguration?: JsonTokenTypeConfiguration; @core.attr(JwtTokenTypeConfiguration) public jwtTokenTypeConfiguration?: JwtTokenTypeConfiguration; } export interface CapacityUnitsArgs extends core.SchemaArgs { queryCapacityUnits?: number | core.NumberOut; storageCapacityUnits?: number | core.NumberOut; } export class CapacityUnits extends core.Schema { @core.attr(Number, { computed: true }) public queryCapacityUnits?: number | core.NumberOut; @core.attr(Number, { computed: true }) public storageCapacityUnits?: number | core.NumberOut; } export interface UserGroupResolutionConfigurationArgs extends core.SchemaArgs { userGroupResolutionMode: string | core.StringOut; } export class UserGroupResolutionConfiguration extends core.Schema { @core.attr(String) public userGroupResolutionMode!: string | core.StringOut; } export interface RelevanceArgs extends core.SchemaArgs { duration?: string | core.StringOut; freshness?: boolean | core.BooleanOut; importance?: number | core.NumberOut; rankOrder?: string | core.StringOut; valuesImportanceMap?: core.Map | core.MapOut; } export class Relevance extends core.Schema { @core.attr(String, { computed: true }) public duration?: string | core.StringOut; @core.attr(Boolean, { computed: true }) public freshness?: boolean | core.BooleanOut; @core.attr(Number, { computed: true }) public importance?: number | core.NumberOut; @core.attr(String, { computed: true }) public rankOrder?: string | core.StringOut; @core.attr(Number, { computed: true, kind: "map" }) public valuesImportanceMap?: | core.Map | core.MapOut; } export interface SearchArgs extends core.SchemaArgs { displayable?: boolean | core.BooleanOut; facetable?: boolean | core.BooleanOut; searchable?: boolean | core.BooleanOut; sortable?: boolean | core.BooleanOut; } export class Search extends core.Schema { @core.attr(Boolean, { computed: true }) public displayable?: boolean | core.BooleanOut; @core.attr(Boolean, { computed: true }) public facetable?: boolean | core.BooleanOut; @core.attr(Boolean, { computed: true }) public searchable?: boolean | core.BooleanOut; @core.attr(Boolean, { computed: true }) public sortable?: boolean | core.BooleanOut; } export interface DocumentMetadataConfigurationUpdatesArgs extends core.SchemaArgs { name: string | core.StringOut; relevance?: Relevance; search?: Search; type: string | core.StringOut; } export class DocumentMetadataConfigurationUpdates extends core.Schema { @core.attr(String) public name!: string | core.StringOut; @core.attr(Relevance, { computed: true }) public relevance?: Relevance; @core.attr(Search, { computed: true }) public search?: Search; @core.attr(String) public type!: string | core.StringOut; } export interface FaqStatisticsArgs extends core.SchemaArgs { indexedQuestionAnswersCount: number | core.NumberOut; } export class FaqStatistics extends core.Schema { @core.attr(Number, { computed: true }) public indexedQuestionAnswersCount!: number | core.NumberOut; } export interface TextDocumentStatisticsArgs extends core.SchemaArgs { indexedTextBytes: number | core.NumberOut; indexedTextDocumentsCount: number | core.NumberOut; } export class TextDocumentStatistics extends core.Schema { @core.attr(Number, { computed: true }) public indexedTextBytes!: number | core.NumberOut; @core.attr(Number, { computed: true }) public indexedTextDocumentsCount!: number | core.NumberOut; } export interface IndexStatisticsArgs extends core.SchemaArgs { faqStatistics: core.Array | core.ArrayOut; textDocumentStatistics: | core.Array | core.ArrayOut; } export class IndexStatistics extends core.Schema { @core.attr(FaqStatistics, { computed: true, kind: "array" }) public faqStatistics!: | core.Array | core.ArrayOut; @core.attr(TextDocumentStatistics, { computed: true, kind: "array" }) public textDocumentStatistics!: | core.Array | core.ArrayOut; } export interface ServerSideEncryptionConfigurationArgs extends core.SchemaArgs { kmsKeyId?: string | core.StringOut; } export class ServerSideEncryptionConfiguration extends core.Schema { @core.attr(String) public kmsKeyId?: string | core.StringOut; } export interface IndexArgs extends core.ResourceArgs { /** * (Optional) A block that sets the number of additional document storage and query capacity units that * should be used by the index. [Detailed below](#capacity_units). */ capacityUnits?: CapacityUnits; /** * (Optional) The description of the Index. */ description?: string | core.StringOut; /** * (Optional) One or more blocks that specify the configuration settings for any metadata applied to th * e documents in the index. Minimum number of 0 items. Maximum number of 500 items. If specified, you * must define all elements, including those that are provided by default. These index fields are docum * ented at [Amazon Kendra Index documentation](https://docs.aws.amazon.com/kendra/latest/dg/hiw-index. * html). For an example resource that defines these default index fields, refer to the [default exampl * e above](#specifying-the-predefined-elements). For an example resource that appends additional index * fields, refer to the [append example above](#appending-additional-elements). All arguments for each * block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. T * his argument is [detailed below](#document_metadata_configuration_updates). */ documentMetadataConfigurationUpdates?: | core.Array | core.ArrayOut; /** * (Optional) The Amazon Kendra edition to use for the index. Choose `DEVELOPER_EDITION` for indexes in * tended for development, testing, or proof of concept. Use `ENTERPRISE_EDITION` for your production d * atabases. Once you set the edition for an index, it can't be changed. Defaults to `ENTERPRISE_EDITIO * N` */ edition?: string | core.StringOut; /** * (Required) Specifies the name of the Index. */ name: string | core.StringOut; /** * (Required) An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to * access your Amazon CloudWatch logs and metrics. This is also the role you use when you call the `Bat * chPutDocument` API to index documents from an Amazon S3 bucket. */ roleArn: string | core.StringOut; /** * (Optional) A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's us * ed to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. [Detaile * d below](#server_side_encryption_configuration). */ serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; /** * (Optional) Tags to apply to the Index. If configured with a provider */ tags?: core.Map | core.MapOut; /** * A map of tags assigned to the resource, including those inherited from the provider [`default_tags` * configuration block](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ tagsAll?: core.Map | core.MapOut; /** * (Optional) The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more in * formation, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/dg/API_CreateIndex * .html#Kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. */ userContextPolicy?: string | core.StringOut; /** * (Optional) A block that enables fetching access levels of groups and users from an AWS Single Sign-O * n identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon * .com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). [Detailed below](#user_group_resol * ution_configuration). */ userGroupResolutionConfiguration?: UserGroupResolutionConfiguration; /** * (Optional) A block that specifies the user token configuration. [Detailed below](#user_token_configu * rations). */ userTokenConfigurations?: UserTokenConfigurations; } export class Index extends core.Resource { /** * The Amazon Resource Name (ARN) of the Index. */ @core.attr(String, { computed: true }) public arn!: string | core.StringOut; /** * (Optional) A block that sets the number of additional document storage and query capacity units that * should be used by the index. [Detailed below](#capacity_units). */ @core.attr(CapacityUnits, { computed: true }) public capacityUnits?: CapacityUnits; /** * The Unix datetime that the index was created. */ @core.attr(String, { computed: true }) public createdAt!: string | core.StringOut; /** * (Optional) The description of the Index. */ @core.attr(String) public description?: string | core.StringOut; /** * (Optional) One or more blocks that specify the configuration settings for any metadata applied to th * e documents in the index. Minimum number of 0 items. Maximum number of 500 items. If specified, you * must define all elements, including those that are provided by default. These index fields are docum * ented at [Amazon Kendra Index documentation](https://docs.aws.amazon.com/kendra/latest/dg/hiw-index. * html). For an example resource that defines these default index fields, refer to the [default exampl * e above](#specifying-the-predefined-elements). For an example resource that appends additional index * fields, refer to the [append example above](#appending-additional-elements). All arguments for each * block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. T * his argument is [detailed below](#document_metadata_configuration_updates). */ @core.attr(DocumentMetadataConfigurationUpdates, { computed: true, kind: "array", }) public documentMetadataConfigurationUpdates?: | core.Array | core.ArrayOut; /** * (Optional) The Amazon Kendra edition to use for the index. Choose `DEVELOPER_EDITION` for indexes in * tended for development, testing, or proof of concept. Use `ENTERPRISE_EDITION` for your production d * atabases. Once you set the edition for an index, it can't be changed. Defaults to `ENTERPRISE_EDITIO * N` */ @core.attr(String) public edition?: string | core.StringOut; /** * When the Status field value is `FAILED`, this contains a message that explains why. */ @core.attr(String, { computed: true }) public errorMessage!: string | core.StringOut; /** * The identifier of the Index. */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * A block that provides information about the number of FAQ questions and answers and the number of te * xt documents indexed. [Detailed below](#index_statistics). */ @core.attr(IndexStatistics, { computed: true, kind: "array" }) public indexStatistics!: | core.Array | core.ArrayOut; /** * (Required) Specifies the name of the Index. */ @core.attr(String) public name!: string | core.StringOut; /** * (Required) An AWS Identity and Access Management (IAM) role that gives Amazon Kendra permissions to * access your Amazon CloudWatch logs and metrics. This is also the role you use when you call the `Bat * chPutDocument` API to index documents from an Amazon S3 bucket. */ @core.attr(String) public roleArn!: string | core.StringOut; /** * (Optional) A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's us * ed to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. [Detaile * d below](#server_side_encryption_configuration). */ @core.attr(ServerSideEncryptionConfiguration) public serverSideEncryptionConfiguration?: ServerSideEncryptionConfiguration; /** * The current status of the index. When the value is `ACTIVE`, the index is ready for use. If the Stat * us field value is `FAILED`, the `error_message` field contains a message that explains why. */ @core.attr(String, { computed: true }) public status!: string | core.StringOut; /** * (Optional) Tags to apply to the Index. If configured with a provider */ @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](https://registry.terraform.io/providers/hashicorp/aws/latest/docs#default_tags- * configuration-block). */ @core.attr(String, { computed: true, kind: "map" }) public tagsAll?: core.Map | core.MapOut; /** * The Unix datetime that the index was last updated. */ @core.attr(String, { computed: true }) public updatedAt!: string | core.StringOut; /** * (Optional) The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more in * formation, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/dg/API_CreateIndex * .html#Kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. */ @core.attr(String) public userContextPolicy?: string | core.StringOut; /** * (Optional) A block that enables fetching access levels of groups and users from an AWS Single Sign-O * n identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon * .com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). [Detailed below](#user_group_resol * ution_configuration). */ @core.attr(UserGroupResolutionConfiguration) public userGroupResolutionConfiguration?: UserGroupResolutionConfiguration; /** * (Optional) A block that specifies the user token configuration. [Detailed below](#user_token_configu * rations). */ @core.attr(UserTokenConfigurations) public userTokenConfigurations?: UserTokenConfigurations; constructor(name: string, args?: IndexArgs) { super(name, "aws_kendra_index", args); } public override getNamespace(): string { return "aws_kendra"; } }