aws-cdk-lib.aws_chatbot.SlackChannelConfigurationProps

interface SlackChannelConfigurationProps

LanguageType name
.NETAmazon.CDK.AWS.Chatbot.SlackChannelConfigurationProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awschatbot#SlackChannelConfigurationProps
Javasoftware.amazon.awscdk.services.chatbot.SlackChannelConfigurationProps
Pythonaws_cdk.aws_chatbot.SlackChannelConfigurationProps
TypeScript (source)aws-cdk-lib » aws_chatbot » SlackChannelConfigurationProps

Properties for a new Slack channel configuration.

Example

import * as chatbot from 'aws-cdk-lib/aws-chatbot';

declare const project: codebuild.Project;

const target = new chatbot.SlackChannelConfiguration(this, 'MySlackChannel', {
  slackChannelConfigurationName: 'YOUR_CHANNEL_NAME',
  slackWorkspaceId: 'YOUR_SLACK_WORKSPACE_ID',
  slackChannelId: 'YOUR_SLACK_CHANNEL_ID',
});

const rule = project.notifyOnBuildSucceeded('NotifyOnBuildSucceeded', target);

Properties

NameTypeDescription
slackChannelConfigurationNamestringThe name of Slack channel configuration.
slackChannelIdstringThe ID of the Slack channel.
slackWorkspaceIdstringThe ID of the Slack workspace authorized with AWS Chatbot.
guardrailPolicies?IManagedPolicy[]A list of IAM managed policies that are applied as channel guardrails.
logRetention?RetentionDaysThe number of days log events are kept in CloudWatch Logs.
logRetentionRetryOptions?LogRetentionRetryOptionsWhen log retention is specified, a custom resource attempts to create the CloudWatch log group.
logRetentionRole?IRoleThe IAM role for the Lambda function associated with the custom resource that sets the retention policy.
loggingLevel?LoggingLevelSpecifies the logging level for this configuration.
notificationTopics?ITopic[]The SNS topics that deliver notifications to AWS Chatbot.
role?IRoleThe permission role of Slack channel configuration.

slackChannelConfigurationName

Type: string

The name of Slack channel configuration.


slackChannelId

Type: string

The ID of the Slack channel.

To get the ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ.


slackWorkspaceId

Type: string

The ID of the Slack workspace authorized with AWS Chatbot.

To get the workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console. Then you can copy and paste the workspace ID from the console. For more details, see steps 1-4 in Setting Up AWS Chatbot with Slack in the AWS Chatbot User Guide.

See also: https://docs.aws.amazon.com/chatbot/latest/adminguide/setting-up.html#Setup_intro


guardrailPolicies?

Type: IManagedPolicy[] (optional, default: The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.)

A list of IAM managed policies that are applied as channel guardrails.


logRetention?

Type: RetentionDays (optional, default: logs.RetentionDays.INFINITE)

The number of days log events are kept in CloudWatch Logs.

When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to INFINITE.


logRetentionRetryOptions?

Type: LogRetentionRetryOptions (optional, default: Default AWS SDK retry options.)

When log retention is specified, a custom resource attempts to create the CloudWatch log group.

These options control the retry policy when interacting with CloudWatch APIs.


logRetentionRole?

Type: IRole (optional, default: A new role is created.)

The IAM role for the Lambda function associated with the custom resource that sets the retention policy.


loggingLevel?

Type: LoggingLevel (optional, default: LoggingLevel.NONE)

Specifies the logging level for this configuration.

This property affects the log entries pushed to Amazon CloudWatch Logs.


notificationTopics?

Type: ITopic[] (optional, default: None)

The SNS topics that deliver notifications to AWS Chatbot.


role?

Type: IRole (optional, default: A role will be created.)

The permission role of Slack channel configuration.