© 2021 IFIP.A communication receiver that wants to pull data from a remote sensor by exploiting wireless energy transfer is considered. The receiver has a long-term average energy budget for this operation, and its goal is to keep the time average of a general age penalty function as small as possible. The channel from the source to the receiver is a two-state (ON/OFF) communication link whose state is IID or Markovian, and known instantaneously by the receiver. Modeling the problem as a constrained Markov decision problem, we obtain a randomized threshold-based decision policy that achieves the minimum possible average age penalty. We determine the optimal time average Age of Information and age violation probabilities by exploiting the optimality of the derived policy.