github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kendra/faq.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 // Resource for managing an AWS Kendra FAQ. 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.NewFaq(ctx, "example", &kendra.FaqArgs{ 35 // IndexId: pulumi.Any(exampleAwsKendraIndex.Id), 36 // Name: pulumi.String("Example"), 37 // RoleArn: pulumi.Any(exampleAwsIamRole.Arn), 38 // S3Path: &kendra.FaqS3PathArgs{ 39 // Bucket: pulumi.Any(exampleAwsS3Bucket.Id), 40 // Key: pulumi.Any(exampleAwsS3Object.Key), 41 // }, 42 // Tags: pulumi.StringMap{ 43 // "Name": pulumi.String("Example Kendra Faq"), 44 // }, 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // return nil 50 // }) 51 // } 52 // 53 // ``` 54 // <!--End PulumiCodeChooser --> 55 // 56 // ### With File Format 57 // 58 // <!--Start PulumiCodeChooser --> 59 // ```go 60 // package main 61 // 62 // import ( 63 // 64 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 65 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 66 // 67 // ) 68 // 69 // func main() { 70 // pulumi.Run(func(ctx *pulumi.Context) error { 71 // _, err := kendra.NewFaq(ctx, "example", &kendra.FaqArgs{ 72 // IndexId: pulumi.Any(exampleAwsKendraIndex.Id), 73 // Name: pulumi.String("Example"), 74 // FileFormat: pulumi.String("CSV"), 75 // RoleArn: pulumi.Any(exampleAwsIamRole.Arn), 76 // S3Path: &kendra.FaqS3PathArgs{ 77 // Bucket: pulumi.Any(exampleAwsS3Bucket.Id), 78 // Key: pulumi.Any(exampleAwsS3Object.Key), 79 // }, 80 // }) 81 // if err != nil { 82 // return err 83 // } 84 // return nil 85 // }) 86 // } 87 // 88 // ``` 89 // <!--End PulumiCodeChooser --> 90 // 91 // ### With Language Code 92 // 93 // <!--Start PulumiCodeChooser --> 94 // ```go 95 // package main 96 // 97 // import ( 98 // 99 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra" 100 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 101 // 102 // ) 103 // 104 // func main() { 105 // pulumi.Run(func(ctx *pulumi.Context) error { 106 // _, err := kendra.NewFaq(ctx, "example", &kendra.FaqArgs{ 107 // IndexId: pulumi.Any(exampleAwsKendraIndex.Id), 108 // Name: pulumi.String("Example"), 109 // LanguageCode: pulumi.String("en"), 110 // RoleArn: pulumi.Any(exampleAwsIamRole.Arn), 111 // S3Path: &kendra.FaqS3PathArgs{ 112 // Bucket: pulumi.Any(exampleAwsS3Bucket.Id), 113 // Key: pulumi.Any(exampleAwsS3Object.Key), 114 // }, 115 // }) 116 // if err != nil { 117 // return err 118 // } 119 // return nil 120 // }) 121 // } 122 // 123 // ``` 124 // <!--End PulumiCodeChooser --> 125 // 126 // ## Import 127 // 128 // Using `pulumi import`, import `aws_kendra_faq` using the unique identifiers of the FAQ and index separated by a slash (`/`). For example: 129 // 130 // ```sh 131 // $ pulumi import aws:kendra/faq:Faq example faq-123456780/idx-8012925589 132 // ``` 133 type Faq struct { 134 pulumi.CustomResourceState 135 136 // ARN of the FAQ. 137 Arn pulumi.StringOutput `pulumi:"arn"` 138 // The Unix datetime that the FAQ was created. 139 CreatedAt pulumi.StringOutput `pulumi:"createdAt"` 140 // The description for a FAQ. 141 Description pulumi.StringPtrOutput `pulumi:"description"` 142 // When the Status field value is `FAILED`, this contains a message that explains why. 143 ErrorMessage pulumi.StringOutput `pulumi:"errorMessage"` 144 // The identifier of the FAQ. 145 FaqId pulumi.StringOutput `pulumi:"faqId"` 146 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 147 FileFormat pulumi.StringPtrOutput `pulumi:"fileFormat"` 148 // The identifier of the index for a FAQ. 149 IndexId pulumi.StringOutput `pulumi:"indexId"` 150 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 151 LanguageCode pulumi.StringOutput `pulumi:"languageCode"` 152 // The name that should be associated with the FAQ. 153 Name pulumi.StringOutput `pulumi:"name"` 154 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 155 RoleArn pulumi.StringOutput `pulumi:"roleArn"` 156 // The S3 location of the FAQ input data. Detailed below. 157 // 158 // The `s3Path` configuration block supports the following arguments: 159 S3Path FaqS3PathOutput `pulumi:"s3Path"` 160 // The status of the FAQ. It is ready to use when the status is ACTIVE. 161 Status pulumi.StringOutput `pulumi:"status"` 162 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 163 Tags pulumi.StringMapOutput `pulumi:"tags"` 164 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 165 // 166 // Deprecated: Please use `tags` instead. 167 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 168 // The date and time that the FAQ was last updated. 169 UpdatedAt pulumi.StringOutput `pulumi:"updatedAt"` 170 } 171 172 // NewFaq registers a new resource with the given unique name, arguments, and options. 173 func NewFaq(ctx *pulumi.Context, 174 name string, args *FaqArgs, opts ...pulumi.ResourceOption) (*Faq, error) { 175 if args == nil { 176 return nil, errors.New("missing one or more required arguments") 177 } 178 179 if args.IndexId == nil { 180 return nil, errors.New("invalid value for required argument 'IndexId'") 181 } 182 if args.RoleArn == nil { 183 return nil, errors.New("invalid value for required argument 'RoleArn'") 184 } 185 if args.S3Path == nil { 186 return nil, errors.New("invalid value for required argument 'S3Path'") 187 } 188 opts = internal.PkgResourceDefaultOpts(opts) 189 var resource Faq 190 err := ctx.RegisterResource("aws:kendra/faq:Faq", name, args, &resource, opts...) 191 if err != nil { 192 return nil, err 193 } 194 return &resource, nil 195 } 196 197 // GetFaq gets an existing Faq resource's state with the given name, ID, and optional 198 // state properties that are used to uniquely qualify the lookup (nil if not required). 199 func GetFaq(ctx *pulumi.Context, 200 name string, id pulumi.IDInput, state *FaqState, opts ...pulumi.ResourceOption) (*Faq, error) { 201 var resource Faq 202 err := ctx.ReadResource("aws:kendra/faq:Faq", name, id, state, &resource, opts...) 203 if err != nil { 204 return nil, err 205 } 206 return &resource, nil 207 } 208 209 // Input properties used for looking up and filtering Faq resources. 210 type faqState struct { 211 // ARN of the FAQ. 212 Arn *string `pulumi:"arn"` 213 // The Unix datetime that the FAQ was created. 214 CreatedAt *string `pulumi:"createdAt"` 215 // The description for a FAQ. 216 Description *string `pulumi:"description"` 217 // When the Status field value is `FAILED`, this contains a message that explains why. 218 ErrorMessage *string `pulumi:"errorMessage"` 219 // The identifier of the FAQ. 220 FaqId *string `pulumi:"faqId"` 221 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 222 FileFormat *string `pulumi:"fileFormat"` 223 // The identifier of the index for a FAQ. 224 IndexId *string `pulumi:"indexId"` 225 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 226 LanguageCode *string `pulumi:"languageCode"` 227 // The name that should be associated with the FAQ. 228 Name *string `pulumi:"name"` 229 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 230 RoleArn *string `pulumi:"roleArn"` 231 // The S3 location of the FAQ input data. Detailed below. 232 // 233 // The `s3Path` configuration block supports the following arguments: 234 S3Path *FaqS3Path `pulumi:"s3Path"` 235 // The status of the FAQ. It is ready to use when the status is ACTIVE. 236 Status *string `pulumi:"status"` 237 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 238 Tags map[string]string `pulumi:"tags"` 239 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 240 // 241 // Deprecated: Please use `tags` instead. 242 TagsAll map[string]string `pulumi:"tagsAll"` 243 // The date and time that the FAQ was last updated. 244 UpdatedAt *string `pulumi:"updatedAt"` 245 } 246 247 type FaqState struct { 248 // ARN of the FAQ. 249 Arn pulumi.StringPtrInput 250 // The Unix datetime that the FAQ was created. 251 CreatedAt pulumi.StringPtrInput 252 // The description for a FAQ. 253 Description pulumi.StringPtrInput 254 // When the Status field value is `FAILED`, this contains a message that explains why. 255 ErrorMessage pulumi.StringPtrInput 256 // The identifier of the FAQ. 257 FaqId pulumi.StringPtrInput 258 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 259 FileFormat pulumi.StringPtrInput 260 // The identifier of the index for a FAQ. 261 IndexId pulumi.StringPtrInput 262 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 263 LanguageCode pulumi.StringPtrInput 264 // The name that should be associated with the FAQ. 265 Name pulumi.StringPtrInput 266 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 267 RoleArn pulumi.StringPtrInput 268 // The S3 location of the FAQ input data. Detailed below. 269 // 270 // The `s3Path` configuration block supports the following arguments: 271 S3Path FaqS3PathPtrInput 272 // The status of the FAQ. It is ready to use when the status is ACTIVE. 273 Status pulumi.StringPtrInput 274 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 275 Tags pulumi.StringMapInput 276 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 277 // 278 // Deprecated: Please use `tags` instead. 279 TagsAll pulumi.StringMapInput 280 // The date and time that the FAQ was last updated. 281 UpdatedAt pulumi.StringPtrInput 282 } 283 284 func (FaqState) ElementType() reflect.Type { 285 return reflect.TypeOf((*faqState)(nil)).Elem() 286 } 287 288 type faqArgs struct { 289 // The description for a FAQ. 290 Description *string `pulumi:"description"` 291 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 292 FileFormat *string `pulumi:"fileFormat"` 293 // The identifier of the index for a FAQ. 294 IndexId string `pulumi:"indexId"` 295 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 296 LanguageCode *string `pulumi:"languageCode"` 297 // The name that should be associated with the FAQ. 298 Name *string `pulumi:"name"` 299 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 300 RoleArn string `pulumi:"roleArn"` 301 // The S3 location of the FAQ input data. Detailed below. 302 // 303 // The `s3Path` configuration block supports the following arguments: 304 S3Path FaqS3Path `pulumi:"s3Path"` 305 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 306 Tags map[string]string `pulumi:"tags"` 307 } 308 309 // The set of arguments for constructing a Faq resource. 310 type FaqArgs struct { 311 // The description for a FAQ. 312 Description pulumi.StringPtrInput 313 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 314 FileFormat pulumi.StringPtrInput 315 // The identifier of the index for a FAQ. 316 IndexId pulumi.StringInput 317 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 318 LanguageCode pulumi.StringPtrInput 319 // The name that should be associated with the FAQ. 320 Name pulumi.StringPtrInput 321 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 322 RoleArn pulumi.StringInput 323 // The S3 location of the FAQ input data. Detailed below. 324 // 325 // The `s3Path` configuration block supports the following arguments: 326 S3Path FaqS3PathInput 327 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 328 Tags pulumi.StringMapInput 329 } 330 331 func (FaqArgs) ElementType() reflect.Type { 332 return reflect.TypeOf((*faqArgs)(nil)).Elem() 333 } 334 335 type FaqInput interface { 336 pulumi.Input 337 338 ToFaqOutput() FaqOutput 339 ToFaqOutputWithContext(ctx context.Context) FaqOutput 340 } 341 342 func (*Faq) ElementType() reflect.Type { 343 return reflect.TypeOf((**Faq)(nil)).Elem() 344 } 345 346 func (i *Faq) ToFaqOutput() FaqOutput { 347 return i.ToFaqOutputWithContext(context.Background()) 348 } 349 350 func (i *Faq) ToFaqOutputWithContext(ctx context.Context) FaqOutput { 351 return pulumi.ToOutputWithContext(ctx, i).(FaqOutput) 352 } 353 354 // FaqArrayInput is an input type that accepts FaqArray and FaqArrayOutput values. 355 // You can construct a concrete instance of `FaqArrayInput` via: 356 // 357 // FaqArray{ FaqArgs{...} } 358 type FaqArrayInput interface { 359 pulumi.Input 360 361 ToFaqArrayOutput() FaqArrayOutput 362 ToFaqArrayOutputWithContext(context.Context) FaqArrayOutput 363 } 364 365 type FaqArray []FaqInput 366 367 func (FaqArray) ElementType() reflect.Type { 368 return reflect.TypeOf((*[]*Faq)(nil)).Elem() 369 } 370 371 func (i FaqArray) ToFaqArrayOutput() FaqArrayOutput { 372 return i.ToFaqArrayOutputWithContext(context.Background()) 373 } 374 375 func (i FaqArray) ToFaqArrayOutputWithContext(ctx context.Context) FaqArrayOutput { 376 return pulumi.ToOutputWithContext(ctx, i).(FaqArrayOutput) 377 } 378 379 // FaqMapInput is an input type that accepts FaqMap and FaqMapOutput values. 380 // You can construct a concrete instance of `FaqMapInput` via: 381 // 382 // FaqMap{ "key": FaqArgs{...} } 383 type FaqMapInput interface { 384 pulumi.Input 385 386 ToFaqMapOutput() FaqMapOutput 387 ToFaqMapOutputWithContext(context.Context) FaqMapOutput 388 } 389 390 type FaqMap map[string]FaqInput 391 392 func (FaqMap) ElementType() reflect.Type { 393 return reflect.TypeOf((*map[string]*Faq)(nil)).Elem() 394 } 395 396 func (i FaqMap) ToFaqMapOutput() FaqMapOutput { 397 return i.ToFaqMapOutputWithContext(context.Background()) 398 } 399 400 func (i FaqMap) ToFaqMapOutputWithContext(ctx context.Context) FaqMapOutput { 401 return pulumi.ToOutputWithContext(ctx, i).(FaqMapOutput) 402 } 403 404 type FaqOutput struct{ *pulumi.OutputState } 405 406 func (FaqOutput) ElementType() reflect.Type { 407 return reflect.TypeOf((**Faq)(nil)).Elem() 408 } 409 410 func (o FaqOutput) ToFaqOutput() FaqOutput { 411 return o 412 } 413 414 func (o FaqOutput) ToFaqOutputWithContext(ctx context.Context) FaqOutput { 415 return o 416 } 417 418 // ARN of the FAQ. 419 func (o FaqOutput) Arn() pulumi.StringOutput { 420 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 421 } 422 423 // The Unix datetime that the FAQ was created. 424 func (o FaqOutput) CreatedAt() pulumi.StringOutput { 425 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.CreatedAt }).(pulumi.StringOutput) 426 } 427 428 // The description for a FAQ. 429 func (o FaqOutput) Description() pulumi.StringPtrOutput { 430 return o.ApplyT(func(v *Faq) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 431 } 432 433 // When the Status field value is `FAILED`, this contains a message that explains why. 434 func (o FaqOutput) ErrorMessage() pulumi.StringOutput { 435 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.ErrorMessage }).(pulumi.StringOutput) 436 } 437 438 // The identifier of the FAQ. 439 func (o FaqOutput) FaqId() pulumi.StringOutput { 440 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.FaqId }).(pulumi.StringOutput) 441 } 442 443 // The file format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`. 444 func (o FaqOutput) FileFormat() pulumi.StringPtrOutput { 445 return o.ApplyT(func(v *Faq) pulumi.StringPtrOutput { return v.FileFormat }).(pulumi.StringPtrOutput) 446 } 447 448 // The identifier of the index for a FAQ. 449 func (o FaqOutput) IndexId() pulumi.StringOutput { 450 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.IndexId }).(pulumi.StringOutput) 451 } 452 453 // The code for a language. This shows a supported language for the FAQ document. English is supported by default. For more information on supported languages, including their codes, see [Adding documents in languages other than English](https://docs.aws.amazon.com/kendra/latest/dg/in-adding-languages.html). 454 func (o FaqOutput) LanguageCode() pulumi.StringOutput { 455 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.LanguageCode }).(pulumi.StringOutput) 456 } 457 458 // The name that should be associated with the FAQ. 459 func (o FaqOutput) Name() pulumi.StringOutput { 460 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 461 } 462 463 // 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](https://docs.aws.amazon.com/kendra/latest/dg/iam-roles.html). 464 func (o FaqOutput) RoleArn() pulumi.StringOutput { 465 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.RoleArn }).(pulumi.StringOutput) 466 } 467 468 // The S3 location of the FAQ input data. Detailed below. 469 // 470 // The `s3Path` configuration block supports the following arguments: 471 func (o FaqOutput) S3Path() FaqS3PathOutput { 472 return o.ApplyT(func(v *Faq) FaqS3PathOutput { return v.S3Path }).(FaqS3PathOutput) 473 } 474 475 // The status of the FAQ. It is ready to use when the status is ACTIVE. 476 func (o FaqOutput) Status() pulumi.StringOutput { 477 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.Status }).(pulumi.StringOutput) 478 } 479 480 // Key-value map of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 481 func (o FaqOutput) Tags() pulumi.StringMapOutput { 482 return o.ApplyT(func(v *Faq) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 483 } 484 485 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 486 // 487 // Deprecated: Please use `tags` instead. 488 func (o FaqOutput) TagsAll() pulumi.StringMapOutput { 489 return o.ApplyT(func(v *Faq) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 490 } 491 492 // The date and time that the FAQ was last updated. 493 func (o FaqOutput) UpdatedAt() pulumi.StringOutput { 494 return o.ApplyT(func(v *Faq) pulumi.StringOutput { return v.UpdatedAt }).(pulumi.StringOutput) 495 } 496 497 type FaqArrayOutput struct{ *pulumi.OutputState } 498 499 func (FaqArrayOutput) ElementType() reflect.Type { 500 return reflect.TypeOf((*[]*Faq)(nil)).Elem() 501 } 502 503 func (o FaqArrayOutput) ToFaqArrayOutput() FaqArrayOutput { 504 return o 505 } 506 507 func (o FaqArrayOutput) ToFaqArrayOutputWithContext(ctx context.Context) FaqArrayOutput { 508 return o 509 } 510 511 func (o FaqArrayOutput) Index(i pulumi.IntInput) FaqOutput { 512 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Faq { 513 return vs[0].([]*Faq)[vs[1].(int)] 514 }).(FaqOutput) 515 } 516 517 type FaqMapOutput struct{ *pulumi.OutputState } 518 519 func (FaqMapOutput) ElementType() reflect.Type { 520 return reflect.TypeOf((*map[string]*Faq)(nil)).Elem() 521 } 522 523 func (o FaqMapOutput) ToFaqMapOutput() FaqMapOutput { 524 return o 525 } 526 527 func (o FaqMapOutput) ToFaqMapOutputWithContext(ctx context.Context) FaqMapOutput { 528 return o 529 } 530 531 func (o FaqMapOutput) MapIndex(k pulumi.StringInput) FaqOutput { 532 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Faq { 533 return vs[0].(map[string]*Faq)[vs[1].(string)] 534 }).(FaqOutput) 535 } 536 537 func init() { 538 pulumi.RegisterInputType(reflect.TypeOf((*FaqInput)(nil)).Elem(), &Faq{}) 539 pulumi.RegisterInputType(reflect.TypeOf((*FaqArrayInput)(nil)).Elem(), FaqArray{}) 540 pulumi.RegisterInputType(reflect.TypeOf((*FaqMapInput)(nil)).Elem(), FaqMap{}) 541 pulumi.RegisterOutputType(FaqOutput{}) 542 pulumi.RegisterOutputType(FaqArrayOutput{}) 543 pulumi.RegisterOutputType(FaqMapOutput{}) 544 }