createChimeWebhookConfiguration method

Future<CreateChimeWebhookConfigurationResult> createChimeWebhookConfiguration({
  1. required String configurationName,
  2. required String iamRoleArn,
  3. required List<String> snsTopicArns,
  4. required String webhookDescription,
  5. required String webhookUrl,
  6. String? loggingLevel,
  7. List<Tag>? tags,
})

Creates an AWS Chatbot configuration for Amazon Chime.

May throw ConflictException. May throw CreateChimeWebhookConfigurationException. May throw InvalidParameterException. May throw InvalidRequestException. May throw LimitExceededException.

Parameter configurationName : The name of the configuration.

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 snsTopicArns : The Amazon Resource Names (ARNs) of the SNS topics that deliver notifications to AWS Chatbot.

Parameter webhookDescription : A description of the webhook. We recommend using the convention RoomName/WebhookName.

For more information, see Tutorial: Get started with Amazon Chime in the AWS Chatbot Administrator Guide.

Parameter webhookUrl : The URL for the Amazon Chime webhook.

Parameter loggingLevel : Logging levels include ERROR, INFO, or NONE.

Parameter tags : A map of tags assigned to a resource. A tag is a string-to-string map of key-value pairs.

Implementation

Future<CreateChimeWebhookConfigurationResult>
    createChimeWebhookConfiguration({
  required String configurationName,
  required String iamRoleArn,
  required List<String> snsTopicArns,
  required String webhookDescription,
  required String webhookUrl,
  String? loggingLevel,
  List<Tag>? tags,
}) async {
  final $payload = <String, dynamic>{
    'ConfigurationName': configurationName,
    'IamRoleArn': iamRoleArn,
    'SnsTopicArns': snsTopicArns,
    'WebhookDescription': webhookDescription,
    'WebhookUrl': webhookUrl,
    if (loggingLevel != null) 'LoggingLevel': loggingLevel,
    if (tags != null) 'Tags': tags,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/create-chime-webhook-configuration',
    exceptionFnMap: _exceptionFns,
  );
  return CreateChimeWebhookConfigurationResult.fromJson(response);
}