@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:52.449Z") public class CfnSlackChannelConfiguration extends CfnResource implements IInspectable
The AWS::Chatbot::SlackChannelConfiguration
resource configures a Slack channel to allow users to use AWS Chatbot with AWS CloudFormation templates.
This resource requires some setup to be done in the AWS Chatbot console. To provide the required Slack workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console, then copy and paste the workspace ID from the console. For more details, see steps 1-4 in Setting Up AWS Chatbot with Slack in the AWS Chatbot User Guide .
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.chatbot.*; CfnSlackChannelConfiguration cfnSlackChannelConfiguration = CfnSlackChannelConfiguration.Builder.create(this, "MyCfnSlackChannelConfiguration") .configurationName("configurationName") .iamRoleArn("iamRoleArn") .slackChannelId("slackChannelId") .slackWorkspaceId("slackWorkspaceId") // the properties below are optional .guardrailPolicies(List.of("guardrailPolicies")) .loggingLevel("loggingLevel") .snsTopicArns(List.of("snsTopicArns")) .userRoleRequired(false) .build();
Modifier and Type | Class and Description |
---|---|
static class |
CfnSlackChannelConfiguration.Builder
A fluent builder for
CfnSlackChannelConfiguration . |
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnSlackChannelConfiguration(Construct scope,
java.lang.String id,
CfnSlackChannelConfigurationProps props)
Create a new `AWS::Chatbot::SlackChannelConfiguration`.
|
protected |
CfnSlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnSlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttrArn() |
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
java.lang.String |
getConfigurationName()
The name of the configuration.
|
java.util.List<java.lang.String> |
getGuardrailPolicies()
The list of IAM policy ARNs that are applied as channel guardrails.
|
java.lang.String |
getIamRoleArn()
The ARN of the IAM role that defines the permissions for AWS Chatbot .
|
java.lang.String |
getLoggingLevel()
Specifies the logging level for this configuration.
|
java.lang.String |
getSlackChannelId()
The ID of the Slack channel.
|
java.lang.String |
getSlackWorkspaceId()
The ID of the Slack workspace authorized with AWS Chatbot .
|
java.util.List<java.lang.String> |
getSnsTopicArns()
The ARNs of the SNS topics that deliver notifications to AWS Chatbot .
|
java.lang.Object |
getUserRoleRequired()
Enables use of a user role requirement in your chat configuration.
|
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.Object> props) |
void |
setConfigurationName(java.lang.String value)
The name of the configuration.
|
void |
setGuardrailPolicies(java.util.List<java.lang.String> value)
The list of IAM policy ARNs that are applied as channel guardrails.
|
void |
setIamRoleArn(java.lang.String value)
The ARN of the IAM role that defines the permissions for AWS Chatbot .
|
void |
setLoggingLevel(java.lang.String value)
Specifies the logging level for this configuration.
|
void |
setSlackChannelId(java.lang.String value)
The ID of the Slack channel.
|
void |
setSlackWorkspaceId(java.lang.String value)
The ID of the Slack workspace authorized with AWS Chatbot .
|
void |
setSnsTopicArns(java.util.List<java.lang.String> value)
The ARNs of the SNS topics that deliver notifications to AWS Chatbot .
|
void |
setUserRoleRequired(java.lang.Boolean value)
Enables use of a user role requirement in your chat configuration.
|
void |
setUserRoleRequired(IResolvable value)
Enables use of a user role requirement in your chat configuration.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnSlackChannelConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnSlackChannelConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnSlackChannelConfiguration(Construct scope, java.lang.String id, CfnSlackChannelConfigurationProps props)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.props
- - resource properties. This parameter is required.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.String getConfigurationName()
public void setConfigurationName(java.lang.String value)
public java.lang.String getIamRoleArn()
This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot .
public void setIamRoleArn(java.lang.String value)
This is a user-defined role that AWS Chatbot will assume. This is not the service-linked role. For more information, see IAM Policies for AWS Chatbot .
public java.lang.String getSlackChannelId()
To get the ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ
.
public void setSlackChannelId(java.lang.String value)
To get the ID, open Slack, right click on the channel name in the left pane, then choose Copy Link. The channel ID is the 9-character string at the end of the URL. For example, ABCBBLZZZ
.
public java.lang.String getSlackWorkspaceId()
To get the workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console. Then you can copy and paste the workspace ID from the console. For more details, see steps 1-4 in Setting Up AWS Chatbot with Slack in the AWS Chatbot User Guide .
public void setSlackWorkspaceId(java.lang.String value)
To get the workspace ID, you must perform the initial authorization flow with Slack in the AWS Chatbot console. Then you can copy and paste the workspace ID from the console. For more details, see steps 1-4 in Setting Up AWS Chatbot with Slack in the AWS Chatbot User Guide .
public java.util.List<java.lang.String> getGuardrailPolicies()
The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.
public void setGuardrailPolicies(java.util.List<java.lang.String> value)
The AWS managed 'AdministratorAccess' policy is applied as a default if this is not set.
public java.lang.String getLoggingLevel()
Logging levels include ERROR
, INFO
, or NONE
.
public void setLoggingLevel(java.lang.String value)
Logging levels include ERROR
, INFO
, or NONE
.
public java.util.List<java.lang.String> getSnsTopicArns()
public void setSnsTopicArns(java.util.List<java.lang.String> value)
public java.lang.Object getUserRoleRequired()
public void setUserRoleRequired(java.lang.Boolean value)
public void setUserRoleRequired(IResolvable value)