Resource: awsConnectBotAssociation
Allows the specified Amazon Connect instance to access the specified Amazon Lex (V1) bot. For more information see Amazon Connect: Getting Started and Add an Amazon Lex bot.
\~> NOTE: This resource only currently supports Amazon Lex (V1) Associations.
Example Usage
Basic
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.connectBotAssociation.ConnectBotAssociation(this, "example", {
instanceId: "${aws_connect_instance.example.id}",
lexBot: {
lexRegion: "us-west-2",
name: "Test",
},
});
Including a sample Lex bot
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsLexIntentExample = new aws.lexIntent.LexIntent(this, "example", {
createVersion: true,
fulfillmentActivity: {
type: "ReturnIntent",
},
name: "connect_lex_intent",
sampleUtterances: ["I would like to pick up flowers."],
});
const dataAwsRegionCurrent = new aws.dataAwsRegion.DataAwsRegion(
this,
"current",
{}
);
const awsLexBotExample = new aws.lexBot.LexBot(this, "example_2", {
abortStatement: {
message: [
{
content: "Sorry, I am not able to assist at this time.",
contentType: "PlainText",
},
],
},
childDirected: false,
clarificationPrompt: {
maxAttempts: 2,
message: [
{
content: "I didn't understand you, what would you like to do?",
contentType: "PlainText",
},
],
},
intent: [
{
intentName: awsLexIntentExample.name,
intentVersion: "1",
},
],
name: "connect_lex_bot",
processBehavior: "BUILD",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsLexBotExample.overrideLogicalId("example");
const awsConnectBotAssociationExample =
new aws.connectBotAssociation.ConnectBotAssociation(this, "example_3", {
instanceId: "${aws_connect_instance.example.id}",
lexBot: {
lexRegion: dataAwsRegionCurrent.name,
name: awsLexBotExample.name,
},
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
awsConnectBotAssociationExample.overrideLogicalId("example");
Argument Reference
The following arguments are supported:
instanceId
- (Required) The identifier of the Amazon Connect instance. You can find the instanceId in the ARN of the instance.lexBot
- (Required) Configuration information of an Amazon Lex (V1) bot. Detailed below.
lexBot
The lexBot
configuration block supports the following:
name
- (Required) The name of the Amazon Lex (V1) bot.lexRegion
- (Optional) The Region that the Amazon Lex (V1) bot was created in. Defaults to current region.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- The Amazon Connect instance ID, Lex (V1) bot name, and Lex (V1) bot region separated by colons (:
).
Import
awsConnectBotAssociation
can be imported by using the Amazon Connect instance ID, Lex (V1) bot name, and Lex (V1) bot region separated by colons (:
), e.g.