@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.986Z") @Stability(value=Stable) public class SlackChannelConfiguration extends Resource implements ISlackChannelConfiguration
Example:
import software.amazon.awscdk.services.chatbot.*;
Project project;
SlackChannelConfiguration target = SlackChannelConfiguration.Builder.create(this, "MySlackChannel")
.slackChannelConfigurationName("YOUR_CHANNEL_NAME")
.slackWorkspaceId("YOUR_SLACK_WORKSPACE_ID")
.slackChannelId("YOUR_SLACK_CHANNEL_ID")
.build();
INotificationRule rule = project.notifyOnBuildSucceeded("NotifyOnBuildSucceeded", target);
| Modifier and Type | Class and Description |
|---|---|
static class |
SlackChannelConfiguration.Builder
A fluent builder for
SlackChannelConfiguration. |
software.amazon.jsii.JsiiObject.InitializationModeISlackChannelConfiguration.Jsii$Default, ISlackChannelConfiguration.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
SlackChannelConfiguration(software.constructs.Construct scope,
String id,
SlackChannelConfigurationProps props) |
protected |
SlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
SlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
NotificationRuleTargetConfig |
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.
|
IPrincipal |
getGrantPrincipal()
The principal to grant permissions to.
|
IRole |
getRole()
The permission role of Slack channel configuration.
|
String |
getSlackChannelConfigurationArn()
The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}.
|
String |
getSlackChannelConfigurationName()
The name of Slack channel configuration.
|
Metric |
metric(String metricName)
Return the given named metric for this SlackChannelConfiguration.
|
Metric |
metric(String metricName,
MetricOptions props)
Return the given named metric for this SlackChannelConfiguration.
|
static Metric |
metricAll(String metricName)
Return the given named metric for All SlackChannelConfigurations.
|
static Metric |
metricAll(String metricName,
MetricOptions props)
Return the given named metric for All SlackChannelConfigurations.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourcejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackprotected SlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected SlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public SlackChannelConfiguration(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
SlackChannelConfigurationProps props)
scope - This parameter is required.id - This parameter is required.props - This parameter is required.@Stability(value=Stable) @NotNull public static ISlackChannelConfiguration fromSlackChannelConfigurationArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String slackChannelConfigurationArn)
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.@Stability(value=Stable) @NotNull public static Metric metricAll(@NotNull String metricName, @Nullable MetricOptions props)
metricName - This parameter is required.props - @Stability(value=Stable) @NotNull public static Metric metricAll(@NotNull String metricName)
metricName - This parameter is required.@Stability(value=Stable)
public void addNotificationTopic(@NotNull
ITopic notificationTopic)
notificationTopic - This parameter is required.@Stability(value=Stable)
public void addToRolePolicy(@NotNull
PolicyStatement statement)
addToRolePolicy in interface ISlackChannelConfigurationstatement - This parameter is required.@Stability(value=Stable) @NotNull public NotificationRuleTargetConfig bindAsNotificationRuleTarget(@NotNull software.constructs.Construct _scope)
bindAsNotificationRuleTarget in interface INotificationRuleTarget_scope - This parameter is required.@Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric in interface ISlackChannelConfigurationmetricName - This parameter is required.props - @Stability(value=Stable) @NotNull public Metric metric(@NotNull String metricName)
metric in interface ISlackChannelConfigurationmetricName - This parameter is required.@Stability(value=Stable) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Stable) @NotNull public String getSlackChannelConfigurationArn()
getSlackChannelConfigurationArn in interface ISlackChannelConfiguration@Stability(value=Stable) @NotNull public String getSlackChannelConfigurationName()
getSlackChannelConfigurationName in interface ISlackChannelConfiguration@Stability(value=Stable) @Nullable public IRole getRole()
getRole in interface ISlackChannelConfigurationCopyright © 2022. All rights reserved.