UNPKG

@cdkx/aws-sns-subscriptions

Version:

AWS SNS extended subscriptions

43 lines (42 loc) 1.42 kB
/// <amd-module name="@cdkx/aws-sns-subscriptions/subscriptions/slack-subscription" /> import { ITopic, ITopicSubscription, TopicSubscriptionConfig, SubscriptionFilter } from '@aws-cdk/aws-sns'; export interface ISlackConfigParam { /** * @default channel Id will be resolved from given channel name */ channelId?: string; channelName: string; /** * @default public_channel */ channelTypes?: string; authToken: string; } /** * @param channelName Channel to send notification to * @param filterPolicy Optional filter policy to apply on sns target */ export interface ISlackSubscriptionProps { /** * @default - channel Id will be resolved from given channel name */ channelId?: string; channelName: string; filterPolicy?: { [key: string]: SubscriptionFilter; }; } /** * @summary Configures required resources to enable sns -> slack notifications. * Supplied Auth token must have at least "chat:write:bot" scope. When channel id is not provided, * additional "channels:read", "groups:read", "im:read", "mpim:read" scopes are required. * @see https://api.slack.com/scopes * */ export declare class SlackSubscription implements ITopicSubscription { private props; constructor(props: ISlackSubscriptionProps); bind(topic: ITopic): TopicSubscriptionConfig; private _resolveScopeFromTopic; private _getHandlerEntryPath; }