updateSlackChannelConfiguration method
Updates a Slack channel configuration.
May throw InvalidParameterException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw UpdateSlackChannelConfigurationException.
Parameter chatConfigurationArn :
The Amazon Resource Name (ARN) of the SlackChannelConfiguration to update.
Parameter slackChannelId :
The ID of the Slack channel.
To get this 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.
Parameter guardrailPolicyArns :
The list of IAM policy ARNs that are applied as channel guardrails. The
AWS managed AdministratorAccess policy is applied by default
if this is not set.
Parameter iamRoleArn :
A user-defined role that AWS Chatbot assumes. This is not the
service-linked role.
For more information, see IAM policies for AWS Chatbot in the AWS Chatbot Administrator Guide.
Parameter loggingLevel :
Logging levels include ERROR, INFO, or
NONE.
Parameter slackChannelName :
The name of the Slack channel.
Parameter snsTopicArns :
The Amazon Resource Names (ARNs) of the SNS topics that deliver
notifications to AWS Chatbot.
Parameter userAuthorizationRequired :
Enables use of a user role requirement in your chat configuration.
Implementation
Future<UpdateSlackChannelConfigurationResult>
updateSlackChannelConfiguration({
required String chatConfigurationArn,
required String slackChannelId,
List<String>? guardrailPolicyArns,
String? iamRoleArn,
String? loggingLevel,
String? slackChannelName,
List<String>? snsTopicArns,
bool? userAuthorizationRequired,
}) async {
final $payload = <String, dynamic>{
'ChatConfigurationArn': chatConfigurationArn,
'SlackChannelId': slackChannelId,
if (guardrailPolicyArns != null)
'GuardrailPolicyArns': guardrailPolicyArns,
if (iamRoleArn != null) 'IamRoleArn': iamRoleArn,
if (loggingLevel != null) 'LoggingLevel': loggingLevel,
if (slackChannelName != null) 'SlackChannelName': slackChannelName,
if (snsTopicArns != null) 'SnsTopicArns': snsTopicArns,
if (userAuthorizationRequired != null)
'UserAuthorizationRequired': userAuthorizationRequired,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/update-slack-channel-configuration',
exceptionFnMap: _exceptionFns,
);
return UpdateSlackChannelConfigurationResult.fromJson(response);
}