MicrosoftTeamsChannelConfiguration
Source:
src/AWS/Chatbot/MicrosoftTeamsChannelConfiguration.ts
An AWS Chatbot (Amazon Q Developer in chat applications) Microsoft Teams channel configuration that delivers SNS notifications to a Teams channel and lets channel members run read-only or scoped AWS commands.
The Microsoft Teams team must be onboarded to AWS Chatbot beforehand via the console OAuth flow (Chatbot console -> Configure new client -> Microsoft Teams) — team authorization cannot be automated.
Creating Microsoft Teams Channel Configurations
Section titled “Creating Microsoft Teams Channel Configurations”import * as Chatbot from "alchemy/AWS/Chatbot";import { Role } from "alchemy/AWS/IAM/Role";import * as SNS from "alchemy/AWS/SNS";
const topic = yield* SNS.Topic("Alerts", {});const role = yield* Role("ChatbotRole", { assumeRolePolicyDocument: { Version: "2012-10-17", Statement: [ { Effect: "Allow", Principal: { Service: "chatbot.amazonaws.com" }, Action: ["sts:AssumeRole"], }, ], }, managedPolicyArns: ["arn:aws:iam::aws:policy/ReadOnlyAccess"],});
const config = yield* Chatbot.MicrosoftTeamsChannelConfiguration("Alerts", { teamId: "0a1b2c3d-4e5f-1a2b-3c4d-0a1b2c3d4e5f", tenantId: "1a2b3c4d-5e6f-1a2b-3c4d-1a2b3c4d5e6f", teamsChannelId: "19%3ab6ef35dc342d56ba5654e6fc6d25a071%40thread.tacv2", iamRoleArn: role.roleArn, snsTopicArns: [topic.topicArn],});