Class SlackChannelConfiguration
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.core.Construct
software.amazon.awscdk.core.Resource
software.amazon.awscdk.services.chatbot.SlackChannelConfiguration
- All Implemented Interfaces:
IConstruct
,IDependable
,IResource
,ISlackChannelConfiguration
,INotificationRuleTarget
,IGrantable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:38.219Z")
@Stability(Stable)
public class SlackChannelConfiguration
extends Resource
implements ISlackChannelConfiguration
A new Slack channel configuration.
Example:
// Define CodeStar Notification rules for Pipelines import software.amazon.awscdk.services.chatbot.*; Pipeline pipeline; SlackChannelConfiguration target = SlackChannelConfiguration.Builder.create(this, "MySlackChannel") .slackChannelConfigurationName("YOUR_CHANNEL_NAME") .slackWorkspaceId("YOUR_SLACK_WORKSPACE_ID") .slackChannelId("YOUR_SLACK_CHANNEL_ID") .build(); INotificationRule rule = pipeline.notifyOnExecutionStateChange("NotifyOnExecutionStateChange", target);
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forSlackChannelConfiguration
.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.chatbot.ISlackChannelConfiguration
ISlackChannelConfiguration.Jsii$Default, ISlackChannelConfiguration.Jsii$Proxy
-
Constructor Summary
ModifierConstructorDescriptionprotected
SlackChannelConfiguration
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
SlackChannelConfiguration
(software.amazon.jsii.JsiiObjectRef objRef) SlackChannelConfiguration
(software.constructs.Construct scope, String id, SlackChannelConfigurationProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNotificationTopic
(ITopic notificationTopic) Adds a SNS topic that deliver notifications to AWS Chatbot.void
addToRolePolicy
(PolicyStatement statement) Adds extra permission to iam-role of Slack channel configuration.bindAsNotificationRuleTarget
(software.constructs.Construct _scope) Returns a target configuration for notification rule.static ISlackChannelConfiguration
fromSlackChannelConfigurationArn
(software.constructs.Construct scope, String id, String slackChannelConfigurationArn) Import an existing Slack channel configuration provided an ARN.The principal to grant permissions to.getRole()
The permission role of Slack channel configuration.The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}.The name of Slack channel configuration.Return the given named metric for this SlackChannelConfiguration.metric
(String metricName, MetricOptions props) Return the given named metric for this SlackChannelConfiguration.static Metric
Return the given named metric for All SlackChannelConfigurations.static Metric
metricAll
(String metricName, MetricOptions props) Return the given named metric for All SlackChannelConfigurations.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResource
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.constructs.Construct
toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.awscdk.core.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
SlackChannelConfiguration
protected SlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef) -
SlackChannelConfiguration
protected SlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
SlackChannelConfiguration
@Stability(Stable) public SlackChannelConfiguration(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull SlackChannelConfigurationProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
-
Method Details
-
fromSlackChannelConfigurationArn
@Stability(Stable) @NotNull public static ISlackChannelConfiguration fromSlackChannelConfigurationArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String slackChannelConfigurationArn) Import an existing Slack channel configuration provided an ARN.- Parameters:
scope
- The parent creating construct. This parameter is required.id
- The construct's name. This parameter is required.slackChannelConfigurationArn
- configuration ARN (i.e. arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-slack). This parameter is required.- Returns:
- a reference to the existing Slack channel configuration
-
metricAll
@Stability(Stable) @NotNull public static Metric metricAll(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for All SlackChannelConfigurations.- Parameters:
metricName
- This parameter is required.props
-
-
metricAll
Return the given named metric for All SlackChannelConfigurations.- Parameters:
metricName
- This parameter is required.
-
addNotificationTopic
Adds a SNS topic that deliver notifications to AWS Chatbot.- Parameters:
notificationTopic
- This parameter is required.
-
addToRolePolicy
Adds extra permission to iam-role of Slack channel configuration.- Specified by:
addToRolePolicy
in interfaceISlackChannelConfiguration
- Parameters:
statement
- This parameter is required.
-
bindAsNotificationRuleTarget
@Stability(Stable) @NotNull public NotificationRuleTargetConfig bindAsNotificationRuleTarget(@NotNull software.constructs.Construct _scope) Returns a target configuration for notification rule.- Specified by:
bindAsNotificationRuleTarget
in interfaceINotificationRuleTarget
- Parameters:
_scope
- This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this SlackChannelConfiguration.- Specified by:
metric
in interfaceISlackChannelConfiguration
- Parameters:
metricName
- This parameter is required.props
-
-
metric
Return the given named metric for this SlackChannelConfiguration.- Specified by:
metric
in interfaceISlackChannelConfiguration
- Parameters:
metricName
- This parameter is required.
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipal
in interfaceIGrantable
-
getSlackChannelConfigurationArn
The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}.- Specified by:
getSlackChannelConfigurationArn
in interfaceISlackChannelConfiguration
-
getSlackChannelConfigurationName
The name of Slack channel configuration.- Specified by:
getSlackChannelConfigurationName
in interfaceISlackChannelConfiguration
-
getRole
The permission role of Slack channel configuration.- Specified by:
getRole
in interfaceISlackChannelConfiguration
-