Interface ISlackChannelConfigurationProps
Properties for a new Slack channel configuration.
Namespace: Amazon.CDK.AWS.Chatbot
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ISlackChannelConfigurationProps
Syntax (vb)
Public Interface ISlackChannelConfigurationProps
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Chatbot;
Project project;
var target = new SlackChannelConfiguration(this, "MySlackChannel", new SlackChannelConfigurationProps {
SlackChannelConfigurationName = "YOUR_CHANNEL_NAME",
SlackWorkspaceId = "YOUR_SLACK_WORKSPACE_ID",
SlackChannelId = "YOUR_SLACK_CHANNEL_ID"
});
var rule = project.NotifyOnBuildSucceeded("NotifyOnBuildSucceeded", target);
Synopsis
Properties
GuardrailPolicies | A list of IAM managed policies that are applied as channel guardrails. |
LoggingLevel | Specifies the logging level for this configuration. |
LogRetention | The number of days log events are kept in CloudWatch Logs. |
LogRetentionRetryOptions | When log retention is specified, a custom resource attempts to create the CloudWatch log group. |
LogRetentionRole | The IAM role for the Lambda function associated with the custom resource that sets the retention policy. |
NotificationTopics | The SNS topics that deliver notifications to AWS Chatbot. |
Role | The permission role of Slack channel configuration. |
SlackChannelConfigurationName | The name of Slack channel configuration. |
SlackChannelId | The ID of the Slack channel. |
SlackWorkspaceId | The ID of the Slack workspace authorized with AWS Chatbot. |
Properties
GuardrailPolicies
A list of IAM managed policies that are applied as channel guardrails.
virtual IManagedPolicy[] GuardrailPolicies { get; }
Property Value
Remarks
Default: - The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.
LoggingLevel
Specifies the logging level for this configuration.
virtual Nullable<LoggingLevel> LoggingLevel { get; }
Property Value
System.Nullable<LoggingLevel>
Remarks
This property affects the log entries pushed to Amazon CloudWatch Logs.
Default: LoggingLevel.NONE
LogRetention
The number of days log events are kept in CloudWatch Logs.
virtual Nullable<RetentionDays> LogRetention { get; }
Property Value
System.Nullable<RetentionDays>
Remarks
When updating
this property, unsetting it doesn't remove the log retention policy. To
remove the retention policy, set the value to INFINITE
.
Default: logs.RetentionDays.INFINITE
LogRetentionRetryOptions
When log retention is specified, a custom resource attempts to create the CloudWatch log group.
virtual ILogRetentionRetryOptions LogRetentionRetryOptions { get; }
Property Value
Remarks
These options control the retry policy when interacting with CloudWatch APIs.
Default: - Default AWS SDK retry options.
LogRetentionRole
The IAM role for the Lambda function associated with the custom resource that sets the retention policy.
virtual IRole LogRetentionRole { get; }
Property Value
Remarks
Default: - A new role is created.
NotificationTopics
The SNS topics that deliver notifications to AWS Chatbot.
virtual ITopic[] NotificationTopics { get; }
Property Value
ITopic[]
Remarks
Default: None
Role
The permission role of Slack channel configuration.
virtual IRole Role { get; }
Property Value
Remarks
Default: - A role will be created.
SlackChannelConfigurationName
The name of Slack channel configuration.
string SlackChannelConfigurationName { get; }
Property Value
System.String
SlackChannelId
The ID of the Slack channel.
string SlackChannelId { get; }
Property Value
System.String
Remarks
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
The ID of the Slack workspace authorized with AWS Chatbot.
string SlackWorkspaceId { get; }
Property Value
System.String
Remarks
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: https://docs.aws.amazon.com/chatbot/latest/adminguide/setting-up.html#Setup_intro