slack_channel_configurations
Creates, updates, deletes or gets a slack_channel_configuration resource or lists slack_channel_configurations in a region
Overview
| Name | slack_channel_configurations |
| Type | Resource |
| Description | Resource schema for AWS::Chatbot::SlackChannelConfiguration. |
| Id | awscc.chatbot.slack_channel_configurations |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
slack_workspace_id | string | The id of the Slack workspace |
slack_channel_id | string | The id of the Slack channel |
configuration_name | string | The name of the configuration |
iam_role_arn | string | The ARN of the IAM role that defines the permissions for AWS Chatbot |
sns_topic_arns | array | ARNs of SNS topics which delivers notifications to AWS Chatbot, for example CloudWatch alarm notifications. |
logging_level | string | Specifies the logging level for this configuration:ERROR,INFO or NONE. This property affects the log entries pushed to Amazon CloudWatch logs |
arn | string | Amazon Resource Name (ARN) of the configuration |
guardrail_policies | array | 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. |
tags | array | The tags to add to the configuration |
user_role_required | boolean | Enables use of a user role requirement in your chat configuration |
customization_resource_arns | array | ARNs of Custom Actions to associate with notifications in the provided chat channel. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN) of the configuration |
region | string | AWS region. |
For more information, see AWS::Chatbot::SlackChannelConfiguration.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | slack_channel_configurations | INSERT | SlackWorkspaceId, SlackChannelId, ConfigurationName, IamRoleArn, region |
delete_resource | slack_channel_configurations | DELETE | Identifier, region |
update_resource | slack_channel_configurations | UPDATE | Identifier, PatchDocument, region |
list_resources | slack_channel_configurations_list_only | SELECT | region |
get_resource | slack_channel_configurations | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual slack_channel_configuration.
SELECT
region,
slack_workspace_id,
slack_channel_id,
configuration_name,
iam_role_arn,
sns_topic_arns,
logging_level,
arn,
guardrail_policies,
tags,
user_role_required,
customization_resource_arns
FROM awscc.chatbot.slack_channel_configurations
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all slack_channel_configurations in a region.
SELECT
region,
arn
FROM awscc.chatbot.slack_channel_configurations_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new slack_channel_configuration resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.chatbot.slack_channel_configurations (
SlackWorkspaceId,
SlackChannelId,
ConfigurationName,
IamRoleArn,
region
)
SELECT
'{{ slack_workspace_id }}',
'{{ slack_channel_id }}',
'{{ configuration_name }}',
'{{ iam_role_arn }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.chatbot.slack_channel_configurations (
SlackWorkspaceId,
SlackChannelId,
ConfigurationName,
IamRoleArn,
SnsTopicArns,
LoggingLevel,
GuardrailPolicies,
Tags,
UserRoleRequired,
CustomizationResourceArns,
region
)
SELECT
'{{ slack_workspace_id }}',
'{{ slack_channel_id }}',
'{{ configuration_name }}',
'{{ iam_role_arn }}',
'{{ sns_topic_arns }}',
'{{ logging_level }}',
'{{ guardrail_policies }}',
'{{ tags }}',
'{{ user_role_required }}',
'{{ customization_resource_arns }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: slack_channel_configuration
props:
- name: slack_workspace_id
value: '{{ slack_workspace_id }}'
- name: slack_channel_id
value: '{{ slack_channel_id }}'
- name: configuration_name
value: '{{ configuration_name }}'
- name: iam_role_arn
value: '{{ iam_role_arn }}'
- name: sns_topic_arns
value:
- '{{ sns_topic_arns[0] }}'
- name: logging_level
value: '{{ logging_level }}'
- name: guardrail_policies
value:
- '{{ guardrail_policies[0] }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
- name: user_role_required
value: '{{ user_role_required }}'
- name: customization_resource_arns
value:
- '{{ customization_resource_arns[0] }}'
UPDATE example
Use the following StackQL query and manifest file to update a slack_channel_configuration resource, using stack-deploy.
/*+ update */
UPDATE awscc.chatbot.slack_channel_configurations
SET PatchDocument = string('{{ {
"SlackChannelId": slack_channel_id,
"IamRoleArn": iam_role_arn,
"SnsTopicArns": sns_topic_arns,
"LoggingLevel": logging_level,
"GuardrailPolicies": guardrail_policies,
"Tags": tags,
"UserRoleRequired": user_role_required,
"CustomizationResourceArns": customization_resource_arns
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}';
DELETE example
/*+ delete */
DELETE FROM awscc.chatbot.slack_channel_configurations
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1';
Permissions
To operate on the slack_channel_configurations resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
chatbot:CreateSlackChannelConfiguration,
chatbot:TagResource,
chatbot:AssociateToConfiguration,
chatbot:ListAssociations,
iam:PassRole,
iam:CreateServiceLinkedRole
chatbot:DescribeSlackChannelConfigurations,
chatbot:ListAssociations
chatbot:UpdateSlackChannelConfiguration,
chatbot:TagResource,
chatbot:UntagResource,
chatbot:ListTagsForResource,
chatbot:AssociateToConfiguration,
chatbot:DisassociateFromConfiguration,
chatbot:ListAssociations,
iam:PassRole
chatbot:DeleteSlackChannelConfiguration,
chatbot:DisassociateFromConfiguration,
chatbot:ListAssociations
chatbot:DescribeSlackChannelConfigurations,
chatbot:ListAssociations