lib/endpoints/maintenance_mode.js
/**
 * Start maintenance mode for routing keys.
 *
 * @param {Object} modeDef Maintenance mode definition.
 * @returns {Promise<Object>} VictorOps API response.
 */
Start maintenance mode for routing keys.
@param {Object} modeDef Maintenance mode definition.
@returns {Promise} VictorOps API response.
Start maintenance mode for routing keys . @param { Object } modeDef Maintenance mode definition . @returns { Promise } VictorOps API response .
async function startMode(modeDef = {}) {
  try {
    const apiPrefix = this.getApiPrefix();
    const options = this._getRequestOptions('POST',
      `${apiPrefix}/maintenancemode/start`, null, modeDef);
    return await this._performRequest(options);
  } catch (err) {
    throw this._handleError(err);
  }
}
async function startMode ( modeDef = { } ) { try { const apiPrefix = this . getApiPrefix ( ) ; const options = this . _getRequestOptions ( 'POST' , ` ${ apiPrefix } ` , null , modeDef ) ; return await this . _performRequest ( options ) ; } catch ( err ) { throw this . _handleError ( err ) ; } }
Start maintenance mode for routing keys.
Start maintenance mode for routing keys .
// Get the API prefix. // Get the request options. // Peform the request.