-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Cox-Automotive/develop
2.10.0 Release
- Loading branch information
Showing
6 changed files
with
64 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env node | ||
'use strict'; | ||
|
||
process.title = 'ALKS'; | ||
|
||
var program = require('commander'), | ||
clc = require('cli-color'), | ||
_ = require('underscore'), | ||
async = require('async'), | ||
alks = require('alks-node'), | ||
config = require('../package.json'), | ||
Iam = require('../lib/iam'), | ||
Developer = require('../lib/developer'), | ||
utils = require('../lib/utils'); | ||
|
||
var logger = 'iam-delete'; | ||
|
||
program | ||
.version(config.version) | ||
.description('remove an IAM role') | ||
.option('-n, --rolename [rolename]', 'the name of the role to delete') | ||
.option('-a, --account [alksAccount]', 'alks account to use') | ||
.option('-r, --role [alksRole]', 'alks role to use') | ||
.option('-v, --verbose', 'be verbose') | ||
.parse(process.argv); | ||
|
||
var roleName = program.rolename, | ||
alksAccount = program.account, | ||
alksRole = program.role; | ||
|
||
utils.log(program, logger, 'validating role name: ' + roleName); | ||
if(_.isEmpty(roleName)){ | ||
utils.errorAndExit('The role name must be provided.'); | ||
} | ||
|
||
Iam.getIAMKey(program, logger, alksAccount, alksRole, false, function(err, key, developer, password){ | ||
if(err){ | ||
return utils.errorAndExit(err); | ||
} | ||
|
||
var data = _.extend({}, developer, key); | ||
utils.log(program, logger, 'calling api to delete role: ' + roleName); | ||
|
||
alks.deleteIamRole(data, password, roleName, { debug: program.verbose, ua: utils.getUA() }, function(err, data){ | ||
if(err){ | ||
return utils.errorAndExit(err); | ||
} | ||
|
||
console.error(clc.white(['The role ', roleName, ' was deleted'].join(''))); | ||
utils.log(program, logger, 'checking for updates'); | ||
utils.checkForUpdate(); | ||
Developer.trackActivity(logger); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
★ Release Notes: 2017-04-25 ★ | ||
★ Release Notes: 2017-05-04 ★ | ||
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡ | ||
|
||
Thanks for upgrading to the latest version of the ALKS CLI! | ||
|
||
→ Better aligns functionality with ALKS website | ||
→ Admin and IAMAdmin roles now show up without -i for sessions | ||
→ You'll still need to pass -i to get an IAM session | ||
→ Performance increase | ||
→ Adds support for deleting IAM roles: alks iam help deleterole | ||
→ Have feedback? https://github.com/Cox-Automotive/ALKS-CLI/issues | ||
|
||
☁☁☁☁☁☁ Happy Clouding! ☁☁☁☁☁☁ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters