The Leontovich impedance condition is considered in relation to the boundary with an external isotropic medium characterized by the effective parameters of metamaterials. The surface impedance depends not only on the complex dielectric permittivity and complex magnetic permeability of the substance, but also on the type of the evanescent plane wave. Particular cases of transparent media and media with a balance of electrical and magnetic losses are considered. The conditions for the applicability of the impedance approximation are specified.