Get the remaining bandwidth for a Netlify site.
import { netlifyBandwidth } from '@zendeskgarden/scripts';
const args: {
siteId?: string;
token?: string;
} = {
/* optional overrides */
};
(async () => {
const result = await netlifyBandwidth(args);
if (result) {
const { available, used } = result;
console.log(available - used);
}
})();
siteId
optional Netlify site API ID; defaults to the value provided bynetlifySiteId
.token
optional Netlify personal access token; defaults to the value provided bynetlifyToken
.
garden netlify-bandwidth \
[--id <id>] \
[--token <token>]