Question

How to programmatically check if outbound transfer limit was reached?

I would like a way to detect if my monthly outbound transfer limit was reached, either via an automated action or an API call. My ultimate goal is to detect when this limit is reached and then automatically shut down my API (it is not critical, and I’d rather it be unavailable than racking up extra charges).

As far as I can tell from checking this forum and the API docs, there is currently no way to do this. One endpoint I toyed with was v2/monitoring/metrics/droplet/bandwidth, but this is not the same thing as outbound transfer.

I know that the chance of me hitting my limit is small (I usually don’t get anywhere close to it), but it just makes me uneasy to think that the only thing standing between me and financial ruin is a script that continuously calls my API, so I’d rather be safe than sorry.

I have a billing alert set to $1 above my expected monthly charges so I can manually respond ASAP if needed, but I would rather have a mechanism to shut it down immediately if possible, just for my own peace of mind.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey @frankkulak,

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

https://ideas.digitalocean.com/

Hope that helps!

- Bobby.