The agreement you signed up to is stated on the Form 308 when you agreed to accept service, and on the Form 75 which you signed on attestation, both of which you should have copies of. Basically, under normal circumstances, you have a right to apply to end your service before your 9 year point 3 years after you complete your training, giving 18 months notice. In reality, it isn't as straight cut as that; the manning situation will considered etc. (I think regt is under manned at present). Only people who can give you a more definitive answer though is your trade sponsor or drafter.