package
2.166.0
Repository: https://github.com/aws/aws-cdk-go.git
Documentation: pkg.go.dev

# README

AWS::Chatbot Construct Library

AWS Chatbot is an AWS service that enables DevOps and software development teams to use Slack chat rooms to monitor and respond to operational events in their AWS Cloud. AWS Chatbot processes AWS service notifications from Amazon Simple Notification Service (Amazon SNS), and forwards them to Slack chat rooms so teams can analyze and act on them immediately, regardless of location.

This module is part of the AWS Cloud Development Kit project.

import chatbot "github.com/aws/aws-cdk-go/awscdk"
import sns "github.com/aws/aws-cdk-go/awscdk"
import "github.com/aws/aws-cdk-go/awscdk"


slackChannel := chatbot.NewSlackChannelConfiguration(this, jsii.String("MySlackChannel"), &SlackChannelConfigurationProps{
	SlackChannelConfigurationName: jsii.String("YOUR_CHANNEL_NAME"),
	SlackWorkspaceId: jsii.String("YOUR_SLACK_WORKSPACE_ID"),
	SlackChannelId: jsii.String("YOUR_SLACK_CHANNEL_ID"),
})

slackChannel.addToRolePolicy(iam.NewPolicyStatement(&PolicyStatementProps{
	Effect: iam.Effect_ALLOW,
	Actions: []*string{
		jsii.String("s3:GetObject"),
	},
	Resources: []*string{
		jsii.String("arn:aws:s3:::abc/xyz/123.txt"),
	},
}))

slackChannel.AddNotificationTopic(sns.NewTopic(this, jsii.String("MyTopic")))

Log Group

Slack channel configuration automatically create a log group with the name /aws/chatbot/<configuration-name> in us-east-1 upon first execution with log data set to never expire.

The logRetention property can be used to set a different expiration period. A log group will be created if not already exists. If the log group already exists, it's expiration will be configured to the value specified in this construct (never expire, by default).

By default, CDK uses the AWS SDK retry options when interacting with the log group. The logRetentionRetryOptions property allows you to customize the maximum number of retries and base backoff duration.

Note that, if logRetention is set, a CloudFormation custom resource is added to the stack that pre-creates the log group as part of the stack deployment, if it already doesn't exist, and sets the correct log retention period (never expire, by default).

Guardrails

By default slack channel will use AdministratorAccess managed policy as guardrail policy. The guardrailPolicies property can be used to set a different set of managed policies.

User Role Requirement

Administrators can require user roles for all current channel members and channels and all channels created in the future by enabling a user role requirement.

You can configure this feature by setting the userRoleRequired property.

import chatbot "github.com/aws/aws-cdk-go/awscdk"


slackChannel := chatbot.NewSlackChannelConfiguration(this, jsii.String("MySlackChannel"), &SlackChannelConfigurationProps{
	SlackChannelConfigurationName: jsii.String("YOUR_CHANNEL_NAME"),
	SlackWorkspaceId: jsii.String("YOUR_SLACK_WORKSPACE_ID"),
	SlackChannelId: jsii.String("YOUR_SLACK_CHANNEL_ID"),
	UserRoleRequired: jsii.Boolean(true),
})

# Functions

No description provided by the author
Returns `true` if a construct is a stack element (i.e.
Check whether the given object is a CfnResource.
Checks if `x` is a construct.
No description provided by the author
Returns `true` if a construct is a stack element (i.e.
Check whether the given object is a CfnResource.
Checks if `x` is a construct.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Import an existing Slack channel configuration provided an ARN.
Checks if `x` is a construct.
Returns true if the construct was created by CDK, and false otherwise.
Check whether the given construct is a Resource.
Return the given named metric for All SlackChannelConfigurations.

# Constants

# Structs

Properties for defining a `CfnMicrosoftTeamsChannelConfiguration`.
Properties for defining a `CfnSlackChannelConfiguration`.
Properties for a new Slack channel configuration.

# Interfaces

The `AWS::Chatbot::MicrosoftTeamsChannelConfiguration` resource configures a Microsoft Teams channel to allow users to use AWS Chatbot with AWS CloudFormation templates.
The `AWS::Chatbot::SlackChannelConfiguration` resource configures a Slack channel to allow users to use AWS Chatbot with AWS CloudFormation templates.
Represents a Slack channel configuration.
A new Slack channel configuration.

# Type aliases

Logging levels include ERROR, INFO, or NONE.