github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kendra/index.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package kendra 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an Amazon Kendra Index resource. 16 // 17 // ## Example Usage 18 // 19 // ### Basic 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 28 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 29 // 30 // ) 31 // 32 // func main() { 33 // pulumi.Run(func(ctx *pulumi.Context) error { 34 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 35 // Name: pulumi.String("example"), 36 // Description: pulumi.String("example"), 37 // Edition: pulumi.String("DEVELOPER_EDITION"), 38 // RoleArn: pulumi.Any(this.Arn), 39 // Tags: pulumi.StringMap{ 40 // "Key1": pulumi.String("Value1"), 41 // }, 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // return nil 47 // }) 48 // } 49 // 50 // ``` 51 // <!--End PulumiCodeChooser --> 52 // 53 // ### With capacity units 54 // 55 // <!--Start PulumiCodeChooser --> 56 // ```go 57 // package main 58 // 59 // import ( 60 // 61 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 62 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 63 // 64 // ) 65 // 66 // func main() { 67 // pulumi.Run(func(ctx *pulumi.Context) error { 68 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 69 // Name: pulumi.String("example"), 70 // Edition: pulumi.String("DEVELOPER_EDITION"), 71 // RoleArn: pulumi.Any(this.Arn), 72 // CapacityUnits: &kendra.IndexCapacityUnitsArgs{ 73 // QueryCapacityUnits: pulumi.Int(2), 74 // StorageCapacityUnits: pulumi.Int(2), 75 // }, 76 // }) 77 // if err != nil { 78 // return err 79 // } 80 // return nil 81 // }) 82 // } 83 // 84 // ``` 85 // <!--End PulumiCodeChooser --> 86 // 87 // ### With server side encryption configuration 88 // 89 // <!--Start PulumiCodeChooser --> 90 // ```go 91 // package main 92 // 93 // import ( 94 // 95 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 96 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 97 // 98 // ) 99 // 100 // func main() { 101 // pulumi.Run(func(ctx *pulumi.Context) error { 102 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 103 // Name: pulumi.String("example"), 104 // RoleArn: pulumi.Any(thisAwsIamRole.Arn), 105 // ServerSideEncryptionConfiguration: &kendra.IndexServerSideEncryptionConfigurationArgs{ 106 // KmsKeyId: pulumi.Any(this.Arn), 107 // }, 108 // }) 109 // if err != nil { 110 // return err 111 // } 112 // return nil 113 // }) 114 // } 115 // 116 // ``` 117 // <!--End PulumiCodeChooser --> 118 // 119 // ### With user group resolution configuration 120 // 121 // <!--Start PulumiCodeChooser --> 122 // ```go 123 // package main 124 // 125 // import ( 126 // 127 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 128 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 129 // 130 // ) 131 // 132 // func main() { 133 // pulumi.Run(func(ctx *pulumi.Context) error { 134 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 135 // Name: pulumi.String("example"), 136 // RoleArn: pulumi.Any(this.Arn), 137 // UserGroupResolutionConfiguration: &kendra.IndexUserGroupResolutionConfigurationArgs{ 138 // UserGroupResolutionMode: pulumi.String("AWS_SSO"), 139 // }, 140 // }) 141 // if err != nil { 142 // return err 143 // } 144 // return nil 145 // }) 146 // } 147 // 148 // ``` 149 // <!--End PulumiCodeChooser --> 150 // 151 // ### With Document Metadata Configuration Updates 152 // 153 // ### Specifying the predefined elements 154 // 155 // Refer to [Amazon Kendra documentation on built-in document fields](https://docs.aws.amazon.com/kendra/latest/dg/hiw-index.html#index-reserved-fields) for more information. 156 // 157 // <!--Start PulumiCodeChooser --> 158 // ```go 159 // package main 160 // 161 // import ( 162 // 163 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 164 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 165 // 166 // ) 167 // 168 // func main() { 169 // pulumi.Run(func(ctx *pulumi.Context) error { 170 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 171 // Name: pulumi.String("example"), 172 // RoleArn: pulumi.Any(this.Arn), 173 // DocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{ 174 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 175 // Name: pulumi.String("_authors"), 176 // Type: pulumi.String("STRING_LIST_VALUE"), 177 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 178 // Displayable: pulumi.Bool(false), 179 // Facetable: pulumi.Bool(false), 180 // Searchable: pulumi.Bool(false), 181 // Sortable: pulumi.Bool(false), 182 // }, 183 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 184 // Importance: pulumi.Int(1), 185 // }, 186 // }, 187 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 188 // Name: pulumi.String("_category"), 189 // Type: pulumi.String("STRING_VALUE"), 190 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 191 // Displayable: pulumi.Bool(false), 192 // Facetable: pulumi.Bool(false), 193 // Searchable: pulumi.Bool(false), 194 // Sortable: pulumi.Bool(true), 195 // }, 196 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 197 // Importance: pulumi.Int(1), 198 // ValuesImportanceMap: nil, 199 // }, 200 // }, 201 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 202 // Name: pulumi.String("_created_at"), 203 // Type: pulumi.String("DATE_VALUE"), 204 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 205 // Displayable: pulumi.Bool(false), 206 // Facetable: pulumi.Bool(false), 207 // Searchable: pulumi.Bool(false), 208 // Sortable: pulumi.Bool(true), 209 // }, 210 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 211 // Freshness: pulumi.Bool(false), 212 // Importance: pulumi.Int(1), 213 // Duration: pulumi.String("25920000s"), 214 // RankOrder: pulumi.String("ASCENDING"), 215 // }, 216 // }, 217 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 218 // Name: pulumi.String("_data_source_id"), 219 // Type: pulumi.String("STRING_VALUE"), 220 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 221 // Displayable: pulumi.Bool(false), 222 // Facetable: pulumi.Bool(false), 223 // Searchable: pulumi.Bool(false), 224 // Sortable: pulumi.Bool(true), 225 // }, 226 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 227 // Importance: pulumi.Int(1), 228 // ValuesImportanceMap: nil, 229 // }, 230 // }, 231 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 232 // Name: pulumi.String("_document_title"), 233 // Type: pulumi.String("STRING_VALUE"), 234 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 235 // Displayable: pulumi.Bool(true), 236 // Facetable: pulumi.Bool(false), 237 // Searchable: pulumi.Bool(true), 238 // Sortable: pulumi.Bool(true), 239 // }, 240 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 241 // Importance: pulumi.Int(2), 242 // ValuesImportanceMap: nil, 243 // }, 244 // }, 245 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 246 // Name: pulumi.String("_excerpt_page_number"), 247 // Type: pulumi.String("LONG_VALUE"), 248 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 249 // Displayable: pulumi.Bool(false), 250 // Facetable: pulumi.Bool(false), 251 // Searchable: pulumi.Bool(false), 252 // Sortable: pulumi.Bool(false), 253 // }, 254 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 255 // Importance: pulumi.Int(2), 256 // RankOrder: pulumi.String("ASCENDING"), 257 // }, 258 // }, 259 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 260 // Name: pulumi.String("_faq_id"), 261 // Type: pulumi.String("STRING_VALUE"), 262 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 263 // Displayable: pulumi.Bool(false), 264 // Facetable: pulumi.Bool(false), 265 // Searchable: pulumi.Bool(false), 266 // Sortable: pulumi.Bool(true), 267 // }, 268 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 269 // Importance: pulumi.Int(1), 270 // ValuesImportanceMap: nil, 271 // }, 272 // }, 273 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 274 // Name: pulumi.String("_file_type"), 275 // Type: pulumi.String("STRING_VALUE"), 276 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 277 // Displayable: pulumi.Bool(false), 278 // Facetable: pulumi.Bool(false), 279 // Searchable: pulumi.Bool(false), 280 // Sortable: pulumi.Bool(true), 281 // }, 282 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 283 // Importance: pulumi.Int(1), 284 // ValuesImportanceMap: nil, 285 // }, 286 // }, 287 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 288 // Name: pulumi.String("_language_code"), 289 // Type: pulumi.String("STRING_VALUE"), 290 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 291 // Displayable: pulumi.Bool(false), 292 // Facetable: pulumi.Bool(false), 293 // Searchable: pulumi.Bool(false), 294 // Sortable: pulumi.Bool(true), 295 // }, 296 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 297 // Importance: pulumi.Int(1), 298 // ValuesImportanceMap: nil, 299 // }, 300 // }, 301 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 302 // Name: pulumi.String("_last_updated_at"), 303 // Type: pulumi.String("DATE_VALUE"), 304 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 305 // Displayable: pulumi.Bool(false), 306 // Facetable: pulumi.Bool(false), 307 // Searchable: pulumi.Bool(false), 308 // Sortable: pulumi.Bool(true), 309 // }, 310 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 311 // Freshness: pulumi.Bool(false), 312 // Importance: pulumi.Int(1), 313 // Duration: pulumi.String("25920000s"), 314 // RankOrder: pulumi.String("ASCENDING"), 315 // }, 316 // }, 317 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 318 // Name: pulumi.String("_source_uri"), 319 // Type: pulumi.String("STRING_VALUE"), 320 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 321 // Displayable: pulumi.Bool(true), 322 // Facetable: pulumi.Bool(false), 323 // Searchable: pulumi.Bool(false), 324 // Sortable: pulumi.Bool(false), 325 // }, 326 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 327 // Importance: pulumi.Int(1), 328 // ValuesImportanceMap: nil, 329 // }, 330 // }, 331 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 332 // Name: pulumi.String("_tenant_id"), 333 // Type: pulumi.String("STRING_VALUE"), 334 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 335 // Displayable: pulumi.Bool(false), 336 // Facetable: pulumi.Bool(false), 337 // Searchable: pulumi.Bool(false), 338 // Sortable: pulumi.Bool(true), 339 // }, 340 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 341 // Importance: pulumi.Int(1), 342 // ValuesImportanceMap: nil, 343 // }, 344 // }, 345 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 346 // Name: pulumi.String("_version"), 347 // Type: pulumi.String("STRING_VALUE"), 348 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 349 // Displayable: pulumi.Bool(false), 350 // Facetable: pulumi.Bool(false), 351 // Searchable: pulumi.Bool(false), 352 // Sortable: pulumi.Bool(true), 353 // }, 354 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 355 // Importance: pulumi.Int(1), 356 // ValuesImportanceMap: nil, 357 // }, 358 // }, 359 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 360 // Name: pulumi.String("_view_count"), 361 // Type: pulumi.String("LONG_VALUE"), 362 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 363 // Displayable: pulumi.Bool(false), 364 // Facetable: pulumi.Bool(false), 365 // Searchable: pulumi.Bool(false), 366 // Sortable: pulumi.Bool(true), 367 // }, 368 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 369 // Importance: pulumi.Int(1), 370 // RankOrder: pulumi.String("ASCENDING"), 371 // }, 372 // }, 373 // }, 374 // }) 375 // if err != nil { 376 // return err 377 // } 378 // return nil 379 // }) 380 // } 381 // 382 // ``` 383 // <!--End PulumiCodeChooser --> 384 // 385 // ### Appending additional elements 386 // 387 // The example below shows additional elements with names, `example-string-value`, `example-long-value`, `example-string-list-value`, `example-date-value` representing the 4 types of `STRING_VALUE`, `LONG_VALUE`, `STRING_LIST_VALUE`, `DATE_VALUE` respectively. 388 // 389 // <!--Start PulumiCodeChooser --> 390 // ```go 391 // package main 392 // 393 // import ( 394 // 395 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 396 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 397 // 398 // ) 399 // 400 // func main() { 401 // pulumi.Run(func(ctx *pulumi.Context) error { 402 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 403 // Name: pulumi.String("example"), 404 // RoleArn: pulumi.Any(this.Arn), 405 // DocumentMetadataConfigurationUpdates: kendra.IndexDocumentMetadataConfigurationUpdateArray{ 406 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 407 // Name: pulumi.String("_authors"), 408 // Type: pulumi.String("STRING_LIST_VALUE"), 409 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 410 // Displayable: pulumi.Bool(false), 411 // Facetable: pulumi.Bool(false), 412 // Searchable: pulumi.Bool(false), 413 // Sortable: pulumi.Bool(false), 414 // }, 415 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 416 // Importance: pulumi.Int(1), 417 // }, 418 // }, 419 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 420 // Name: pulumi.String("_category"), 421 // Type: pulumi.String("STRING_VALUE"), 422 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 423 // Displayable: pulumi.Bool(false), 424 // Facetable: pulumi.Bool(false), 425 // Searchable: pulumi.Bool(false), 426 // Sortable: pulumi.Bool(true), 427 // }, 428 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 429 // Importance: pulumi.Int(1), 430 // ValuesImportanceMap: nil, 431 // }, 432 // }, 433 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 434 // Name: pulumi.String("_created_at"), 435 // Type: pulumi.String("DATE_VALUE"), 436 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 437 // Displayable: pulumi.Bool(false), 438 // Facetable: pulumi.Bool(false), 439 // Searchable: pulumi.Bool(false), 440 // Sortable: pulumi.Bool(true), 441 // }, 442 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 443 // Freshness: pulumi.Bool(false), 444 // Importance: pulumi.Int(1), 445 // Duration: pulumi.String("25920000s"), 446 // RankOrder: pulumi.String("ASCENDING"), 447 // }, 448 // }, 449 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 450 // Name: pulumi.String("_data_source_id"), 451 // Type: pulumi.String("STRING_VALUE"), 452 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 453 // Displayable: pulumi.Bool(false), 454 // Facetable: pulumi.Bool(false), 455 // Searchable: pulumi.Bool(false), 456 // Sortable: pulumi.Bool(true), 457 // }, 458 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 459 // Importance: pulumi.Int(1), 460 // ValuesImportanceMap: nil, 461 // }, 462 // }, 463 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 464 // Name: pulumi.String("_document_title"), 465 // Type: pulumi.String("STRING_VALUE"), 466 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 467 // Displayable: pulumi.Bool(true), 468 // Facetable: pulumi.Bool(false), 469 // Searchable: pulumi.Bool(true), 470 // Sortable: pulumi.Bool(true), 471 // }, 472 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 473 // Importance: pulumi.Int(2), 474 // ValuesImportanceMap: nil, 475 // }, 476 // }, 477 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 478 // Name: pulumi.String("_excerpt_page_number"), 479 // Type: pulumi.String("LONG_VALUE"), 480 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 481 // Displayable: pulumi.Bool(false), 482 // Facetable: pulumi.Bool(false), 483 // Searchable: pulumi.Bool(false), 484 // Sortable: pulumi.Bool(false), 485 // }, 486 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 487 // Importance: pulumi.Int(2), 488 // RankOrder: pulumi.String("ASCENDING"), 489 // }, 490 // }, 491 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 492 // Name: pulumi.String("_faq_id"), 493 // Type: pulumi.String("STRING_VALUE"), 494 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 495 // Displayable: pulumi.Bool(false), 496 // Facetable: pulumi.Bool(false), 497 // Searchable: pulumi.Bool(false), 498 // Sortable: pulumi.Bool(true), 499 // }, 500 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 501 // Importance: pulumi.Int(1), 502 // ValuesImportanceMap: nil, 503 // }, 504 // }, 505 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 506 // Name: pulumi.String("_file_type"), 507 // Type: pulumi.String("STRING_VALUE"), 508 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 509 // Displayable: pulumi.Bool(false), 510 // Facetable: pulumi.Bool(false), 511 // Searchable: pulumi.Bool(false), 512 // Sortable: pulumi.Bool(true), 513 // }, 514 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 515 // Importance: pulumi.Int(1), 516 // ValuesImportanceMap: nil, 517 // }, 518 // }, 519 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 520 // Name: pulumi.String("_language_code"), 521 // Type: pulumi.String("STRING_VALUE"), 522 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 523 // Displayable: pulumi.Bool(false), 524 // Facetable: pulumi.Bool(false), 525 // Searchable: pulumi.Bool(false), 526 // Sortable: pulumi.Bool(true), 527 // }, 528 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 529 // Importance: pulumi.Int(1), 530 // ValuesImportanceMap: nil, 531 // }, 532 // }, 533 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 534 // Name: pulumi.String("_last_updated_at"), 535 // Type: pulumi.String("DATE_VALUE"), 536 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 537 // Displayable: pulumi.Bool(false), 538 // Facetable: pulumi.Bool(false), 539 // Searchable: pulumi.Bool(false), 540 // Sortable: pulumi.Bool(true), 541 // }, 542 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 543 // Freshness: pulumi.Bool(false), 544 // Importance: pulumi.Int(1), 545 // Duration: pulumi.String("25920000s"), 546 // RankOrder: pulumi.String("ASCENDING"), 547 // }, 548 // }, 549 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 550 // Name: pulumi.String("_source_uri"), 551 // Type: pulumi.String("STRING_VALUE"), 552 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 553 // Displayable: pulumi.Bool(true), 554 // Facetable: pulumi.Bool(false), 555 // Searchable: pulumi.Bool(false), 556 // Sortable: pulumi.Bool(false), 557 // }, 558 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 559 // Importance: pulumi.Int(1), 560 // ValuesImportanceMap: nil, 561 // }, 562 // }, 563 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 564 // Name: pulumi.String("_tenant_id"), 565 // Type: pulumi.String("STRING_VALUE"), 566 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 567 // Displayable: pulumi.Bool(false), 568 // Facetable: pulumi.Bool(false), 569 // Searchable: pulumi.Bool(false), 570 // Sortable: pulumi.Bool(true), 571 // }, 572 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 573 // Importance: pulumi.Int(1), 574 // ValuesImportanceMap: nil, 575 // }, 576 // }, 577 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 578 // Name: pulumi.String("_version"), 579 // Type: pulumi.String("STRING_VALUE"), 580 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 581 // Displayable: pulumi.Bool(false), 582 // Facetable: pulumi.Bool(false), 583 // Searchable: pulumi.Bool(false), 584 // Sortable: pulumi.Bool(true), 585 // }, 586 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 587 // Importance: pulumi.Int(1), 588 // ValuesImportanceMap: nil, 589 // }, 590 // }, 591 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 592 // Name: pulumi.String("_view_count"), 593 // Type: pulumi.String("LONG_VALUE"), 594 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 595 // Displayable: pulumi.Bool(false), 596 // Facetable: pulumi.Bool(false), 597 // Searchable: pulumi.Bool(false), 598 // Sortable: pulumi.Bool(true), 599 // }, 600 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 601 // Importance: pulumi.Int(1), 602 // RankOrder: pulumi.String("ASCENDING"), 603 // }, 604 // }, 605 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 606 // Name: pulumi.String("example-string-value"), 607 // Type: pulumi.String("STRING_VALUE"), 608 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 609 // Displayable: pulumi.Bool(true), 610 // Facetable: pulumi.Bool(true), 611 // Searchable: pulumi.Bool(true), 612 // Sortable: pulumi.Bool(true), 613 // }, 614 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 615 // Importance: pulumi.Int(1), 616 // ValuesImportanceMap: nil, 617 // }, 618 // }, 619 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 620 // Name: pulumi.String("example-long-value"), 621 // Type: pulumi.String("LONG_VALUE"), 622 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 623 // Displayable: pulumi.Bool(true), 624 // Facetable: pulumi.Bool(true), 625 // Searchable: pulumi.Bool(false), 626 // Sortable: pulumi.Bool(true), 627 // }, 628 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 629 // Importance: pulumi.Int(1), 630 // RankOrder: pulumi.String("ASCENDING"), 631 // }, 632 // }, 633 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 634 // Name: pulumi.String("example-string-list-value"), 635 // Type: pulumi.String("STRING_LIST_VALUE"), 636 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 637 // Displayable: pulumi.Bool(true), 638 // Facetable: pulumi.Bool(true), 639 // Searchable: pulumi.Bool(true), 640 // Sortable: pulumi.Bool(false), 641 // }, 642 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 643 // Importance: pulumi.Int(1), 644 // }, 645 // }, 646 // &kendra.IndexDocumentMetadataConfigurationUpdateArgs{ 647 // Name: pulumi.String("example-date-value"), 648 // Type: pulumi.String("DATE_VALUE"), 649 // Search: &kendra.IndexDocumentMetadataConfigurationUpdateSearchArgs{ 650 // Displayable: pulumi.Bool(true), 651 // Facetable: pulumi.Bool(true), 652 // Searchable: pulumi.Bool(false), 653 // Sortable: pulumi.Bool(false), 654 // }, 655 // Relevance: &kendra.IndexDocumentMetadataConfigurationUpdateRelevanceArgs{ 656 // Freshness: pulumi.Bool(false), 657 // Importance: pulumi.Int(1), 658 // Duration: pulumi.String("25920000s"), 659 // RankOrder: pulumi.String("ASCENDING"), 660 // }, 661 // }, 662 // }, 663 // }) 664 // if err != nil { 665 // return err 666 // } 667 // return nil 668 // }) 669 // } 670 // 671 // ``` 672 // <!--End PulumiCodeChooser --> 673 // 674 // ### With JSON token type configuration 675 // 676 // <!--Start PulumiCodeChooser --> 677 // ```go 678 // package main 679 // 680 // import ( 681 // 682 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 683 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 684 // 685 // ) 686 // 687 // func main() { 688 // pulumi.Run(func(ctx *pulumi.Context) error { 689 // _, err := kendra.NewIndex(ctx, "example", &kendra.IndexArgs{ 690 // Name: pulumi.String("example"), 691 // RoleArn: pulumi.Any(this.Arn), 692 // UserTokenConfigurations: &kendra.IndexUserTokenConfigurationsArgs{ 693 // JsonTokenTypeConfiguration: &kendra.IndexUserTokenConfigurationsJsonTokenTypeConfigurationArgs{ 694 // GroupAttributeField: pulumi.String("groups"), 695 // UserNameAttributeField: pulumi.String("username"), 696 // }, 697 // }, 698 // }) 699 // if err != nil { 700 // return err 701 // } 702 // return nil 703 // }) 704 // } 705 // 706 // ``` 707 // <!--End PulumiCodeChooser --> 708 // 709 // ## Import 710 // 711 // Using `pulumi import`, import Amazon Kendra Indexes using its `id`. For example: 712 // 713 // ```sh 714 // $ pulumi import aws:kendra/index:Index example 12345678-1234-5678-9123-123456789123 715 // ``` 716 type Index struct { 717 pulumi.CustomResourceState 718 719 // The Amazon Resource Name (ARN) of the Index. 720 Arn pulumi.StringOutput `pulumi:"arn"` 721 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 722 CapacityUnits IndexCapacityUnitsOutput `pulumi:"capacityUnits"` 723 // The Unix datetime that the index was created. 724 CreatedAt pulumi.StringOutput `pulumi:"createdAt"` 725 // The description of the Index. 726 Description pulumi.StringPtrOutput `pulumi:"description"` 727 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 728 DocumentMetadataConfigurationUpdates IndexDocumentMetadataConfigurationUpdateArrayOutput `pulumi:"documentMetadataConfigurationUpdates"` 729 // 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. Defaults to `ENTERPRISE_EDITION` 730 Edition pulumi.StringPtrOutput `pulumi:"edition"` 731 // When the Status field value is `FAILED`, this contains a message that explains why. 732 ErrorMessage pulumi.StringOutput `pulumi:"errorMessage"` 733 // A block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Detailed below. 734 IndexStatistics IndexIndexStatisticArrayOutput `pulumi:"indexStatistics"` 735 // Specifies the name of the Index. 736 Name pulumi.StringOutput `pulumi:"name"` 737 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 738 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 739 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 740 ServerSideEncryptionConfiguration IndexServerSideEncryptionConfigurationPtrOutput `pulumi:"serverSideEncryptionConfiguration"` 741 // 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. 742 Status pulumi.StringOutput `pulumi:"status"` 743 // Tags to apply to the Index. If configured with a provider 744 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 745 Tags pulumi.StringMapOutput `pulumi:"tags"` 746 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 747 // 748 // Deprecated: Please use `tags` instead. 749 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 750 // The Unix datetime that the index was last updated. 751 UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"` 752 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 753 UserContextPolicy pulumi.StringPtrOutput `pulumi:"userContextPolicy"` 754 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 755 UserGroupResolutionConfiguration IndexUserGroupResolutionConfigurationPtrOutput `pulumi:"userGroupResolutionConfiguration"` 756 // A block that specifies the user token configuration. Detailed below. 757 UserTokenConfigurations IndexUserTokenConfigurationsPtrOutput `pulumi:"userTokenConfigurations"` 758 } 759 760 // NewIndex registers a new resource with the given unique name, arguments, and options. 761 func NewIndex(ctx *pulumi.Context, 762 name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error) { 763 if args == nil { 764 return nil, errors.New("missing one or more required arguments") 765 } 766 767 if args.RoleArn == nil { 768 return nil, errors.New("invalid value for required argument 'RoleArn'") 769 } 770 opts = internal.PkgResourceDefaultOpts(opts) 771 var resource Index 772 err := ctx.RegisterResource("aws:kendra/index:Index", name, args, &resource, opts...) 773 if err != nil { 774 return nil, err 775 } 776 return &resource, nil 777 } 778 779 // GetIndex gets an existing Index resource's state with the given name, ID, and optional 780 // state properties that are used to uniquely qualify the lookup (nil if not required). 781 func GetIndex(ctx *pulumi.Context, 782 name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { 783 var resource Index 784 err := ctx.ReadResource("aws:kendra/index:Index", name, id, state, &resource, opts...) 785 if err != nil { 786 return nil, err 787 } 788 return &resource, nil 789 } 790 791 // Input properties used for looking up and filtering Index resources. 792 type indexState struct { 793 // The Amazon Resource Name (ARN) of the Index. 794 Arn *string `pulumi:"arn"` 795 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 796 CapacityUnits *IndexCapacityUnits `pulumi:"capacityUnits"` 797 // The Unix datetime that the index was created. 798 CreatedAt *string `pulumi:"createdAt"` 799 // The description of the Index. 800 Description *string `pulumi:"description"` 801 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 802 DocumentMetadataConfigurationUpdates []IndexDocumentMetadataConfigurationUpdate `pulumi:"documentMetadataConfigurationUpdates"` 803 // 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. Defaults to `ENTERPRISE_EDITION` 804 Edition *string `pulumi:"edition"` 805 // When the Status field value is `FAILED`, this contains a message that explains why. 806 ErrorMessage *string `pulumi:"errorMessage"` 807 // A block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Detailed below. 808 IndexStatistics []IndexIndexStatistic `pulumi:"indexStatistics"` 809 // Specifies the name of the Index. 810 Name *string `pulumi:"name"` 811 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 812 RoleArn *string `pulumi:"roleArn"` 813 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 814 ServerSideEncryptionConfiguration *IndexServerSideEncryptionConfiguration `pulumi:"serverSideEncryptionConfiguration"` 815 // 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. 816 Status *string `pulumi:"status"` 817 // Tags to apply to the Index. If configured with a provider 818 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 819 Tags map[string]string `pulumi:"tags"` 820 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 821 // 822 // Deprecated: Please use `tags` instead. 823 TagsAll map[string]string `pulumi:"tagsAll"` 824 // The Unix datetime that the index was last updated. 825 UpdatedAt *string `pulumi:"updatedAt"` 826 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 827 UserContextPolicy *string `pulumi:"userContextPolicy"` 828 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 829 UserGroupResolutionConfiguration *IndexUserGroupResolutionConfiguration `pulumi:"userGroupResolutionConfiguration"` 830 // A block that specifies the user token configuration. Detailed below. 831 UserTokenConfigurations *IndexUserTokenConfigurations `pulumi:"userTokenConfigurations"` 832 } 833 834 type IndexState struct { 835 // The Amazon Resource Name (ARN) of the Index. 836 Arn pulumi.StringPtrInput 837 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 838 CapacityUnits IndexCapacityUnitsPtrInput 839 // The Unix datetime that the index was created. 840 CreatedAt pulumi.StringPtrInput 841 // The description of the Index. 842 Description pulumi.StringPtrInput 843 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 844 DocumentMetadataConfigurationUpdates IndexDocumentMetadataConfigurationUpdateArrayInput 845 // 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. Defaults to `ENTERPRISE_EDITION` 846 Edition pulumi.StringPtrInput 847 // When the Status field value is `FAILED`, this contains a message that explains why. 848 ErrorMessage pulumi.StringPtrInput 849 // A block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Detailed below. 850 IndexStatistics IndexIndexStatisticArrayInput 851 // Specifies the name of the Index. 852 Name pulumi.StringPtrInput 853 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 854 RoleArn pulumi.StringPtrInput 855 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 856 ServerSideEncryptionConfiguration IndexServerSideEncryptionConfigurationPtrInput 857 // 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. 858 Status pulumi.StringPtrInput 859 // Tags to apply to the Index. If configured with a provider 860 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 861 Tags pulumi.StringMapInput 862 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 863 // 864 // Deprecated: Please use `tags` instead. 865 TagsAll pulumi.StringMapInput 866 // The Unix datetime that the index was last updated. 867 UpdatedAt pulumi.StringPtrInput 868 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 869 UserContextPolicy pulumi.StringPtrInput 870 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 871 UserGroupResolutionConfiguration IndexUserGroupResolutionConfigurationPtrInput 872 // A block that specifies the user token configuration. Detailed below. 873 UserTokenConfigurations IndexUserTokenConfigurationsPtrInput 874 } 875 876 func (IndexState) ElementType() reflect.Type { 877 return reflect.TypeOf((*indexState)(nil)).Elem() 878 } 879 880 type indexArgs struct { 881 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 882 CapacityUnits *IndexCapacityUnits `pulumi:"capacityUnits"` 883 // The description of the Index. 884 Description *string `pulumi:"description"` 885 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 886 DocumentMetadataConfigurationUpdates []IndexDocumentMetadataConfigurationUpdate `pulumi:"documentMetadataConfigurationUpdates"` 887 // 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. Defaults to `ENTERPRISE_EDITION` 888 Edition *string `pulumi:"edition"` 889 // Specifies the name of the Index. 890 Name *string `pulumi:"name"` 891 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 892 RoleArn string `pulumi:"roleArn"` 893 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 894 ServerSideEncryptionConfiguration *IndexServerSideEncryptionConfiguration `pulumi:"serverSideEncryptionConfiguration"` 895 // Tags to apply to the Index. If configured with a provider 896 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 897 Tags map[string]string `pulumi:"tags"` 898 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 899 UserContextPolicy *string `pulumi:"userContextPolicy"` 900 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 901 UserGroupResolutionConfiguration *IndexUserGroupResolutionConfiguration `pulumi:"userGroupResolutionConfiguration"` 902 // A block that specifies the user token configuration. Detailed below. 903 UserTokenConfigurations *IndexUserTokenConfigurations `pulumi:"userTokenConfigurations"` 904 } 905 906 // The set of arguments for constructing a Index resource. 907 type IndexArgs struct { 908 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 909 CapacityUnits IndexCapacityUnitsPtrInput 910 // The description of the Index. 911 Description pulumi.StringPtrInput 912 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 913 DocumentMetadataConfigurationUpdates IndexDocumentMetadataConfigurationUpdateArrayInput 914 // 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. Defaults to `ENTERPRISE_EDITION` 915 Edition pulumi.StringPtrInput 916 // Specifies the name of the Index. 917 Name pulumi.StringPtrInput 918 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 919 RoleArn pulumi.StringInput 920 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 921 ServerSideEncryptionConfiguration IndexServerSideEncryptionConfigurationPtrInput 922 // Tags to apply to the Index. If configured with a provider 923 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 924 Tags pulumi.StringMapInput 925 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 926 UserContextPolicy pulumi.StringPtrInput 927 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 928 UserGroupResolutionConfiguration IndexUserGroupResolutionConfigurationPtrInput 929 // A block that specifies the user token configuration. Detailed below. 930 UserTokenConfigurations IndexUserTokenConfigurationsPtrInput 931 } 932 933 func (IndexArgs) ElementType() reflect.Type { 934 return reflect.TypeOf((*indexArgs)(nil)).Elem() 935 } 936 937 type IndexInput interface { 938 pulumi.Input 939 940 ToIndexOutput() IndexOutput 941 ToIndexOutputWithContext(ctx context.Context) IndexOutput 942 } 943 944 func (*Index) ElementType() reflect.Type { 945 return reflect.TypeOf((**Index)(nil)).Elem() 946 } 947 948 func (i *Index) ToIndexOutput() IndexOutput { 949 return i.ToIndexOutputWithContext(context.Background()) 950 } 951 952 func (i *Index) ToIndexOutputWithContext(ctx context.Context) IndexOutput { 953 return pulumi.ToOutputWithContext(ctx, i).(IndexOutput) 954 } 955 956 // IndexArrayInput is an input type that accepts IndexArray and IndexArrayOutput values. 957 // You can construct a concrete instance of `IndexArrayInput` via: 958 // 959 // IndexArray{ IndexArgs{...} } 960 type IndexArrayInput interface { 961 pulumi.Input 962 963 ToIndexArrayOutput() IndexArrayOutput 964 ToIndexArrayOutputWithContext(context.Context) IndexArrayOutput 965 } 966 967 type IndexArray []IndexInput 968 969 func (IndexArray) ElementType() reflect.Type { 970 return reflect.TypeOf((*[]*Index)(nil)).Elem() 971 } 972 973 func (i IndexArray) ToIndexArrayOutput() IndexArrayOutput { 974 return i.ToIndexArrayOutputWithContext(context.Background()) 975 } 976 977 func (i IndexArray) ToIndexArrayOutputWithContext(ctx context.Context) IndexArrayOutput { 978 return pulumi.ToOutputWithContext(ctx, i).(IndexArrayOutput) 979 } 980 981 // IndexMapInput is an input type that accepts IndexMap and IndexMapOutput values. 982 // You can construct a concrete instance of `IndexMapInput` via: 983 // 984 // IndexMap{ "key": IndexArgs{...} } 985 type IndexMapInput interface { 986 pulumi.Input 987 988 ToIndexMapOutput() IndexMapOutput 989 ToIndexMapOutputWithContext(context.Context) IndexMapOutput 990 } 991 992 type IndexMap map[string]IndexInput 993 994 func (IndexMap) ElementType() reflect.Type { 995 return reflect.TypeOf((*map[string]*Index)(nil)).Elem() 996 } 997 998 func (i IndexMap) ToIndexMapOutput() IndexMapOutput { 999 return i.ToIndexMapOutputWithContext(context.Background()) 1000 } 1001 1002 func (i IndexMap) ToIndexMapOutputWithContext(ctx context.Context) IndexMapOutput { 1003 return pulumi.ToOutputWithContext(ctx, i).(IndexMapOutput) 1004 } 1005 1006 type IndexOutput struct{ *pulumi.OutputState } 1007 1008 func (IndexOutput) ElementType() reflect.Type { 1009 return reflect.TypeOf((**Index)(nil)).Elem() 1010 } 1011 1012 func (o IndexOutput) ToIndexOutput() IndexOutput { 1013 return o 1014 } 1015 1016 func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput { 1017 return o 1018 } 1019 1020 // The Amazon Resource Name (ARN) of the Index. 1021 func (o IndexOutput) Arn() pulumi.StringOutput { 1022 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 1023 } 1024 1025 // A block that sets the number of additional document storage and query capacity units that should be used by the index. Detailed below. 1026 func (o IndexOutput) CapacityUnits() IndexCapacityUnitsOutput { 1027 return o.ApplyT(func(v *Index) IndexCapacityUnitsOutput { return v.CapacityUnits }).(IndexCapacityUnitsOutput) 1028 } 1029 1030 // The Unix datetime that the index was created. 1031 func (o IndexOutput) CreatedAt() pulumi.StringOutput { 1032 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) 1033 } 1034 1035 // The description of the Index. 1036 func (o IndexOutput) Description() pulumi.StringPtrOutput { 1037 return o.ApplyT(func(v *Index) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 1038 } 1039 1040 // One or more blocks that specify the configuration settings for any metadata applied to the 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 documented 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 example above. For an example resource that appends additional index fields, refer to the append example above. All arguments for each block must be specified. Note that blocks cannot be removed since index fields cannot be deleted. This argument is detailed below. 1041 func (o IndexOutput) DocumentMetadataConfigurationUpdates() IndexDocumentMetadataConfigurationUpdateArrayOutput { 1042 return o.ApplyT(func(v *Index) IndexDocumentMetadataConfigurationUpdateArrayOutput { 1043 return v.DocumentMetadataConfigurationUpdates 1044 }).(IndexDocumentMetadataConfigurationUpdateArrayOutput) 1045 } 1046 1047 // 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. Defaults to `ENTERPRISE_EDITION` 1048 func (o IndexOutput) Edition() pulumi.StringPtrOutput { 1049 return o.ApplyT(func(v *Index) pulumi.StringPtrOutput { return v.Edition }).(pulumi.StringPtrOutput) 1050 } 1051 1052 // When the Status field value is `FAILED`, this contains a message that explains why. 1053 func (o IndexOutput) ErrorMessage() pulumi.StringOutput { 1054 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.ErrorMessage }).(pulumi.StringOutput) 1055 } 1056 1057 // A block that provides information about the number of FAQ questions and answers and the number of text documents indexed. Detailed below. 1058 func (o IndexOutput) IndexStatistics() IndexIndexStatisticArrayOutput { 1059 return o.ApplyT(func(v *Index) IndexIndexStatisticArrayOutput { return v.IndexStatistics }).(IndexIndexStatisticArrayOutput) 1060 } 1061 1062 // Specifies the name of the Index. 1063 func (o IndexOutput) Name() pulumi.StringOutput { 1064 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 1065 } 1066 1067 // 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 `BatchPutDocument` API to index documents from an Amazon S3 bucket. 1068 func (o IndexOutput) RoleArn() pulumi.StringOutput { 1069 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 1070 } 1071 1072 // A block that specifies the identifier of the AWS KMS customer managed key (CMK) that's used to encrypt data indexed by Amazon Kendra. Amazon Kendra doesn't support asymmetric CMKs. Detailed below. 1073 func (o IndexOutput) ServerSideEncryptionConfiguration() IndexServerSideEncryptionConfigurationPtrOutput { 1074 return o.ApplyT(func(v *Index) IndexServerSideEncryptionConfigurationPtrOutput { 1075 return v.ServerSideEncryptionConfiguration 1076 }).(IndexServerSideEncryptionConfigurationPtrOutput) 1077 } 1078 1079 // 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. 1080 func (o IndexOutput) Status() pulumi.StringOutput { 1081 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 1082 } 1083 1084 // Tags to apply to the Index. If configured with a provider 1085 // `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 1086 func (o IndexOutput) Tags() pulumi.StringMapOutput { 1087 return o.ApplyT(func(v *Index) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 1088 } 1089 1090 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 1091 // 1092 // Deprecated: Please use `tags` instead. 1093 func (o IndexOutput) TagsAll() pulumi.StringMapOutput { 1094 return o.ApplyT(func(v *Index) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 1095 } 1096 1097 // The Unix datetime that the index was last updated. 1098 func (o IndexOutput) UpdatedAt() pulumi.StringOutput { 1099 return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput) 1100 } 1101 1102 // The user context policy. Valid values are `ATTRIBUTE_FILTER` or `USER_TOKEN`. For more information, refer to [UserContextPolicy](https://docs.aws.amazon.com/kendra/latest/APIReference/API_CreateIndex.html#kendra-CreateIndex-request-UserContextPolicy). Defaults to `ATTRIBUTE_FILTER`. 1103 func (o IndexOutput) UserContextPolicy() pulumi.StringPtrOutput { 1104 return o.ApplyT(func(v *Index) pulumi.StringPtrOutput { return v.UserContextPolicy }).(pulumi.StringPtrOutput) 1105 } 1106 1107 // A block that enables fetching access levels of groups and users from an AWS Single Sign-On identity source. To configure this, see [UserGroupResolutionConfiguration](https://docs.aws.amazon.com/kendra/latest/dg/API_UserGroupResolutionConfiguration.html). Detailed below. 1108 func (o IndexOutput) UserGroupResolutionConfiguration() IndexUserGroupResolutionConfigurationPtrOutput { 1109 return o.ApplyT(func(v *Index) IndexUserGroupResolutionConfigurationPtrOutput { 1110 return v.UserGroupResolutionConfiguration 1111 }).(IndexUserGroupResolutionConfigurationPtrOutput) 1112 } 1113 1114 // A block that specifies the user token configuration. Detailed below. 1115 func (o IndexOutput) UserTokenConfigurations() IndexUserTokenConfigurationsPtrOutput { 1116 return o.ApplyT(func(v *Index) IndexUserTokenConfigurationsPtrOutput { return v.UserTokenConfigurations }).(IndexUserTokenConfigurationsPtrOutput) 1117 } 1118 1119 type IndexArrayOutput struct{ *pulumi.OutputState } 1120 1121 func (IndexArrayOutput) ElementType() reflect.Type { 1122 return reflect.TypeOf((*[]*Index)(nil)).Elem() 1123 } 1124 1125 func (o IndexArrayOutput) ToIndexArrayOutput() IndexArrayOutput { 1126 return o 1127 } 1128 1129 func (o IndexArrayOutput) ToIndexArrayOutputWithContext(ctx context.Context) IndexArrayOutput { 1130 return o 1131 } 1132 1133 func (o IndexArrayOutput) Index(i pulumi.IntInput) IndexOutput { 1134 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Index { 1135 return vs[0].([]*Index)[vs[1].(int)] 1136 }).(IndexOutput) 1137 } 1138 1139 type IndexMapOutput struct{ *pulumi.OutputState } 1140 1141 func (IndexMapOutput) ElementType() reflect.Type { 1142 return reflect.TypeOf((*map[string]*Index)(nil)).Elem() 1143 } 1144 1145 func (o IndexMapOutput) ToIndexMapOutput() IndexMapOutput { 1146 return o 1147 } 1148 1149 func (o IndexMapOutput) ToIndexMapOutputWithContext(ctx context.Context) IndexMapOutput { 1150 return o 1151 } 1152 1153 func (o IndexMapOutput) MapIndex(k pulumi.StringInput) IndexOutput { 1154 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Index { 1155 return vs[0].(map[string]*Index)[vs[1].(string)] 1156 }).(IndexOutput) 1157 } 1158 1159 func init() { 1160 pulumi.RegisterInputType(reflect.TypeOf((*IndexInput)(nil)).Elem(), &Index{}) 1161 pulumi.RegisterInputType(reflect.TypeOf((*IndexArrayInput)(nil)).Elem(), IndexArray{}) 1162 pulumi.RegisterInputType(reflect.TypeOf((*IndexMapInput)(nil)).Elem(), IndexMap{}) 1163 pulumi.RegisterOutputType(IndexOutput{}) 1164 pulumi.RegisterOutputType(IndexArrayOutput{}) 1165 pulumi.RegisterOutputType(IndexMapOutput{}) 1166 }