NEW YORK — Brian Cashman realizes Aaron Judge struck gold with his record-setting season, raising the price for the New York Yankees to keep their star slugger.

In the hours before Opening Day, Judge rejected a contract that would have paid him $213.5 million over seven seasons from 2023 to ’29. He is eligible for free agency and will command far more after setting an American League record with 62 homers, tying for the major league lead with 131 RBIs and just missing a Triple Crown with a .311 batting average.

“There’s a pot of gold there,” Cashman, the Yankees general manager, said Sunday ahead of the division series against Cleveland. “It’s yet to be determined what the gold — how much it weighs — but it’s a pot of gold, no doubt about it. So good for him. It was already a big pot and, obviously, it’ll be bigger.”

Judge was drafted by the Yankees in 2013 and homered in his first big league at-bat three years later. The 30-year-old Californian has become the post-Derek Jeter face of the Yankees, a four-time All-Star with 220 home runs over seven seasons and a fan favorite recognizable for his 6-foot-7, 282-pound frame and ever-present smile.

“He’s put himself in an amazing position to have a lot of choices,” Cashman said. “And clearly, obviously, we’d like to win the day on that discussion, and that’s obviously for another day. But we said that before the season. We said that many times during the season. If you need to hear it again. I’ll say it again: Yeah, of course we love to have Aaron Judge back as New York Yankee, but that’s all for another day.”

Judge had a $19 million salary this season in a one-year contract that avoided an arbitration hearing. He would not negotiate a long-term deal during the season.

“I’ve been vocal about I want to be a Yankee for life,” Judge said before the opener. “I want to bring a championship back to New York. I want to do it for the fans here. They’re family. This is home for me, and not getting that done right now, it stinks. … At the end of the year, I’m a free agent. I can talk to 30 teams and the Yankees will be one of those 30 teams.”

New York can negotiate terms with Judge exclusively through the first 15 days after the World Series. After that, all teams can bid.

“He’s a great player who bet on himself, and it’s the all-time best bet, right, the way he navigated the season,” Cashman said. “Obviously, he was healthy, and you know what he’s capable of when he’s healthy. He’s always putting up huge numbers when he stays healthy, and he’s stayed healthy now for a number of years.”