updateSlackChannelConfiguration method

Future<UpdateSlackChannelConfigurationResult> updateSlackChannelConfiguration({
  1. required String channelId,
  2. required String teamId,
  3. String? channelName,
  4. String? channelRoleArn,
  5. bool? notifyOnAddCorrespondenceToCase,
  6. NotificationSeverityLevel? notifyOnCaseSeverity,
  7. bool? notifyOnCreateOrReopenCase,
  8. bool? notifyOnResolveCase,
})

Updates the configuration for a Slack channel, such as case update notifications.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter channelId : The channel ID in Slack. This ID identifies a channel within a Slack workspace.

Parameter teamId : The team ID in Slack. This ID uniquely identifies a Slack workspace, such as T012ABCDEFG.

Parameter channelName : The Slack channel name that you want to update.

Parameter channelRoleArn : The Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations on Amazon Web Services. For more information, see Managing access to the Amazon Web Services Support App in the Amazon Web Services Support User Guide.

Parameter notifyOnAddCorrespondenceToCase : Whether you want to get notified when a support case has a new correspondence.

Parameter notifyOnCaseSeverity : The case severity for a support case that you want to receive notifications.

If you specify high or all, at least one of the following parameters must be true:

  • notifyOnAddCorrespondenceToCase
  • notifyOnCreateOrReopenCase
  • notifyOnResolveCase
If you specify none, any of the following parameters that you specify in your request must be false:
  • notifyOnAddCorrespondenceToCase
  • notifyOnCreateOrReopenCase
  • notifyOnResolveCase

Parameter notifyOnCreateOrReopenCase : Whether you want to get notified when a support case is created or reopened.

Parameter notifyOnResolveCase : Whether you want to get notified when a support case is resolved.

Implementation

Future<UpdateSlackChannelConfigurationResult>
    updateSlackChannelConfiguration({
  required String channelId,
  required String teamId,
  String? channelName,
  String? channelRoleArn,
  bool? notifyOnAddCorrespondenceToCase,
  NotificationSeverityLevel? notifyOnCaseSeverity,
  bool? notifyOnCreateOrReopenCase,
  bool? notifyOnResolveCase,
}) async {
  final $payload = <String, dynamic>{
    'channelId': channelId,
    'teamId': teamId,
    if (channelName != null) 'channelName': channelName,
    if (channelRoleArn != null) 'channelRoleArn': channelRoleArn,
    if (notifyOnAddCorrespondenceToCase != null)
      'notifyOnAddCorrespondenceToCase': notifyOnAddCorrespondenceToCase,
    if (notifyOnCaseSeverity != null)
      'notifyOnCaseSeverity': notifyOnCaseSeverity.value,
    if (notifyOnCreateOrReopenCase != null)
      'notifyOnCreateOrReopenCase': notifyOnCreateOrReopenCase,
    if (notifyOnResolveCase != null)
      'notifyOnResolveCase': notifyOnResolveCase,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/control/update-slack-channel-configuration',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateSlackChannelConfigurationResult.fromJson(response);
}