updateRoomMembership method
Updates room membership details, such as the member role, for a room in an Amazon Chime Enterprise account. The member role designates whether the member is a chat room administrator or a general chat room member. The member role can be updated only for user IDs.
May throw BadRequestException.
May throw ForbiddenException.
May throw NotFoundException.
May throw ServiceFailureException.
May throw ServiceUnavailableException.
May throw ThrottledClientException.
May throw UnauthorizedClientException.
Parameter accountId :
The Amazon Chime account ID.
Parameter memberId :
The member ID.
Parameter roomId :
The room ID.
Parameter role :
The role of the member.
Implementation
Future<UpdateRoomMembershipResponse> updateRoomMembership({
required String accountId,
required String memberId,
required String roomId,
RoomMembershipRole? role,
}) async {
final $payload = <String, dynamic>{
if (role != null) 'Role': role.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/accounts/${Uri.encodeComponent(accountId)}/rooms/${Uri.encodeComponent(roomId)}/memberships/${Uri.encodeComponent(memberId)}',
exceptionFnMap: _exceptionFns,
);
return UpdateRoomMembershipResponse.fromJson(response);
}