|
22 | 22 | <label for="nav-trigger" class="overlay"></label> |
23 | 23 |
|
24 | 24 | <nav> |
25 | | - <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="machines.html">machines</a><ul class='methods'><li data-type='method'><a href="machines.html#.create">create</a></li><li data-type='method'><a href="machines.html#.destroy">destroy</a></li><li data-type='method'><a href="machines.html#.list">list</a></li><li data-type='method'><a href="machines.html#.restart">restart</a></li><li data-type='method'><a href="machines.html#.show">show</a></li><li data-type='method'><a href="machines.html#.start">start</a></li><li data-type='method'><a href="machines.html#.stop">stop</a></li><li data-type='method'><a href="machines.html#.waitfor">waitfor</a></li></ul></li><li><a href="networks.html">networks</a><ul class='methods'><li data-type='method'><a href="networks.html#.list">list</a></li></ul></li><li><a href="scripts.html">scripts</a><ul class='methods'><li data-type='method'><a href="scripts.html#.create">create</a></li><li data-type='method'><a href="scripts.html#.destroy">destroy</a></li><li data-type='method'><a href="scripts.html#.list">list</a></li><li data-type='method'><a href="scripts.html#.show">show</a></li><li data-type='method'><a href="scripts.html#.text">text</a></li></ul></li><li><a href="templates.html">templates</a><ul class='methods'><li data-type='method'><a href="templates.html#.list">list</a></li></ul></li><li><a href="users.html">users</a><ul class='methods'><li data-type='method'><a href="users.html#.list">list</a></li></ul></li></ul> |
| 25 | + <h2><a href="index.html">Home</a></h2><h3>Namespaces</h3><ul><li><a href="machines.html">machines</a><ul class='methods'><li data-type='method'><a href="machines.html#.create">create</a></li><li data-type='method'><a href="machines.html#.destroy">destroy</a></li><li data-type='method'><a href="machines.html#.list">list</a></li><li data-type='method'><a href="machines.html#.restart">restart</a></li><li data-type='method'><a href="machines.html#.show">show</a></li><li data-type='method'><a href="machines.html#.start">start</a></li><li data-type='method'><a href="machines.html#.stop">stop</a></li><li data-type='method'><a href="machines.html#.utilization">utilization</a></li><li data-type='method'><a href="machines.html#.waitfor">waitfor</a></li></ul></li><li><a href="networks.html">networks</a><ul class='methods'><li data-type='method'><a href="networks.html#.list">list</a></li></ul></li><li><a href="scripts.html">scripts</a><ul class='methods'><li data-type='method'><a href="scripts.html#.create">create</a></li><li data-type='method'><a href="scripts.html#.destroy">destroy</a></li><li data-type='method'><a href="scripts.html#.list">list</a></li><li data-type='method'><a href="scripts.html#.show">show</a></li><li data-type='method'><a href="scripts.html#.text">text</a></li></ul></li><li><a href="templates.html">templates</a><ul class='methods'><li data-type='method'><a href="templates.html#.list">list</a></li></ul></li><li><a href="users.html">users</a><ul class='methods'><li data-type='method'><a href="users.html#.list">list</a></li></ul></li></ul> |
26 | 26 | </nav> |
27 | 27 |
|
28 | 28 | <div id="main"> |
@@ -3166,6 +3166,245 @@ <h6>Properties</h6> |
3166 | 3166 |
|
3167 | 3167 |
|
3168 | 3168 |
|
| 3169 | + |
| 3170 | + <h4 class="name" id=".utilization"><span class="type-signature">(static) </span>utilization<span class="signature">(cb)</span><span class="type-signature"> → {object}</span></h4> |
| 3171 | + |
| 3172 | + |
| 3173 | + |
| 3174 | + |
| 3175 | + |
| 3176 | + |
| 3177 | +<dl class="details"> |
| 3178 | + |
| 3179 | + |
| 3180 | + <dt class="tag-source">Source:</dt> |
| 3181 | + <dd class="tag-source"><ul class="dummy"><li> |
| 3182 | + <a href="machines_utilization.js.html">machines/utilization.js</a>, <a href="machines_utilization.js.html#line6">line 6</a> |
| 3183 | + </li></ul></dd> |
| 3184 | + |
| 3185 | + |
| 3186 | + |
| 3187 | + |
| 3188 | + |
| 3189 | + |
| 3190 | + |
| 3191 | + |
| 3192 | + |
| 3193 | + |
| 3194 | + |
| 3195 | + |
| 3196 | + |
| 3197 | + |
| 3198 | + |
| 3199 | + |
| 3200 | + |
| 3201 | + |
| 3202 | + |
| 3203 | + |
| 3204 | + |
| 3205 | + |
| 3206 | + |
| 3207 | + |
| 3208 | + |
| 3209 | + |
| 3210 | + |
| 3211 | + |
| 3212 | + |
| 3213 | + |
| 3214 | + |
| 3215 | +</dl> |
| 3216 | + |
| 3217 | + |
| 3218 | + |
| 3219 | + |
| 3220 | + |
| 3221 | +<div class="description"> |
| 3222 | + <p>Show machine utilization data for the machine with the given id. Machine upgrades are not represented in utilization data.</p> |
| 3223 | +</div> |
| 3224 | + |
| 3225 | + |
| 3226 | + |
| 3227 | + |
| 3228 | + |
| 3229 | + |
| 3230 | + |
| 3231 | + |
| 3232 | + |
| 3233 | + <h5>Examples</h5> |
| 3234 | + |
| 3235 | + <pre class="prettyprint"><code>paperspace.machines.utilization({ |
| 3236 | + machineId: 'ps123abc', |
| 3237 | + billingMonth: '2017-08', |
| 3238 | +}, function(err, resp) { |
| 3239 | + // handle error or http response |
| 3240 | +});</code></pre> |
| 3241 | + |
| 3242 | + <pre class="prettyprint"><code>$ paperspace machines utilization \ |
| 3243 | + --machineId "ps123abc" \ |
| 3244 | + --billingMonth "2017-08"</code></pre> |
| 3245 | + |
| 3246 | + <pre class="prettyprint"><code># HTTP request: |
| 3247 | +https://api.paperspace.io |
| 3248 | +GET /machines/getUtilization?machineId=ps123abc&billingMonth=2017-08 |
| 3249 | +x-api-key: 1ba4f98e7c0... |
| 3250 | +# Returns 200 on success</code></pre> |
| 3251 | + |
| 3252 | + <pre class="prettyprint"><code>//Example return value: |
| 3253 | +{ |
| 3254 | + "machineId": "ps123abc", |
| 3255 | + "secondsUsed": 1000, |
| 3256 | + "utilization": { |
| 3257 | + "machineId": "ps123abc", |
| 3258 | + "secondsUsed": 1000, |
| 3259 | + "hourlyRate": "0.40", |
| 3260 | + "billingMonth": "2017-08", |
| 3261 | + }, |
| 3262 | + "storageUtilization": { |
| 3263 | + "machineId": "ps123abc", |
| 3264 | + "secondsUsed": 3000, |
| 3265 | + "hourlyRate": "7.00", |
| 3266 | + "billingMonth": "2017-08", |
| 3267 | + }, |
| 3268 | +}</code></pre> |
| 3269 | + |
| 3270 | + |
| 3271 | + |
| 3272 | + |
| 3273 | + <h5>Parameters:</h5> |
| 3274 | + |
| 3275 | + |
| 3276 | +<table class="params"> |
| 3277 | + <thead> |
| 3278 | + <tr> |
| 3279 | + |
| 3280 | + <th>Name</th> |
| 3281 | + |
| 3282 | + |
| 3283 | + <th>Type</th> |
| 3284 | + |
| 3285 | + |
| 3286 | + |
| 3287 | + |
| 3288 | + |
| 3289 | + <th class="last">Description</th> |
| 3290 | + </tr> |
| 3291 | + </thead> |
| 3292 | + |
| 3293 | + <tbody> |
| 3294 | + |
| 3295 | + |
| 3296 | + <tr> |
| 3297 | + |
| 3298 | + <td class="name"><code>params.machineId</code></td> |
| 3299 | + |
| 3300 | + |
| 3301 | + <td class="type"> |
| 3302 | + |
| 3303 | + |
| 3304 | +<span class="param-type">string</span> |
| 3305 | + |
| 3306 | + |
| 3307 | + |
| 3308 | + </td> |
| 3309 | + |
| 3310 | + |
| 3311 | + |
| 3312 | + |
| 3313 | + |
| 3314 | + <td class="description last"><p>Id of the machine to show</p></td> |
| 3315 | + </tr> |
| 3316 | + |
| 3317 | + |
| 3318 | + |
| 3319 | + <tr> |
| 3320 | + |
| 3321 | + <td class="name"><code>params.billingMonth</code></td> |
| 3322 | + |
| 3323 | + |
| 3324 | + <td class="type"> |
| 3325 | + |
| 3326 | + |
| 3327 | +<span class="param-type">string</span> |
| 3328 | + |
| 3329 | + |
| 3330 | + |
| 3331 | + </td> |
| 3332 | + |
| 3333 | + |
| 3334 | + |
| 3335 | + |
| 3336 | + |
| 3337 | + <td class="description last"><p>Billing period to query in <code>YYYY-MM</code> format</p></td> |
| 3338 | + </tr> |
| 3339 | + |
| 3340 | + |
| 3341 | + |
| 3342 | + <tr> |
| 3343 | + |
| 3344 | + <td class="name"><code>cb</code></td> |
| 3345 | + |
| 3346 | + |
| 3347 | + <td class="type"> |
| 3348 | + |
| 3349 | + |
| 3350 | +<span class="param-type">function</span> |
| 3351 | + |
| 3352 | + |
| 3353 | + |
| 3354 | + </td> |
| 3355 | + |
| 3356 | + |
| 3357 | + |
| 3358 | + |
| 3359 | + |
| 3360 | + <td class="description last"><p>Node-style error-first callback function</p></td> |
| 3361 | + </tr> |
| 3362 | + |
| 3363 | + |
| 3364 | + </tbody> |
| 3365 | +</table> |
| 3366 | + |
| 3367 | + |
| 3368 | + |
| 3369 | + |
| 3370 | + |
| 3371 | + |
| 3372 | + |
| 3373 | + |
| 3374 | + |
| 3375 | + |
| 3376 | + |
| 3377 | + |
| 3378 | + |
| 3379 | + |
| 3380 | +<h5>Returns:</h5> |
| 3381 | + |
| 3382 | + |
| 3383 | +<div class="param-desc"> |
| 3384 | + <p>machine - The utilization JSON object</p> |
| 3385 | +</div> |
| 3386 | + |
| 3387 | + |
| 3388 | + |
| 3389 | +<dl class="param-type"> |
| 3390 | + <dt> |
| 3391 | + Type |
| 3392 | + </dt> |
| 3393 | + <dd> |
| 3394 | + |
| 3395 | +<span class="param-type">object</span> |
| 3396 | + |
| 3397 | + |
| 3398 | + </dd> |
| 3399 | +</dl> |
| 3400 | + |
| 3401 | + |
| 3402 | + |
| 3403 | + |
| 3404 | + |
| 3405 | + |
| 3406 | + |
| 3407 | + |
3169 | 3408 |
|
3170 | 3409 | <h4 class="name" id=".waitfor"><span class="type-signature">(static) </span>waitfor<span class="signature">(params, cb)</span><span class="type-signature"> → {object}</span></h4> |
3171 | 3410 |
|
@@ -3484,7 +3723,7 @@ <h5>Returns:</h5> |
3484 | 3723 | <br class="clear"> |
3485 | 3724 |
|
3486 | 3725 | <footer> |
3487 | | - Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.3</a> on Thu Jul 13 2017 22:32:57 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. |
| 3726 | + Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.4</a> on Mon Aug 07 2017 17:19:51 GMT-0400 (EDT) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. |
3488 | 3727 | </footer> |
3489 | 3728 |
|
3490 | 3729 | <script>prettyPrint();</script> |
|
0 commit comments