updateChannel method

Future<void> updateChannel({
  1. required String channelId,
  2. required String channelName,
  3. required String spaceId,
  4. String? channelDescription,
})

Modifies an existing channel.

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

Parameter channelId : The unique ID of the private re:Post channel.

Parameter channelName : The name for the channel. This must be unique per private re:Post.

Parameter spaceId : The unique ID of the private re:Post.

Parameter channelDescription : A description for the channel. This is used only to help you identify this channel.

Implementation

Future<void> updateChannel({
  required String channelId,
  required String channelName,
  required String spaceId,
  String? channelDescription,
}) async {
  final $payload = <String, dynamic>{
    'channelName': channelName,
    if (channelDescription != null) 'channelDescription': channelDescription,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/spaces/${Uri.encodeComponent(spaceId)}/channels/${Uri.encodeComponent(channelId)}',
    exceptionFnMap: _exceptionFns,
  );
}