Is it safe to get a flu shot during pregnancy?

Is it safe to get a flu shot during pregnancy?