lib/cf-resources/api-gateway-resource/apig-utility.js
function(apiId, stageName) {
        return new Promise(function(resolve, reject) {
            APIG.deleteStage({
                restApiId: apiId,
                stageName: stageName
            }, function(err) {
                if (err) {
                    // If no such stage, then success
                    if (err.code === 404 || err.code === 'NotFoundException') {
                        return resolve(apiId);
                    }

                    return reject(err);
                }

                resolve(apiId);
            });
        });
    }
function(apiId, stageName) {
        return new Promise(function(resolve, reject) {
            APIG.deleteStage({
                restApiId: apiId,
                stageName: stageName
            }, function(err) {
                if (err) {
                    // If no such stage, then success
                    if (err.code === 404 || err.code === 'NotFoundException') {
                        return resolve(apiId);
                    }

                    return reject(err);
                }

                resolve(apiId);
            });
        });
    }
function ( apiId , stageName ) { return new Promise ( function ( resolve , reject ) { APIG . deleteStage ( { restApiId : apiId , stageName : stageName } , function ( err ) { if ( err ) { // If no such stage, then success if ( err . code === 404 || err . code === 'NotFoundException' ) { return resolve ( apiId ) ; } return reject ( err ) ; } resolve ( apiId ) ; } ) ; } ) ; }
Delete a specific stage on a specific API

@return {Promise} which resolves to the API ID that the stage was deleted on
Delete a specific stage on a specific API