Class SlackChannelConfiguration
A new Slack channel configuration.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.Chatbot
Assembly: Amazon.CDK.AWS.Chatbot.dll
Syntax (csharp)
public class SlackChannelConfiguration : Resource, ISlackChannelConfiguration, IResource, IConstruct, IDependable, IGrantable, INotificationRuleTarget
Syntax (vb)
Public Class SlackChannelConfiguration
Inherits Resource
Implements ISlackChannelConfiguration, IResource, IConstruct, IDependable, IGrantable, INotificationRuleTarget
Remarks
ExampleMetadata: infused
Examples
// Define CodeStar Notification rules for Pipelines
using Amazon.CDK.AWS.Chatbot;
Pipeline pipeline;
var target = new SlackChannelConfiguration(this, "MySlackChannel", new SlackChannelConfigurationProps {
SlackChannelConfigurationName = "YOUR_CHANNEL_NAME",
SlackWorkspaceId = "YOUR_SLACK_WORKSPACE_ID",
SlackChannelId = "YOUR_SLACK_CHANNEL_ID"
});
var rule = pipeline.NotifyOnExecutionStateChange("NotifyOnExecutionStateChange", target);
Synopsis
Constructors
SlackChannelConfiguration(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
SlackChannelConfiguration(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
SlackChannelConfiguration(Construct, String, ISlackChannelConfigurationProps) |
Properties
GrantPrincipal | The principal to grant permissions to. |
Role | The permission role of Slack channel configuration. |
SlackChannelConfigurationArn | The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}. |
SlackChannelConfigurationName | The name of Slack channel configuration. |
Methods
AddNotificationTopic(ITopic) | Adds a SNS topic that deliver notifications to AWS Chatbot. |
AddToRolePolicy(PolicyStatement) | Adds extra permission to iam-role of Slack channel configuration. |
BindAsNotificationRuleTarget(Construct) | Returns a target configuration for notification rule. |
FromSlackChannelConfigurationArn(Construct, String, String) | Import an existing Slack channel configuration provided an ARN. |
Metric(String, IMetricOptions) | Return the given named metric for this SlackChannelConfiguration. |
MetricAll(String, IMetricOptions) | Return the given named metric for All SlackChannelConfigurations. |
Constructors
SlackChannelConfiguration(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected SlackChannelConfiguration(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
SlackChannelConfiguration(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected SlackChannelConfiguration(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
SlackChannelConfiguration(Construct, String, ISlackChannelConfigurationProps)
public SlackChannelConfiguration(Construct scope, string id, ISlackChannelConfigurationProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props ISlackChannelConfigurationProps
Properties
GrantPrincipal
The principal to grant permissions to.
public virtual IPrincipal GrantPrincipal { get; }
Property Value
Role
The permission role of Slack channel configuration.
public virtual IRole Role { get; }
Property Value
SlackChannelConfigurationArn
The ARN of the Slack channel configuration In the form of arn:aws:chatbot:{region}:{account}:chat-configuration/slack-channel/{slackChannelName}.
public virtual string SlackChannelConfigurationArn { get; }
Property Value
System.String
SlackChannelConfigurationName
The name of Slack channel configuration.
public virtual string SlackChannelConfigurationName { get; }
Property Value
System.String
Methods
AddNotificationTopic(ITopic)
Adds a SNS topic that deliver notifications to AWS Chatbot.
public virtual void AddNotificationTopic(ITopic notificationTopic)
Parameters
- notificationTopic ITopic
AddToRolePolicy(PolicyStatement)
Adds extra permission to iam-role of Slack channel configuration.
public virtual void AddToRolePolicy(PolicyStatement statement)
Parameters
- statement PolicyStatement
BindAsNotificationRuleTarget(Construct)
Returns a target configuration for notification rule.
public virtual INotificationRuleTargetConfig BindAsNotificationRuleTarget(Construct scope)
Parameters
- scope Constructs.Construct
Returns
FromSlackChannelConfigurationArn(Construct, String, String)
Import an existing Slack channel configuration provided an ARN.
public static ISlackChannelConfiguration FromSlackChannelConfigurationArn(Construct scope, string id, string slackChannelConfigurationArn)
Parameters
- scope Constructs.Construct
The parent creating construct.
- id System.String
The construct's name.
- slackChannelConfigurationArn System.String
configuration ARN (i.e. arn:aws:chatbot::1234567890:chat-configuration/slack-channel/my-slack).
Returns
a reference to the existing Slack channel configuration
Metric(String, IMetricOptions)
Return the given named metric for this SlackChannelConfiguration.
public virtual Metric Metric(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns
MetricAll(String, IMetricOptions)
Return the given named metric for All SlackChannelConfigurations.
public static Metric MetricAll(string metricName, IMetricOptions props = null)
Parameters
- metricName System.String
- props IMetricOptions
Returns