Commissioned officers may resign in such manner and under such circumstances as may be prescribed by federal regulations.