Faq
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",
},
});
Content copied to clipboard
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",
})
Content copied to clipboard
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" },
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
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,
},
});
Content copied to clipboard
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"],
})
Content copied to clipboard
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,
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
resources:
example:
type: aws:kendra:Faq
properties:
indexId: ${exampleAwsKendraIndex.id}
name: Example
fileFormat: CSV
roleArn: ${exampleAwsIamRole.arn}
s3Path:
bucket: ${exampleAwsS3Bucket.id}
key: ${exampleAwsS3Object.key}
Content copied to clipboard
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,
},
});
Content copied to clipboard
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"],
})
Content copied to clipboard
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,
},
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
resources:
example:
type: aws:kendra:Faq
properties:
indexId: ${exampleAwsKendraIndex.id}
name: Example
languageCode: en
roleArn: ${exampleAwsIamRole.arn}
s3Path:
bucket: ${exampleAwsS3Bucket.id}
key: ${exampleAwsS3Object.key}
Content copied to clipboard
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
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard
When the Status field value is FAILED
, this contains a message that explains why.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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.