Official rule text
87.4 A unit can use its “Sustain Damage” ability any time a hit is produced against it. This includes hits produced during combat and from unit abilities such as the “Space Cannon” ability. a A unit can only use the “Sustain Damage” ability if it is eligible to be hit. For example, a player cannot use a dreadnought’s “Sustain Damage” ability to cancel a hit from “Anti-Fighter Barrage.”
View official source
Source: Living Rules Reference and FAQ - Prophecy of Kings
Expansion: Prophecy of Kings
Version: 2.0
Reference: Rule 87.4