PHOENIX — Joe Girardi’s actions spoke far louder than his words and sent a message to future opponents that all those power arms lodged in the Yankees’ late-game bullpen will be used when the time is right.

“If I got them set up and they are rested, I am going to go to them,’’ Girardi said of Dellin Betances, Andrew Miller and Aroldis Chapman.

With Nathan Eovaldi throwing a gem and the Yankees leading the Diamondbacks by two runs in the seventh Wednesday night, Girardi replaced his hottest starter with Betances. He worked in and out of trouble and then watched Miller give up a homer to Chris Owings in the eighth. Working with his signature triple-digit gas, Chapman recorded the final three outs and posted the save in a 4-2 Yankees victory that ended a two-game slide and was witnessed by 32,191 at Chase Field.

Eovaldi gave up a leadoff double to Jean Segura in the first inning and retired the next 18 hitters. He was at 85 pitches and thought he would start the seventh.

“I could have,’’ Girardi said of sending Eovaldi out for the seventh. “But I am going to take my chances 99 percent of the time with Betances, Miller and Chapman.”

Your browser does not support iframes.

With Masahiro Tanaka’s recent struggles and Michael Pineda’s putrid season, Eovaldi has evolved into the Yankees’ top starter. The victory, his third straight, raised his record to 4-2.

“I thought I was going to go out there, but I wasn’t disappointed with those three guys coming in,” said Eovaldi, who gave up a run and a hit, didn’t issue a walk and fanned five.

Brett Gardner’s homer, after Jacoby Ellsbury started the game against Shelby Miller with a walk, staked Eovaldi to a 2-0 lead. Segura, whose double was a ground ball up the middle that hit second base and trickled into center field, scored from third on Paul Goldschmidt’s grounder to Chase Headley.

The next 18 Diamondbacks never touched first base.

Ellsbury, who went 3-for-3 with two walks, singled in Headley to make it 3-1 in the sixth.

Betances injected drama into the game by walking the first two Diamondbacks to start the seventh.

“I tried to make them sweat back home,” joked Betances, who calmed the fears by retiring the next three hitters, two by strikeouts. “A lot of people stayed up late. I wanted to make them nervous.”

When Owings took Miller’s 0-2 slider over the left-field wall leading off the eighth, things got a little tighter. However, Miller whiffed the final three batters on filthy sliders, and the Yankees added a run on a wild pitch in the ninth that was scored by Ellsbury.

Chapman reached 102 mph in a perfect ninth and posted his fourth save.

According to Girardi, had the lead been a bit bigger, he might have stayed with Eovaldi. But on a day when owner Hal Steinbrenner singled out players by name as part of the reason the Yankees are last in the AL East and holding a two-run lead in a hitters’ park, Girardi wasn’t going to risk losing the lead without using all of the best late-game pen in baseball.

“We had Betances, Miller and Chapman rested, and that’s what they are there for,” Girardi said.