batchRemoveChannelRoleFromAccessors method
Remove a role from multiple users or groups in a private re:Post channel.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter accessorIds :
The users or groups identifiers to remove the role from.
Parameter channelId :
The unique ID of the private re:Post channel.
Parameter channelRole :
The channel role to remove from the users or groups.
Parameter spaceId :
The unique ID of the private re:Post.
Implementation
Future<BatchRemoveChannelRoleFromAccessorsOutput>
batchRemoveChannelRoleFromAccessors({
required List<String> accessorIds,
required String channelId,
required ChannelRole channelRole,
required String spaceId,
}) async {
final $payload = <String, dynamic>{
'accessorIds': accessorIds,
'channelRole': channelRole.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/spaces/${Uri.encodeComponent(spaceId)}/channels/${Uri.encodeComponent(channelId)}/roles',
exceptionFnMap: _exceptionFns,
);
return BatchRemoveChannelRoleFromAccessorsOutput.fromJson(response);
}