@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines (151 loc) • 5.93 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Allows the specified Amazon Connect instance to access the specified Amazon Lex (V1) bot. For more information see
* [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html) and [Add an Amazon Lex bot](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-lex.html).
*
* > **NOTE:** This resource only currently supports Amazon Lex (V1) Associations.
*
* ## Example Usage
*
* ### Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = new aws.connect.BotAssociation("example", {
* instanceId: exampleAwsConnectInstance.id,
* lexBot: {
* lexRegion: "us-west-2",
* name: "Test",
* },
* });
* ```
*
* ### Including a sample Lex bot
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const current = aws.getRegion({});
* const example = new aws.lex.Intent("example", {
* createVersion: true,
* name: "connect_lex_intent",
* fulfillmentActivity: {
* type: "ReturnIntent",
* },
* sampleUtterances: ["I would like to pick up flowers."],
* });
* const exampleBot = new aws.lex.Bot("example", {
* abortStatement: {
* messages: [{
* content: "Sorry, I am not able to assist at this time.",
* contentType: "PlainText",
* }],
* },
* clarificationPrompt: {
* maxAttempts: 2,
* messages: [{
* content: "I didn't understand you, what would you like to do?",
* contentType: "PlainText",
* }],
* },
* intents: [{
* intentName: example.name,
* intentVersion: "1",
* }],
* childDirected: false,
* name: "connect_lex_bot",
* processBehavior: "BUILD",
* });
* const exampleBotAssociation = new aws.connect.BotAssociation("example", {
* instanceId: exampleAwsConnectInstance.id,
* lexBot: {
* lexRegion: current.then(current => current.region),
* name: exampleBot.name,
* },
* });
* ```
*
* ## Import
*
* Using `pulumi import`, import `aws_connect_bot_association` using the Amazon Connect instance ID, Lex (V1) bot name, and Lex (V1) bot region separated by colons (`:`). For example:
*
* ```sh
* $ pulumi import aws:connect/botAssociation:BotAssociation example aaaaaaaa-bbbb-cccc-dddd-111111111111:Example:us-west-2
* ```
*/
export declare class BotAssociation extends pulumi.CustomResource {
/**
* Get an existing BotAssociation 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: string, id: pulumi.Input<pulumi.ID>, state?: BotAssociationState, opts?: pulumi.CustomResourceOptions): BotAssociation;
/**
* Returns true if the given object is an instance of BotAssociation. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is BotAssociation;
/**
* The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
*/
readonly instanceId: pulumi.Output<string>;
/**
* Configuration information of an Amazon Lex (V1) bot. Detailed below.
*/
readonly lexBot: pulumi.Output<outputs.connect.BotAssociationLexBot>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
readonly region: pulumi.Output<string>;
/**
* Create a BotAssociation resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: BotAssociationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering BotAssociation resources.
*/
export interface BotAssociationState {
/**
* The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
*/
instanceId?: pulumi.Input<string>;
/**
* Configuration information of an Amazon Lex (V1) bot. Detailed below.
*/
lexBot?: pulumi.Input<inputs.connect.BotAssociationLexBot>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a BotAssociation resource.
*/
export interface BotAssociationArgs {
/**
* The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.
*/
instanceId: pulumi.Input<string>;
/**
* Configuration information of an Amazon Lex (V1) bot. Detailed below.
*/
lexBot: pulumi.Input<inputs.connect.BotAssociationLexBot>;
/**
* Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
*/
region?: pulumi.Input<string>;
}