github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/kendra/getFaq.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  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    11  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    12  )
    13  
    14  // Provides details about a specific Amazon Kendra Faq.
    15  //
    16  // ## Example Usage
    17  //
    18  // <!--Start PulumiCodeChooser -->
    19  // ```go
    20  // package main
    21  //
    22  // import (
    23  //
    24  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra"
    25  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    26  //
    27  // )
    28  //
    29  //	func main() {
    30  //		pulumi.Run(func(ctx *pulumi.Context) error {
    31  //			_, err := kendra.LookupFaq(ctx, &kendra.LookupFaqArgs{
    32  //				FaqId:   "87654321-1234-4321-4321-321987654321",
    33  //				IndexId: "12345678-1234-1234-1234-123456789123",
    34  //			}, nil)
    35  //			if err != nil {
    36  //				return err
    37  //			}
    38  //			return nil
    39  //		})
    40  //	}
    41  //
    42  // ```
    43  // <!--End PulumiCodeChooser -->
    44  func LookupFaq(ctx *pulumi.Context, args *LookupFaqArgs, opts ...pulumi.InvokeOption) (*LookupFaqResult, error) {
    45  	opts = internal.PkgInvokeDefaultOpts(opts)
    46  	var rv LookupFaqResult
    47  	err := ctx.Invoke("aws:kendra/getFaq:getFaq", args, &rv, opts...)
    48  	if err != nil {
    49  		return nil, err
    50  	}
    51  	return &rv, nil
    52  }
    53  
    54  // A collection of arguments for invoking getFaq.
    55  type LookupFaqArgs struct {
    56  	// Identifier of the FAQ.
    57  	FaqId string `pulumi:"faqId"`
    58  	// Identifier of the index that contains the FAQ.
    59  	IndexId string `pulumi:"indexId"`
    60  	// Metadata that helps organize the FAQs you create.
    61  	Tags map[string]string `pulumi:"tags"`
    62  }
    63  
    64  // A collection of values returned by getFaq.
    65  type LookupFaqResult struct {
    66  	// ARN of the FAQ.
    67  	Arn string `pulumi:"arn"`
    68  	// Unix datetime that the faq was created.
    69  	CreatedAt string `pulumi:"createdAt"`
    70  	// Description of the FAQ.
    71  	Description string `pulumi:"description"`
    72  	// When the `status` field value is `FAILED`, this contains a message that explains why.
    73  	ErrorMessage string `pulumi:"errorMessage"`
    74  	FaqId        string `pulumi:"faqId"`
    75  	// File format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`.
    76  	FileFormat string `pulumi:"fileFormat"`
    77  	// The provider-assigned unique ID for this managed resource.
    78  	Id      string `pulumi:"id"`
    79  	IndexId string `pulumi:"indexId"`
    80  	// Code for a language. This shows a supported language for the FAQ document. 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).
    81  	LanguageCode string `pulumi:"languageCode"`
    82  	// Name of the FAQ.
    83  	Name string `pulumi:"name"`
    84  	// 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).
    85  	RoleArn string `pulumi:"roleArn"`
    86  	// S3 location of the FAQ input data. Detailed below.
    87  	S3Paths []GetFaqS3Path `pulumi:"s3Paths"`
    88  	// Status of the FAQ. It is ready to use when the status is ACTIVE.
    89  	Status string `pulumi:"status"`
    90  	// Metadata that helps organize the FAQs you create.
    91  	Tags map[string]string `pulumi:"tags"`
    92  	// Date and time that the FAQ was last updated.
    93  	UpdatedAt string `pulumi:"updatedAt"`
    94  }
    95  
    96  func LookupFaqOutput(ctx *pulumi.Context, args LookupFaqOutputArgs, opts ...pulumi.InvokeOption) LookupFaqResultOutput {
    97  	return pulumi.ToOutputWithContext(context.Background(), args).
    98  		ApplyT(func(v interface{}) (LookupFaqResult, error) {
    99  			args := v.(LookupFaqArgs)
   100  			r, err := LookupFaq(ctx, &args, opts...)
   101  			var s LookupFaqResult
   102  			if r != nil {
   103  				s = *r
   104  			}
   105  			return s, err
   106  		}).(LookupFaqResultOutput)
   107  }
   108  
   109  // A collection of arguments for invoking getFaq.
   110  type LookupFaqOutputArgs struct {
   111  	// Identifier of the FAQ.
   112  	FaqId pulumi.StringInput `pulumi:"faqId"`
   113  	// Identifier of the index that contains the FAQ.
   114  	IndexId pulumi.StringInput `pulumi:"indexId"`
   115  	// Metadata that helps organize the FAQs you create.
   116  	Tags pulumi.StringMapInput `pulumi:"tags"`
   117  }
   118  
   119  func (LookupFaqOutputArgs) ElementType() reflect.Type {
   120  	return reflect.TypeOf((*LookupFaqArgs)(nil)).Elem()
   121  }
   122  
   123  // A collection of values returned by getFaq.
   124  type LookupFaqResultOutput struct{ *pulumi.OutputState }
   125  
   126  func (LookupFaqResultOutput) ElementType() reflect.Type {
   127  	return reflect.TypeOf((*LookupFaqResult)(nil)).Elem()
   128  }
   129  
   130  func (o LookupFaqResultOutput) ToLookupFaqResultOutput() LookupFaqResultOutput {
   131  	return o
   132  }
   133  
   134  func (o LookupFaqResultOutput) ToLookupFaqResultOutputWithContext(ctx context.Context) LookupFaqResultOutput {
   135  	return o
   136  }
   137  
   138  // ARN of the FAQ.
   139  func (o LookupFaqResultOutput) Arn() pulumi.StringOutput {
   140  	return o.ApplyT(func(v LookupFaqResult) string { return v.Arn }).(pulumi.StringOutput)
   141  }
   142  
   143  // Unix datetime that the faq was created.
   144  func (o LookupFaqResultOutput) CreatedAt() pulumi.StringOutput {
   145  	return o.ApplyT(func(v LookupFaqResult) string { return v.CreatedAt }).(pulumi.StringOutput)
   146  }
   147  
   148  // Description of the FAQ.
   149  func (o LookupFaqResultOutput) Description() pulumi.StringOutput {
   150  	return o.ApplyT(func(v LookupFaqResult) string { return v.Description }).(pulumi.StringOutput)
   151  }
   152  
   153  // When the `status` field value is `FAILED`, this contains a message that explains why.
   154  func (o LookupFaqResultOutput) ErrorMessage() pulumi.StringOutput {
   155  	return o.ApplyT(func(v LookupFaqResult) string { return v.ErrorMessage }).(pulumi.StringOutput)
   156  }
   157  
   158  func (o LookupFaqResultOutput) FaqId() pulumi.StringOutput {
   159  	return o.ApplyT(func(v LookupFaqResult) string { return v.FaqId }).(pulumi.StringOutput)
   160  }
   161  
   162  // File format used by the input files for the FAQ. Valid Values are `CSV`, `CSV_WITH_HEADER`, `JSON`.
   163  func (o LookupFaqResultOutput) FileFormat() pulumi.StringOutput {
   164  	return o.ApplyT(func(v LookupFaqResult) string { return v.FileFormat }).(pulumi.StringOutput)
   165  }
   166  
   167  // The provider-assigned unique ID for this managed resource.
   168  func (o LookupFaqResultOutput) Id() pulumi.StringOutput {
   169  	return o.ApplyT(func(v LookupFaqResult) string { return v.Id }).(pulumi.StringOutput)
   170  }
   171  
   172  func (o LookupFaqResultOutput) IndexId() pulumi.StringOutput {
   173  	return o.ApplyT(func(v LookupFaqResult) string { return v.IndexId }).(pulumi.StringOutput)
   174  }
   175  
   176  // Code for a language. This shows a supported language for the FAQ document. 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).
   177  func (o LookupFaqResultOutput) LanguageCode() pulumi.StringOutput {
   178  	return o.ApplyT(func(v LookupFaqResult) string { return v.LanguageCode }).(pulumi.StringOutput)
   179  }
   180  
   181  // Name of the FAQ.
   182  func (o LookupFaqResultOutput) Name() pulumi.StringOutput {
   183  	return o.ApplyT(func(v LookupFaqResult) string { return v.Name }).(pulumi.StringOutput)
   184  }
   185  
   186  // 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).
   187  func (o LookupFaqResultOutput) RoleArn() pulumi.StringOutput {
   188  	return o.ApplyT(func(v LookupFaqResult) string { return v.RoleArn }).(pulumi.StringOutput)
   189  }
   190  
   191  // S3 location of the FAQ input data. Detailed below.
   192  func (o LookupFaqResultOutput) S3Paths() GetFaqS3PathArrayOutput {
   193  	return o.ApplyT(func(v LookupFaqResult) []GetFaqS3Path { return v.S3Paths }).(GetFaqS3PathArrayOutput)
   194  }
   195  
   196  // Status of the FAQ. It is ready to use when the status is ACTIVE.
   197  func (o LookupFaqResultOutput) Status() pulumi.StringOutput {
   198  	return o.ApplyT(func(v LookupFaqResult) string { return v.Status }).(pulumi.StringOutput)
   199  }
   200  
   201  // Metadata that helps organize the FAQs you create.
   202  func (o LookupFaqResultOutput) Tags() pulumi.StringMapOutput {
   203  	return o.ApplyT(func(v LookupFaqResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
   204  }
   205  
   206  // Date and time that the FAQ was last updated.
   207  func (o LookupFaqResultOutput) UpdatedAt() pulumi.StringOutput {
   208  	return o.ApplyT(func(v LookupFaqResult) string { return v.UpdatedAt }).(pulumi.StringOutput)
   209  }
   210  
   211  func init() {
   212  	pulumi.RegisterOutputType(LookupFaqResultOutput{})
   213  }