Association
Source:
src/AWS/Chatbot/Association.ts
An AWS Chatbot (Amazon Q Developer in chat applications) association that
links a resource — a CustomAction — to a Slack or Microsoft Teams
channel configuration so the action is available in that channel.
Associating Custom Actions
Section titled “Associating Custom Actions”import * as Chatbot from "alchemy/AWS/Chatbot";
const action = yield* Chatbot.CustomAction("DescribeAlarm", { commandText: "aws cloudwatch describe-alarms --alarm-names $AlarmName",});
const config = yield* Chatbot.SlackChannelConfiguration("Alerts", { slackTeamId: "T012ABCDEFG", slackChannelId: "C012AB3CD", iamRoleArn: role.roleArn,});
const association = yield* Chatbot.Association("AlarmAction", { chatConfiguration: config.chatConfigurationArn, resource: action.customActionArn,});