Sounds more like an ultimatum given the dire consequences for non-compliance.
Depends on your perspective. If you believe God simply made a way to protect you from a bad end than it's a gift. If you believe God made a punishment for disobeying, then it's an ultimatum.