@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:03.713Z") @Stability(value=Experimental) public class SlackChannelConfiguration extends Resource implements ISlackChannelConfiguration
Example:
// Example automatically generated from non-compiling source. May contain errors.
import software.amazon.awscdk.core.*;
import software.amazon.awscdk.core.*;
SlackChannelConfiguration slackChannel = SlackChannelConfiguration.Builder.create(this, "MySlackChannel")
.slackChannelConfigurationName("YOUR_CHANNEL_NAME")
.slackWorkspaceId("YOUR_SLACK_WORKSPACE_ID")
.slackChannelId("YOUR_SLACK_CHANNEL_ID")
.build();
slackChannel.addToRolePolicy(PolicyStatement.Builder.create()
.effect(Effect.ALLOW)
.actions(List.of("s3:GetObject"))
.resources(List.of("arn:aws:s3:::abc/xyz/123.txt"))
.build());
slackChannel.addNotificationTopic(new Topic(this, "MyTopic"));
| Modifier and Type | Class and Description |
|---|---|
static class |
SlackChannelConfiguration.Builder
(experimental) 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)
(experimental) Adds a SNS topic that deliver notifications to AWS Chatbot.
|
void |
addToRolePolicy(PolicyStatement statement)
(experimental) Adds extra permission to iam-role of Slack channel configuration.
|
NotificationRuleTargetConfig |
bindAsNotificationRuleTarget(software.constructs.Construct _scope)
(experimental) Returns a target configuration for notification rule.
|
static ISlackChannelConfiguration |
fromSlackChannelConfigurationArn(software.constructs.Construct scope,
String id,
String slackChannelConfigurationArn)
(experimental) Import an existing Slack channel configuration provided an ARN.
|
IPrincipal |
getGrantPrincipal()
(experimental) The principal to grant permissions to.
|
IRole |
getRole()
(experimental) The permission role of Slack channel configuration.
|
String |
getSlackChannelConfigurationArn()
(experimental) The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}.
|
String |
getSlackChannelConfigurationName()
(experimental) The name of Slack channel configuration.
|
Metric |
metric(String metricName)
(experimental) Return the given named metric for this SlackChannelConfiguration.
|
Metric |
metric(String metricName,
MetricOptions props)
(experimental) Return the given named metric for this SlackChannelConfiguration.
|
static Metric |
metricAll(String metricName)
(experimental) Return the given named metric for All SlackChannelConfigurations.
|
static Metric |
metricAll(String metricName,
MetricOptions props)
(experimental) Return the given named metric for All SlackChannelConfigurations.
|
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourcegetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitapplyRemovalPolicy, getEnv, getStackgetNodeprotected SlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected SlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
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=Experimental) @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=Experimental) @NotNull public static Metric metricAll(@NotNull String metricName, @Nullable MetricOptions props)
metricName - This parameter is required.props - @Stability(value=Experimental) @NotNull public static Metric metricAll(@NotNull String metricName)
metricName - This parameter is required.@Stability(value=Experimental)
public void addNotificationTopic(@NotNull
ITopic notificationTopic)
notificationTopic - This parameter is required.@Stability(value=Experimental)
public void addToRolePolicy(@NotNull
PolicyStatement statement)
addToRolePolicy in interface ISlackChannelConfigurationstatement - This parameter is required.@Stability(value=Experimental) @NotNull public NotificationRuleTargetConfig bindAsNotificationRuleTarget(@NotNull software.constructs.Construct _scope)
bindAsNotificationRuleTarget in interface INotificationRuleTarget_scope - This parameter is required.@Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
metric in interface ISlackChannelConfigurationmetricName - This parameter is required.props - @Stability(value=Experimental) @NotNull public Metric metric(@NotNull String metricName)
metric in interface ISlackChannelConfigurationmetricName - This parameter is required.@Stability(value=Experimental) @NotNull public IPrincipal getGrantPrincipal()
getGrantPrincipal in interface IGrantable@Stability(value=Experimental) @NotNull public String getSlackChannelConfigurationArn()
getSlackChannelConfigurationArn in interface ISlackChannelConfiguration@Stability(value=Experimental) @NotNull public String getSlackChannelConfigurationName()
getSlackChannelConfigurationName in interface ISlackChannelConfiguration@Stability(value=Experimental) @Nullable public IRole getRole()
getRole in interface ISlackChannelConfigurationCopyright © 2022. All rights reserved.