UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

157 lines 5.72 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.Faq = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Resource for managing an AWS Kendra FAQ. * * ## Example Usage * * ### Basic * * ```typescript * 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", * }, * }); * ``` * * ### With File Format * * ```typescript * 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, * }, * }); * ``` * * ### With Language Code * * ```typescript * 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 * * Using `pulumi import`, import `aws_kendra_faq` using the unique identifiers of the FAQ and index separated by a slash (`/`). For example: * * ```sh * $ pulumi import aws:kendra/faq:Faq example faq-123456780/idx-8012925589 * ``` */ class Faq extends pulumi.CustomResource { /** * Get an existing Faq resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new Faq(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of Faq. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Faq.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["createdAt"] = state?.createdAt; resourceInputs["description"] = state?.description; resourceInputs["errorMessage"] = state?.errorMessage; resourceInputs["faqId"] = state?.faqId; resourceInputs["fileFormat"] = state?.fileFormat; resourceInputs["indexId"] = state?.indexId; resourceInputs["languageCode"] = state?.languageCode; resourceInputs["name"] = state?.name; resourceInputs["region"] = state?.region; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["s3Path"] = state?.s3Path; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; resourceInputs["updatedAt"] = state?.updatedAt; } else { const args = argsOrState; if (args?.indexId === undefined && !opts.urn) { throw new Error("Missing required property 'indexId'"); } if (args?.roleArn === undefined && !opts.urn) { throw new Error("Missing required property 'roleArn'"); } if (args?.s3Path === undefined && !opts.urn) { throw new Error("Missing required property 's3Path'"); } resourceInputs["description"] = args?.description; resourceInputs["fileFormat"] = args?.fileFormat; resourceInputs["indexId"] = args?.indexId; resourceInputs["languageCode"] = args?.languageCode; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["roleArn"] = args?.roleArn; resourceInputs["s3Path"] = args?.s3Path; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["createdAt"] = undefined /*out*/; resourceInputs["errorMessage"] = undefined /*out*/; resourceInputs["faqId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; resourceInputs["updatedAt"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Faq.__pulumiType, name, resourceInputs, opts); } } exports.Faq = Faq; /** @internal */ Faq.__pulumiType = 'aws:kendra/faq:Faq'; //# sourceMappingURL=faq.js.map