Module: AWSCDK::Chatbot::ISlackChannelConfiguration

Includes:
AWSCDK::CodeStarNotifications::INotificationRuleTarget, IAM::IGrantable, IResource, Interfaces::AWSChatbot::ISlackChannelConfigurationRef
Included in:
SlackChannelConfiguration
Defined in:
chatbot/i_slack_channel_configuration.rb

Overview

Represents a Slack channel configuration.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.jsii_overridable_methodsObject



137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'chatbot/i_slack_channel_configuration.rb', line 137

def self.jsii_overridable_methods
  {
    :node => { kind: :property, name: "node", is_optional: false },
    :env => { kind: :property, name: "env", is_optional: false },
    :stack => { kind: :property, name: "stack", is_optional: false },
    :grant_principal => { kind: :property, name: "grantPrincipal", is_optional: false },
    :slack_channel_configuration_ref => { kind: :property, name: "slackChannelConfigurationRef", is_optional: false },
    :slack_channel_configuration_arn => { kind: :property, name: "slackChannelConfigurationArn", is_optional: false },
    :slack_channel_configuration_name => { kind: :property, name: "slackChannelConfigurationName", is_optional: false },
    :role => { kind: :property, name: "role", is_optional: true },
    :with => { kind: :method, name: "with", is_optional: false },
    :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false },
    :bind_as_notification_rule_target => { kind: :method, name: "bindAsNotificationRuleTarget", is_optional: false },
    :add_to_role_policy => { kind: :method, name: "addToRolePolicy", is_optional: false },
    :metric => { kind: :method, name: "metric", is_optional: false },
  }
end

Instance Method Details

#add_to_role_policy(statement) ⇒ void

This method returns an undefined value.

Adds a statement to the IAM role.

Parameters:



120
121
122
123
# File 'chatbot/i_slack_channel_configuration.rb', line 120

def add_to_role_policy(statement)
  Jsii::Type.check_type(statement, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfaWFtLlBvbGljeVN0YXRlbWVudCJ9")), "statement")
  jsii_call_method("addToRolePolicy", [statement])
end

#apply_removal_policy(policy) ⇒ void

This method returns an undefined value.

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

Parameters:



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

def apply_removal_policy(policy)
  Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy")
  jsii_call_method("applyRemovalPolicy", [policy])
end

#bind_as_notification_rule_target(scope) ⇒ AWSCDK::CodeStarNotifications::NotificationRuleTargetConfig

Returns a target configuration for notification rule.

Parameters:

  • scope (Constructs::Construct)

Returns:



111
112
113
114
# File 'chatbot/i_slack_channel_configuration.rb', line 111

def bind_as_notification_rule_target(scope)
  Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope")
  jsii_call_method("bindAsNotificationRuleTarget", [scope])
end

#envAWSCDK::Interfaces::ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.



29
30
31
# File 'chatbot/i_slack_channel_configuration.rb', line 29

def env()
  jsii_get_property("env")
end

#grant_principalAWSCDK::IAM::IPrincipal

The principal to grant permissions to.



43
44
45
# File 'chatbot/i_slack_channel_configuration.rb', line 43

def grant_principal()
  jsii_get_property("grantPrincipal")
end

#metric(metric_name, props = nil) ⇒ AWSCDK::CloudWatch::Metric

Return the given named metric for this SlackChannelConfiguration.

Parameters:

Returns:



130
131
132
133
134
135
# File 'chatbot/i_slack_channel_configuration.rb', line 130

def metric(metric_name, props = nil)
  Jsii::Type.check_type(metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName")
  props = props.is_a?(Hash) ? ::AWSCDK::CloudWatch::MetricOptions.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR3YXRjaC5NZXRyaWNPcHRpb25zIn0=")), "props") unless props.nil?
  jsii_call_method("metric", [metric_name, props])
end

#nodeConstructs::Node

The tree node.

Returns:

  • (Constructs::Node)


14
15
16
# File 'chatbot/i_slack_channel_configuration.rb', line 14

def node()
  jsii_get_property("node")
end

#roleAWSCDK::IAM::IRole?

Note:

Default: - A role will be created.

The permission role of Slack channel configuration.

Returns:



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

def role()
  jsii_get_property("role")
end

#slack_channel_configuration_arnString

The ARN of the Slack channel configuration In the form of arn:aws:chatbot:region:account:chat-configuration/slack-channel/slackChannelName.

Returns:

  • (String)


57
58
59
# File 'chatbot/i_slack_channel_configuration.rb', line 57

def slack_channel_configuration_arn()
  jsii_get_property("slackChannelConfigurationArn")
end

#slack_channel_configuration_nameString

The name of Slack channel configuration.

Returns:

  • (String)


64
65
66
# File 'chatbot/i_slack_channel_configuration.rb', line 64

def slack_channel_configuration_name()
  jsii_get_property("slackChannelConfigurationName")
end

#slack_channel_configuration_refAWSCDK::Interfaces::AWSChatbot::SlackChannelConfigurationReference

A reference to a SlackChannelConfiguration resource.



50
51
52
# File 'chatbot/i_slack_channel_configuration.rb', line 50

def slack_channel_configuration_ref()
  jsii_get_property("slackChannelConfigurationRef")
end

#stackAWSCDK::Stack

The stack in which this resource is defined.

Returns:



36
37
38
# File 'chatbot/i_slack_channel_configuration.rb', line 36

def stack()
  jsii_get_property("stack")
end

#with(*mixins) ⇒ Constructs::IConstruct

Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

Parameters:

  • mixins (Array<Constructs::IMixin>)

    The mixins to apply.

Returns:

  • (Constructs::IConstruct)

    This construct for chaining



83
84
85
86
87
88
# File 'chatbot/i_slack_channel_configuration.rb', line 83

def with(*mixins)
  mixins.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]")
  end
  jsii_call_method("with", [*mixins])
end