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
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forSlackChannelConfiguration.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.chatbot.ISlackChannelConfiguration
ISlackChannelConfiguration.Jsii$Default, ISlackChannelConfiguration.Jsii$Proxy -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedSlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef) SlackChannelConfiguration(software.constructs.Construct scope, String id, SlackChannelConfigurationProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNotificationTopic(ITopic notificationTopic) Adds a SNS topic that deliver notifications to AWS Chatbot.voidaddToRolePolicy(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 ISlackChannelConfigurationfromSlackChannelConfigurationArn(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 MetricReturn the given named metric for All SlackChannelConfigurations.static MetricmetricAll(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, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods 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:
addToRolePolicyin 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:
bindAsNotificationRuleTargetin 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:
metricin interfaceISlackChannelConfiguration- Parameters:
metricName- This parameter is required.props-
-
metric
Return the given named metric for this SlackChannelConfiguration.- Specified by:
metricin interfaceISlackChannelConfiguration- Parameters:
metricName- This parameter is required.
-
getGrantPrincipal
The principal to grant permissions to.- Specified by:
getGrantPrincipalin 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:
getSlackChannelConfigurationArnin interfaceISlackChannelConfiguration
-
getSlackChannelConfigurationName
The name of Slack channel configuration.- Specified by:
getSlackChannelConfigurationNamein interfaceISlackChannelConfiguration
-
getRole
The permission role of Slack channel configuration.- Specified by:
getRolein interfaceISlackChannelConfiguration
-