UNPKG

@pulumi/aws

Version:

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

111 lines 4.82 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.QuerySuggestionsBlockList = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use the `awsKendraIndexBlockList` resource to manage an AWS Kendra block list used for query suggestions for an index. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.kendra.QuerySuggestionsBlockList("example", { * indexId: exampleAwsKendraIndex.id, * name: "Example", * roleArn: exampleAwsIamRole.arn, * sourceS3Path: { * bucket: exampleAwsS3Bucket.id, * key: "example/suggestions.txt", * }, * tags: { * Name: "Example Kendra Index", * }, * }); * ``` * * ## Import * * Using `pulumi import`, import the `aws_kendra_query_suggestions_block_list` resource using the unique identifiers of the block list and index separated by a slash (`/`). For example: * * ```sh * $ pulumi import aws:kendra/querySuggestionsBlockList:QuerySuggestionsBlockList example blocklist-123456780/idx-8012925589 * ``` */ class QuerySuggestionsBlockList extends pulumi.CustomResource { /** * Get an existing QuerySuggestionsBlockList 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 QuerySuggestionsBlockList(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of QuerySuggestionsBlockList. 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'] === QuerySuggestionsBlockList.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["arn"] = state?.arn; resourceInputs["description"] = state?.description; resourceInputs["indexId"] = state?.indexId; resourceInputs["name"] = state?.name; resourceInputs["querySuggestionsBlockListId"] = state?.querySuggestionsBlockListId; resourceInputs["region"] = state?.region; resourceInputs["roleArn"] = state?.roleArn; resourceInputs["sourceS3Path"] = state?.sourceS3Path; resourceInputs["status"] = state?.status; resourceInputs["tags"] = state?.tags; resourceInputs["tagsAll"] = state?.tagsAll; } 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?.sourceS3Path === undefined && !opts.urn) { throw new Error("Missing required property 'sourceS3Path'"); } resourceInputs["description"] = args?.description; resourceInputs["indexId"] = args?.indexId; resourceInputs["name"] = args?.name; resourceInputs["region"] = args?.region; resourceInputs["roleArn"] = args?.roleArn; resourceInputs["sourceS3Path"] = args?.sourceS3Path; resourceInputs["tags"] = args?.tags; resourceInputs["arn"] = undefined /*out*/; resourceInputs["querySuggestionsBlockListId"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["tagsAll"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(QuerySuggestionsBlockList.__pulumiType, name, resourceInputs, opts); } } exports.QuerySuggestionsBlockList = QuerySuggestionsBlockList; /** @internal */ QuerySuggestionsBlockList.__pulumiType = 'aws:kendra/querySuggestionsBlockList:QuerySuggestionsBlockList'; //# sourceMappingURL=querySuggestionsBlockList.js.map