Faq

class Faq : KotlinCustomResource

Resource for managing an AWS Kendra FAQ.

Example Usage

Basic

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.kendra.Faq("example", {
indexId: exampleAwsKendraIndex.id,
name: "Example",
roleArn: exampleAwsIamRole.arn,
s3Path: {
bucket: exampleAwsS3Bucket.id,
key: exampleAwsS3Object.key,
},
tags: {
Name: "Example Kendra Faq",
},
});
import pulumi
import pulumi_aws as aws
example = aws.kendra.Faq("example",
index_id=example_aws_kendra_index["id"],
name="Example",
role_arn=example_aws_iam_role["arn"],
s3_path={
"bucket": example_aws_s3_bucket["id"],
"key": example_aws_s3_object["key"],
},
tags={
"Name": "Example Kendra Faq",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Kendra.Faq("example", new()
{
IndexId = exampleAwsKendraIndex.Id,
Name = "Example",
RoleArn = exampleAwsIamRole.Arn,
S3Path = new Aws.Kendra.Inputs.FaqS3PathArgs
{
Bucket = exampleAwsS3Bucket.Id,
Key = exampleAwsS3Object.Key,
},
Tags =
{
{ "Name", "Example Kendra Faq" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kendra.NewFaq(ctx, "example", &kendra.FaqArgs{
IndexId: pulumi.Any(exampleAwsKendraIndex.Id),
Name: pulumi.String("Example"),
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
S3Path: &kendra.FaqS3PathArgs{
Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
Key: pulumi.Any(exampleAwsS3Object.Key),
},
Tags: pulumi.StringMap{
"Name": pulumi.String("Example Kendra Faq"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kendra.Faq;
import com.pulumi.aws.kendra.FaqArgs;
import com.pulumi.aws.kendra.inputs.FaqS3PathArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Faq("example", FaqArgs.builder()
.indexId(exampleAwsKendraIndex.id())
.name("Example")
.roleArn(exampleAwsIamRole.arn())
.s3Path(FaqS3PathArgs.builder()
.bucket(exampleAwsS3Bucket.id())
.key(exampleAwsS3Object.key())
.build())
.tags(Map.of("Name", "Example Kendra Faq"))
.build());
}
}
resources:
example:
type: aws:kendra:Faq
properties:
indexId: ${exampleAwsKendraIndex.id}
name: Example
roleArn: ${exampleAwsIamRole.arn}
s3Path:
bucket: ${exampleAwsS3Bucket.id}
key: ${exampleAwsS3Object.key}
tags:
Name: Example Kendra Faq

With File Format

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.kendra.Faq("example", {
indexId: exampleAwsKendraIndex.id,
name: "Example",
fileFormat: "CSV",
roleArn: exampleAwsIamRole.arn,
s3Path: {
bucket: exampleAwsS3Bucket.id,
key: exampleAwsS3Object.key,
},
});
import pulumi
import pulumi_aws as aws
example = aws.kendra.Faq("example",
index_id=example_aws_kendra_index["id"],
name="Example",
file_format="CSV",
role_arn=example_aws_iam_role["arn"],
s3_path={
"bucket": example_aws_s3_bucket["id"],
"key": example_aws_s3_object["key"],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Kendra.Faq("example", new()
{
IndexId = exampleAwsKendraIndex.Id,
Name = "Example",
FileFormat = "CSV",
RoleArn = exampleAwsIamRole.Arn,
S3Path = new Aws.Kendra.Inputs.FaqS3PathArgs
{
Bucket = exampleAwsS3Bucket.Id,
Key = exampleAwsS3Object.Key,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kendra.NewFaq(ctx, "example", &kendra.FaqArgs{
IndexId: pulumi.Any(exampleAwsKendraIndex.Id),
Name: pulumi.String("Example"),
FileFormat: pulumi.String("CSV"),
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
S3Path: &kendra.FaqS3PathArgs{
Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
Key: pulumi.Any(exampleAwsS3Object.Key),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kendra.Faq;
import com.pulumi.aws.kendra.FaqArgs;
import com.pulumi.aws.kendra.inputs.FaqS3PathArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Faq("example", FaqArgs.builder()
.indexId(exampleAwsKendraIndex.id())
.name("Example")
.fileFormat("CSV")
.roleArn(exampleAwsIamRole.arn())
.s3Path(FaqS3PathArgs.builder()
.bucket(exampleAwsS3Bucket.id())
.key(exampleAwsS3Object.key())
.build())
.build());
}
}
resources:
example:
type: aws:kendra:Faq
properties:
indexId: ${exampleAwsKendraIndex.id}
name: Example
fileFormat: CSV
roleArn: ${exampleAwsIamRole.arn}
s3Path:
bucket: ${exampleAwsS3Bucket.id}
key: ${exampleAwsS3Object.key}

With Language Code

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.kendra.Faq("example", {
indexId: exampleAwsKendraIndex.id,
name: "Example",
languageCode: "en",
roleArn: exampleAwsIamRole.arn,
s3Path: {
bucket: exampleAwsS3Bucket.id,
key: exampleAwsS3Object.key,
},
});
import pulumi
import pulumi_aws as aws
example = aws.kendra.Faq("example",
index_id=example_aws_kendra_index["id"],
name="Example",
language_code="en",
role_arn=example_aws_iam_role["arn"],
s3_path={
"bucket": example_aws_s3_bucket["id"],
"key": example_aws_s3_object["key"],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Kendra.Faq("example", new()
{
IndexId = exampleAwsKendraIndex.Id,
Name = "Example",
LanguageCode = "en",
RoleArn = exampleAwsIamRole.Arn,
S3Path = new Aws.Kendra.Inputs.FaqS3PathArgs
{
Bucket = exampleAwsS3Bucket.Id,
Key = exampleAwsS3Object.Key,
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/kendra"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kendra.NewFaq(ctx, "example", &kendra.FaqArgs{
IndexId: pulumi.Any(exampleAwsKendraIndex.Id),
Name: pulumi.String("Example"),
LanguageCode: pulumi.String("en"),
RoleArn: pulumi.Any(exampleAwsIamRole.Arn),
S3Path: &kendra.FaqS3PathArgs{
Bucket: pulumi.Any(exampleAwsS3Bucket.Id),
Key: pulumi.Any(exampleAwsS3Object.Key),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kendra.Faq;
import com.pulumi.aws.kendra.FaqArgs;
import com.pulumi.aws.kendra.inputs.FaqS3PathArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Faq("example", FaqArgs.builder()
.indexId(exampleAwsKendraIndex.id())
.name("Example")
.languageCode("en")
.roleArn(exampleAwsIamRole.arn())
.s3Path(FaqS3PathArgs.builder()
.bucket(exampleAwsS3Bucket.id())
.key(exampleAwsS3Object.key())
.build())
.build());
}
}
resources:
example:
type: aws:kendra:Faq
properties:
indexId: ${exampleAwsKendraIndex.id}
name: Example
languageCode: en
roleArn: ${exampleAwsIamRole.arn}
s3Path:
bucket: ${exampleAwsS3Bucket.id}
key: ${exampleAwsS3Object.key}

Import

Using pulumi import, import aws_kendra_faq using the unique identifiers of the FAQ and index separated by a slash (/). For example:

$ pulumi import aws:kendra/faq:Faq example faq-123456780/idx-8012925589

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the FAQ.

Link copied to clipboard
val createdAt: Output<String>

The Unix datetime that the FAQ was created.

Link copied to clipboard
val description: Output<String>?
Link copied to clipboard
val errorMessage: Output<String>

When the Status field value is FAILED, this contains a message that explains why.

Link copied to clipboard
val faqId: Output<String>

The identifier of the FAQ.

Link copied to clipboard
val fileFormat: Output<String>?
Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val indexId: Output<String>

The identifier of the index for a FAQ.

Link copied to clipboard
val languageCode: Output<String>
Link copied to clipboard
val name: Output<String>

The name that should be associated with the FAQ.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val roleArn: Output<String>

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.

Link copied to clipboard
val s3Path: Output<FaqS3Path>

The S3 location of the FAQ input data. Detailed below.

Link copied to clipboard
val status: Output<String>

The status of the FAQ. It is ready to use when the status is ACTIVE.

Link copied to clipboard
val tags: Output<Map<String, String>>?
Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val updatedAt: Output<String>

The date and time that the FAQ was last updated.

Link copied to clipboard
val urn: Output<String>