Class SlackChannelConfiguration.Builder

java.lang.Object
software.amazon.awscdk.services.chatbot.SlackChannelConfiguration.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<SlackChannelConfiguration>
Enclosing class:
SlackChannelConfiguration

@Stability(Stable) public static final class SlackChannelConfiguration.Builder extends Object implements software.amazon.jsii.Builder<SlackChannelConfiguration>
A fluent builder for SlackChannelConfiguration.
  • Method Details

    • create

      @Stability(Stable) public static SlackChannelConfiguration.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of SlackChannelConfiguration.Builder.
    • slackChannelConfigurationName

      @Stability(Stable) public SlackChannelConfiguration.Builder slackChannelConfigurationName(String slackChannelConfigurationName)
      The name of Slack channel configuration.

      Parameters:
      slackChannelConfigurationName - The name of Slack channel configuration. This parameter is required.
      Returns:
      this
    • slackChannelId

      @Stability(Stable) public SlackChannelConfiguration.Builder slackChannelId(String 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 9-character string at the end of the URL. For example, ABCBBLZZZ.

      Parameters:
      slackChannelId - The ID of the Slack channel. This parameter is required.
      Returns:
      this
    • slackWorkspaceId

      @Stability(Stable) public SlackChannelConfiguration.Builder slackWorkspaceId(String 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-4 in Setting Up AWS Chatbot with Slack in the AWS Chatbot User Guide.

      Parameters:
      slackWorkspaceId - The ID of the Slack workspace authorized with AWS Chatbot. This parameter is required.
      Returns:
      this
      See Also:
    • guardrailPolicies

      @Stability(Stable) public SlackChannelConfiguration.Builder guardrailPolicies(List<? extends IManagedPolicy> guardrailPolicies)
      A list of IAM managed policies that are applied as channel guardrails.

      Default: - The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.

      Parameters:
      guardrailPolicies - A list of IAM managed policies that are applied as channel guardrails. This parameter is required.
      Returns:
      this
    • loggingLevel

      @Stability(Stable) public SlackChannelConfiguration.Builder loggingLevel(LoggingLevel loggingLevel)
      Specifies the logging level for this configuration.

      This property affects the log entries pushed to Amazon CloudWatch Logs.

      Default: LoggingLevel.NONE

      Parameters:
      loggingLevel - Specifies the logging level for this configuration. This parameter is required.
      Returns:
      this
    • logRetention

      @Stability(Stable) public SlackChannelConfiguration.Builder logRetention(RetentionDays logRetention)
      The number of days log events are kept in CloudWatch Logs.

      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

      Parameters:
      logRetention - The number of days log events are kept in CloudWatch Logs. This parameter is required.
      Returns:
      this
    • logRetentionRetryOptions

      @Stability(Stable) public SlackChannelConfiguration.Builder logRetentionRetryOptions(LogRetentionRetryOptions logRetentionRetryOptions)
      When log retention is specified, a custom resource attempts to create the CloudWatch log group.

      These options control the retry policy when interacting with CloudWatch APIs.

      Default: - Default AWS SDK retry options.

      Parameters:
      logRetentionRetryOptions - When log retention is specified, a custom resource attempts to create the CloudWatch log group. This parameter is required.
      Returns:
      this
    • logRetentionRole

      @Stability(Stable) public SlackChannelConfiguration.Builder logRetentionRole(IRole logRetentionRole)
      The IAM role for the Lambda function associated with the custom resource that sets the retention policy.

      Default: - A new role is created.

      Parameters:
      logRetentionRole - The IAM role for the Lambda function associated with the custom resource that sets the retention policy. This parameter is required.
      Returns:
      this
    • notificationTopics

      @Stability(Stable) public SlackChannelConfiguration.Builder notificationTopics(List<? extends ITopic> notificationTopics)
      The SNS topics that deliver notifications to AWS Chatbot.

      Default: None

      Parameters:
      notificationTopics - The SNS topics that deliver notifications to AWS Chatbot. This parameter is required.
      Returns:
      this
    • role

      @Stability(Stable) public SlackChannelConfiguration.Builder role(IRole role)
      The permission role of Slack channel configuration.

      Default: - A role will be created.

      Parameters:
      role - The permission role of Slack channel configuration. This parameter is required.
      Returns:
      this
    • userRoleRequired

      @Stability(Stable) public SlackChannelConfiguration.Builder userRoleRequired(Boolean userRoleRequired)
      Enables use of a user role requirement in your chat configuration.

      Default: false

      Parameters:
      userRoleRequired - Enables use of a user role requirement in your chat configuration. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public SlackChannelConfiguration build()
      Specified by:
      build in interface software.amazon.jsii.Builder<SlackChannelConfiguration>
      Returns:
      a newly built instance of SlackChannelConfiguration.