Class: AWSCDK::Chatbot::CfnSlackChannelConfigurationProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
chatbot/cfn_slack_channel_configuration_props.rb

Overview

Properties for defining a CfnSlackChannelConfiguration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(configuration_name:, iam_role_arn:, slack_channel_id:, slack_workspace_id:, customization_resource_arns: nil, guardrail_policies: nil, logging_level: nil, sns_topic_arns: nil, tags: nil, user_role_required: nil) ⇒ CfnSlackChannelConfigurationProps

Returns a new instance of CfnSlackChannelConfigurationProps.

Parameters:

  • configuration_name (String)

    The name of the configuration.

  • iam_role_arn (String, AWSCDK::Interfaces::AWSIAM::IRoleRef)

    The ARN of the IAM role that defines the permissions for .

  • slack_channel_id (String)

    The ID of the Slack channel.

  • slack_workspace_id (String)

    The ID of the Slack workspace authorized with .

  • customization_resource_arns (Array<String>, nil) (defaults to: nil)

    Links a list of resource ARNs (for example, custom action ARNs) to a Slack channel configuration for .

  • guardrail_policies (Array<String>, nil) (defaults to: nil)

    The list of IAM policy ARNs that are applied as channel guardrails.

  • logging_level (String, nil) (defaults to: nil)

    Specifies the logging level for this configuration. This property affects the log entries pushed to Amazon CloudWatch Logs.

  • sns_topic_arns (Array<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>, nil) (defaults to: nil)

    The ARNs of the SNS topics that deliver notifications to .

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The tags to add to the configuration.

  • user_role_required (Boolean, AWSCDK::IResolvable, nil) (defaults to: nil)

    Enables use of a user role requirement in your chat configuration.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 19

def initialize(configuration_name:, iam_role_arn:, slack_channel_id:, slack_workspace_id:, customization_resource_arns: nil, guardrail_policies: nil, logging_level: nil, sns_topic_arns: nil, tags: nil, user_role_required: nil)
  @configuration_name = configuration_name
  Jsii::Type.check_type(@configuration_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "configurationName")
  @iam_role_arn = iam_role_arn
  Jsii::Type.check_type(@iam_role_arn, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoic3RyaW5nIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19pYW0uSVJvbGVSZWYifV19fQ==")), "iamRoleArn")
  @slack_channel_id = slack_channel_id
  Jsii::Type.check_type(@slack_channel_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "slackChannelId")
  @slack_workspace_id = slack_workspace_id
  Jsii::Type.check_type(@slack_workspace_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "slackWorkspaceId")
  @customization_resource_arns = customization_resource_arns
  Jsii::Type.check_type(@customization_resource_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "customizationResourceArns") unless @customization_resource_arns.nil?
  @guardrail_policies = guardrail_policies
  Jsii::Type.check_type(@guardrail_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "guardrailPolicies") unless @guardrail_policies.nil?
  @logging_level = logging_level
  Jsii::Type.check_type(@logging_level, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "loggingLevel") unless @logging_level.nil?
  @sns_topic_arns = sns_topic_arns
  Jsii::Type.check_type(@sns_topic_arns, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InVuaW9uIjp7InR5cGVzIjpbeyJwcmltaXRpdmUiOiJzdHJpbmcifSx7ImZxbiI6ImF3cy1jZGstbGliLmludGVyZmFjZXMuYXdzX3Nucy5JVG9waWNSZWYifV19fSwia2luZCI6ImFycmF5In19")), "snsTopicArns") unless @sns_topic_arns.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @user_role_required = user_role_required
  Jsii::Type.check_type(@user_role_required, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "userRoleRequired") unless @user_role_required.nil?
end

Instance Attribute Details

#configuration_nameString (readonly)

The name of the configuration.



46
47
48
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 46

def configuration_name
  @configuration_name
end

#customization_resource_arnsArray<String>? (readonly)

Links a list of resource ARNs (for example, custom action ARNs) to a Slack channel configuration for .



72
73
74
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 72

def customization_resource_arns
  @customization_resource_arns
end

#guardrail_policiesArray<String>? (readonly)

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.



79
80
81
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 79

def guardrail_policies
  @guardrail_policies
end

#iam_role_arnString, AWSCDK::Interfaces::AWSIAM::IRoleRef (readonly)

The ARN of the IAM role that defines the permissions for .

This is a user-defined role that will assume. This is not the service-linked role. For more information, see IAM Policies for in chat applications .



53
54
55
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 53

def iam_role_arn
  @iam_role_arn
end

#logging_levelString? (readonly)

Note:

Default: - "NONE"

Specifies the logging level for this configuration. This property affects the log entries pushed to Amazon CloudWatch Logs.

Logging levels include ERROR , INFO , or NONE .



87
88
89
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 87

def logging_level
  @logging_level
end

#slack_channel_idString (readonly)

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 .



60
61
62
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 60

def slack_channel_id
  @slack_channel_id
end

#slack_workspace_idString (readonly)

The ID of the Slack workspace authorized with .

To get the workspace ID, you must perform the initial authorization flow with Slack in the in chat applications 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 in chat applications User Guide .



67
68
69
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 67

def slack_workspace_id
  @slack_workspace_id
end

#sns_topic_arnsArray<String, AWSCDK::Interfaces::AWSSNS::ITopicRef>? (readonly)

The ARNs of the SNS topics that deliver notifications to .



92
93
94
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 92

def sns_topic_arns
  @sns_topic_arns
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The tags to add to the configuration.



97
98
99
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 97

def tags
  @tags
end

#user_role_requiredBoolean, ... (readonly)

Note:

Default: - false

Enables use of a user role requirement in your chat configuration.



103
104
105
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 103

def user_role_required
  @user_role_required
end

Class Method Details

.jsii_propertiesObject



105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 105

def self.jsii_properties
  {
    :configuration_name => "configurationName",
    :iam_role_arn => "iamRoleArn",
    :slack_channel_id => "slackChannelId",
    :slack_workspace_id => "slackWorkspaceId",
    :customization_resource_arns => "customizationResourceArns",
    :guardrail_policies => "guardrailPolicies",
    :logging_level => "loggingLevel",
    :sns_topic_arns => "snsTopicArns",
    :tags => "tags",
    :user_role_required => "userRoleRequired",
  }
end

Instance Method Details

#to_jsiiObject



120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# File 'chatbot/cfn_slack_channel_configuration_props.rb', line 120

def to_jsii
  result = {}
  result.merge!({
    "configurationName" => @configuration_name,
    "iamRoleArn" => @iam_role_arn,
    "slackChannelId" => @slack_channel_id,
    "slackWorkspaceId" => @slack_workspace_id,
    "customizationResourceArns" => @customization_resource_arns,
    "guardrailPolicies" => @guardrail_policies,
    "loggingLevel" => @logging_level,
    "snsTopicArns" => @sns_topic_arns,
    "tags" => @tags,
    "userRoleRequired" => @user_role_required,
  })
  result.compact
end