

This is the new *Amazon CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [Amazon CloudFormation User Guide](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/Welcome.html).

# AWS::SupportApp::SlackChannelConfiguration
<a name="aws-resource-supportapp-slackchannelconfiguration"></a>

You can use the `AWS::SupportApp::SlackChannelConfiguration` resource to specify your Amazon Web Services account when you configure the Amazon Web Services Support App. This resource includes the following information:
+ The Slack channel name and ID
+ The team ID in Slack
+ The Amazon Resource Name (ARN) of the Amazon Identity and Access Management (IAM) role
+ Whether you want the Amazon Web Services Support App to notify you when your support cases are created, updated, resolved, or reopened
+ The case severity that you want to get notified for

For more information, see the following topics in the *Amazon Web Services Support User Guide*:
+  [Amazon Web Services Support App in Slack](https://docs.amazonaws.cn/awssupport/latest/user/aws-support-app-for-slack.html) 
+  [Creating Amazon Web Services Support App in Slack resources with Amazon CloudFormation](https://docs.amazonaws.cn/awssupport/latest/user/creating-resources-with-cloudformation.html) 

## Syntax
<a name="aws-resource-supportapp-slackchannelconfiguration-syntax"></a>

To declare this entity in your Amazon CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-supportapp-slackchannelconfiguration-syntax.json"></a>

```
{
  "Type" : "AWS::SupportApp::SlackChannelConfiguration",
  "Properties" : {
      "[ChannelId](#cfn-supportapp-slackchannelconfiguration-channelid)" : {{String}},
      "[ChannelName](#cfn-supportapp-slackchannelconfiguration-channelname)" : {{String}},
      "[ChannelRoleArn](#cfn-supportapp-slackchannelconfiguration-channelrolearn)" : {{String}},
      "[NotifyOnAddCorrespondenceToCase](#cfn-supportapp-slackchannelconfiguration-notifyonaddcorrespondencetocase)" : {{Boolean}},
      "[NotifyOnCaseSeverity](#cfn-supportapp-slackchannelconfiguration-notifyoncaseseverity)" : {{String}},
      "[NotifyOnCreateOrReopenCase](#cfn-supportapp-slackchannelconfiguration-notifyoncreateorreopencase)" : {{Boolean}},
      "[NotifyOnResolveCase](#cfn-supportapp-slackchannelconfiguration-notifyonresolvecase)" : {{Boolean}},
      "[TeamId](#cfn-supportapp-slackchannelconfiguration-teamid)" : {{String}}
    }
}
```

### YAML
<a name="aws-resource-supportapp-slackchannelconfiguration-syntax.yaml"></a>

```
Type: AWS::SupportApp::SlackChannelConfiguration
Properties:
  [ChannelId](#cfn-supportapp-slackchannelconfiguration-channelid): {{String}}
  [ChannelName](#cfn-supportapp-slackchannelconfiguration-channelname): {{String}}
  [ChannelRoleArn](#cfn-supportapp-slackchannelconfiguration-channelrolearn): {{String}}
  [NotifyOnAddCorrespondenceToCase](#cfn-supportapp-slackchannelconfiguration-notifyonaddcorrespondencetocase): {{Boolean}}
  [NotifyOnCaseSeverity](#cfn-supportapp-slackchannelconfiguration-notifyoncaseseverity): {{String}}
  [NotifyOnCreateOrReopenCase](#cfn-supportapp-slackchannelconfiguration-notifyoncreateorreopencase): {{Boolean}}
  [NotifyOnResolveCase](#cfn-supportapp-slackchannelconfiguration-notifyonresolvecase): {{Boolean}}
  [TeamId](#cfn-supportapp-slackchannelconfiguration-teamid): {{String}}
```

## Properties
<a name="aws-resource-supportapp-slackchannelconfiguration-properties"></a>

`ChannelId`  <a name="cfn-supportapp-slackchannelconfiguration-channelid"></a>
The channel ID in Slack. This ID identifies a channel within a Slack workspace.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\S+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ChannelName`  <a name="cfn-supportapp-slackchannelconfiguration-channelname"></a>
The channel name in Slack. This is the channel where you invite the Amazon Web Services Support App.  
*Required*: No  
*Type*: String  
*Pattern*: `^.+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ChannelRoleArn`  <a name="cfn-supportapp-slackchannelconfiguration-channelrolearn"></a>
The Amazon Resource Name (ARN) of the IAM role for this Slack channel configuration. The Amazon Web Services Support App uses this role to perform Amazon Web Services Support and Service Quotas actions on your behalf.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^arn:aws[-a-z0-9]*:iam::[0-9]{12}:role\/(.+)$`  
*Minimum*: `31`  
*Maximum*: `2048`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NotifyOnAddCorrespondenceToCase`  <a name="cfn-supportapp-slackchannelconfiguration-notifyonaddcorrespondencetocase"></a>
Whether to get notified when a correspondence is added to your support cases.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NotifyOnCaseSeverity`  <a name="cfn-supportapp-slackchannelconfiguration-notifyoncaseseverity"></a>
The case severity for your support cases that you want to receive notifications. You can specify `none`, `all`, or `high`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `none | all | high`  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NotifyOnCreateOrReopenCase`  <a name="cfn-supportapp-slackchannelconfiguration-notifyoncreateorreopencase"></a>
Whether to get notified when your support cases are created or reopened  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NotifyOnResolveCase`  <a name="cfn-supportapp-slackchannelconfiguration-notifyonresolvecase"></a>
Whether to get notified when your support cases are resolved.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TeamId`  <a name="cfn-supportapp-slackchannelconfiguration-teamid"></a>
The team ID in Slack. This ID uniquely identifies a Slack workspace.  
*Required*: Yes  
*Type*: String  
*Pattern*: `^\S+$`  
*Minimum*: `1`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.amazonaws.cn/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Examples
<a name="aws-resource-supportapp-slackchannelconfiguration--examples"></a>

The following examples can help you create Amazon Web Services Support App resources using CloudFormation.

### Example
<a name="aws-resource-supportapp-slackchannelconfiguration--examples--Example"></a>

Use this template to create a Slack channel configuration and IAM role for your account or your organization. You must replace the Slack workspace and channel IDs.

#### JSON
<a name="aws-resource-supportapp-slackchannelconfiguration--examples--Example--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Example stack to create a Slack channel configuration",
    "Resources": {
        "SlackChannelConfiguration": {
            "Type": "AWS::SupportApp::SlackChannelConfiguration",
            "Properties": {
                "TeamId": "T012ABCDEFG",
                "ChannelId": "C01234A5BCD",
                "ChannelName": "cloudformationtemplatechannel",
                "NotifyOnCreateOrReopenCase": true,
                "NotifyOnAddCorrespondenceToCase": false,
                "NotifyOnResolveCase": true,
                "NotifyOnCaseSeverity": "high",
                "ChannelRoleArn": {"Fn::GetAtt" : ["AWSSupportSlackAppCFNRole", "Arn"] }
            }
        },
        "AWSSupportSlackAppCFNRole": {
            "Type": "AWS::IAM::Role",
            "Properties": {
                "AssumeRolePolicyDocument": {
                    "Version": "2012-10-17"		 	 	 ,
                    "Statement": [
                        {
                            "Effect": "Allow",
                            "Principal": {
                                "Service": [
                                    "supportapp.amazonaws.com"
                                ]
                            },
                            "Action": [
                                "sts:AssumeRole"
                            ]
                        }
                    ]
                },
                "ManagedPolicyArns": [
                    "arn:aws:iam::aws:policy/AWSSupportAppFullAccess"
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-supportapp-slackchannelconfiguration--examples--Example--yaml"></a>

```
AWSTemplateFormatVersion: '2010-09-09'
Description: Example stack to create a Slack channel configuration
Resources:
  SlackChannelConfiguration:
    Type: AWS::SupportApp::SlackChannelConfiguration
    Properties:
      TeamId: T012ABCDEFG
      ChannelId: C01234A5BCD
      ChannelName: cfntemplatechannel
      NotifyOnCreateOrReopenCase: true
      NotifyOnAddCorrespondenceToCase: false
      NotifyOnResolveCase: true
      NotifyOnCaseSeverity: high
      ChannelRoleArn: !GetAtt 'AWSSupportSlackAppCFNRole.Arn'
  AWSSupportSlackAppCFNRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - supportapp.amazonaws.com
            Action:
              - sts:AssumeRole
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AWSSupportAppFullAccess
```