A rule change by President Trump’s administration that would deny green cards to immigrants receiving public benefits is being protested by New York officials and labor groups.

The rule change, set to take effect in two months, would deny green cards to immigrants who receive forms of public assistance, including Medicaid, food stamps and housing vouchers.

In government parlance it’s known as a “public charge.”

Federal officials say the move is meant to encourage self-sufficiency among the country’s migrant population. But advocates say it will restrict legal immigration and could result in fewer people seeking health care services.

“The public charge rule that the Trump administration released today assaults the ability of taxpaying, legal immigrants to protect their health and feed their children by punishing them for accessing the most basic benefits needed to survive,” said Kyle Bragg, the president of the labor union 32BJ.

“If this final rule becomes law in 60 days, it could force new American families to forego healthcare, go hungry, or become homeless in order to secure a future in America for themselves or their families.”

New York Attorney General Letitia James vowed to file a legal challenge against the move.

“President Trump’s new public charge rule is yet one more example of his Administration turning its back on people fighting to make a better life for them and their families,” she said.

“Under this rule, children will go hungry; families will go without medical care. I am committed to defending all of New York’s communities, which is why I intend to sue the Trump Administration over this egregious rule.”