BOSTON (AP) — Short-term rental business Airbnb is suing the city of Boston over regulations aimed at cracking down on investors who buy housing units to list on the platform.

The lawsuit filed Tuesday in federal court says the ordinance violates state and federal law by forcing home-sharing platforms to share information about clients with the city and requiring the platforms to enforce the new rules. The new rules passed in June take effect Jan. 1.

The regulations ban renters and investors from renting apartments by the night, but allow people to rent a room in their home or a spare unit provided they own and live in the property.

Supporters hope the regulations will make the city’s tight housing market more affordable.

Boston officials didn’t immediately respond to an email Tuesday.