AWS::Chatbot::SlackChannelConfiguration
The AWS::Chatbot::SlackChannelConfiguration
resource configures a Slack channel to allow users to use AWS Chatbot with AWS CloudFormation templates.
This resource requires some setup to be done in the AWS Chatbot console. To provide the required Slack workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console, then copy and paste the workspace ID from the console. For more details, see Configure a Slack client in the AWS Chatbot User Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::Chatbot::SlackChannelConfiguration", "Properties" : { "ConfigurationName" :
String
, "CustomizationResourceArns" :[ String, ... ]
, "GuardrailPolicies" :[ String, ... ]
, "IamRoleArn" :String
, "LoggingLevel" :String
, "SlackChannelId" :String
, "SlackWorkspaceId" :String
, "SnsTopicArns" :[ String, ... ]
, "Tags" :[ Tag, ... ]
, "UserRoleRequired" :Boolean
} }
YAML
Type: AWS::Chatbot::SlackChannelConfiguration Properties: ConfigurationName:
String
CustomizationResourceArns:- String
GuardrailPolicies:- String
IamRoleArn:String
LoggingLevel:String
SlackChannelId:String
SlackWorkspaceId:String
SnsTopicArns:- String
Tags:- Tag
UserRoleRequired:Boolean
Properties
ConfigurationName
-
The name of the configuration.
Required: Yes
Type: String
Pattern:
^[A-Za-z0-9-_]+$
Minimum:
1
Maximum:
128
Update requires: Replacement
CustomizationResourceArns
-
Links a list of resource ARNs (for example, custom action ARNs) to a Slack channel configuration for AWS Chatbot.
Required: No
Type: Array of String
Update requires: No interruption
GuardrailPolicies
-
The list of IAM policy ARNs that are applied as channel guardrails. The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.
Required: No
Type: Array of String
Update requires: No interruption
IamRoleArn
-
The ARN of the IAM role that defines the permissions for AWS Chatbot.
This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot.
Required: Yes
Type: String
Pattern:
^arn:(aws[a-zA-Z-]*)?:[A-Za-z0-9][A-Za-z0-9_/.-]{0,62}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9_/.-]{0,63}:[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,1023}$
Update requires: No interruption
LoggingLevel
-
Specifies the logging level for this configuration. This property affects the log entries pushed to Amazon CloudWatch Logs.
Logging levels include
ERROR
,INFO
, orNONE
.Required: No
Type: String
Pattern:
^(ERROR|INFO|NONE)$
Update requires: No interruption
SlackChannelId
-
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 character string at the end of the URL. For example,
ABCBBLZZZ
.Required: Yes
Type: String
Pattern:
^[A-Za-z0-9]+$
Minimum:
1
Maximum:
256
Update requires: No interruption
SlackWorkspaceId
-
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-3 in Tutorial: Get started with Slack in the AWS Chatbot User Guide.
Required: Yes
Type: String
Pattern:
^[0-9A-Z]{1,255}$
Minimum:
1
Maximum:
256
Update requires: Replacement
SnsTopicArns
-
The ARNs of the SNS topics that deliver notifications to AWS Chatbot.
Required: No
Type: Array of String
Update requires: No interruption
-
The tags to add to the configuration.
Required: No
Type: Array of Tag
Update requires: No interruption
UserRoleRequired
-
Enables use of a user role requirement in your chat configuration.
Required: No
Type: Boolean
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the ARN of the configuration created.
Fn::GetAtt
Arn
-
The ARN of the resource.
Remarks
Common troubleshooting scenarios:
-
I don't have a workspace ID.
If you don't have a workspace ID, you must perform the initial authorization flow in the AWS Chatbot console. Then you will be able to 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.
-
I have already done the initial authorization for my workspace. Do I need to do it again?
No, you can use your existing workspace. You must log into the AWS Chatbot console to get the workspace ID.