Deis.setLimit()

Sets resource limits for an application.

Usage

Hover over inputs/exits for more info.

var Deis = require('machinepack-deis');


// Sets resource limits for an application.

Deis.setLimit({

token: '',

controller: 'http://deis.mydeisapp.com',

app: 'myawesomeapp',

value: '512M',

limit: 'memory',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// The value supplied for `limit` is invalid. It must be either cpu or memory.

invalidLimit: function () {

 

},

// The token provided was invalid

notAuthenticated: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

token required

An access token for use with a Deis install.

''
controller required

The controller location of your Deis install.

'http://deis.mydeisapp.com'
app required

The uniquely identifiable name for the application.

'myawesomeapp'
value required

The value to set for the limit. With memory, units are represented in Bytes (B), Kilobytes (K), Megabytes(M), or Gigabytes (G). e.g. "1G". With cpu, units are represented in the number of cpu shares. e.g. 1024.

'512M'
limit

Which resource limit will be set. Defaults to memory.

'memory'

Exits

error

An unexpected error occurred.

invalidLimit

The value supplied for `limit` is invalid. It must be either cpu or memory.

notAuthenticated

The token provided was invalid

success

OK.

{ memory: '512M', cpu: 'unlimited' }