Class: AwsCli::CLI::IAM::User
- Inherits:
-
Thor
- Object
- Thor
- AwsCli::CLI::IAM::User
- Defined in:
- lib/awscli/cli/iam/user.rb
Instance Method Summary collapse
- #addtogroup ⇒ Object
- #cak ⇒ Object
- #create ⇒ Object
- #dak ⇒ Object
- #delete ⇒ Object
- #lak ⇒ Object
-
#list ⇒ Object
method_option :marker, :aliases => ‘-m’, :desc => ‘used to paginate subsequent requests’ method_option :maxitems, :alises => ‘-i’, :type => :numeric, :desc => ‘limit results to this number per page’.
- #listgroups ⇒ Object
- #passwd ⇒ Object
- #removefromgroup ⇒ Object
- #update ⇒ Object
Instance Method Details
#addtogroup ⇒ Object
80 81 82 83 |
# File 'lib/awscli/cli/iam/user.rb', line 80 def addtogroup create_iam_object @iam.add_user_to_group [:user_name], [:group_name] end |
#cak ⇒ Object
44 45 46 47 |
# File 'lib/awscli/cli/iam/user.rb', line 44 def cak create_iam_object @iam.create_user_access_key [:user_name] end |
#create ⇒ Object
27 28 29 30 |
# File 'lib/awscli/cli/iam/user.rb', line 27 def create create_iam_object @iam.create [:user_name], [:path] end |
#dak ⇒ Object
59 60 61 62 |
# File 'lib/awscli/cli/iam/user.rb', line 59 def dak create_iam_object @iam.delete_user_access_key [:user_name], [:access_key_id] end |
#delete ⇒ Object
34 35 36 37 |
# File 'lib/awscli/cli/iam/user.rb', line 34 def delete create_iam_object @iam.delete [:user_name] end |
#lak ⇒ Object
51 52 53 54 |
# File 'lib/awscli/cli/iam/user.rb', line 51 def lak create_iam_object @iam.list_user_access_keys [:user_name] end |
#list ⇒ Object
method_option :marker, :aliases => ‘-m’, :desc => ‘used to paginate subsequent requests’ method_option :maxitems, :alises => ‘-i’, :type => :numeric, :desc => ‘limit results to this number per page’
14 15 16 17 |
# File 'lib/awscli/cli/iam/user.rb', line 14 def list create_iam_object @iam.list [:path] end |
#listgroups ⇒ Object
95 96 97 98 |
# File 'lib/awscli/cli/iam/user.rb', line 95 def listgroups create_iam_object @iam.list_groups_for_user [:user_name] end |
#passwd ⇒ Object
105 106 107 108 109 110 111 112 |
# File 'lib/awscli/cli/iam/user.rb', line 105 def passwd create_iam_object if [:remove] @iam.remove_password [:user_name] else @iam.assign_password [:user_name], [:password], [:genereate] end end |
#removefromgroup ⇒ Object
88 89 90 91 |
# File 'lib/awscli/cli/iam/user.rb', line 88 def removefromgroup create_iam_object @iam.remove_user_from_group [:user_name], [:group_name] end |
#update ⇒ Object
68 69 70 71 72 73 74 75 |
# File 'lib/awscli/cli/iam/user.rb', line 68 def update create_iam_object if ![:new_user_name] and ![:new_path] puts 'Should pass atleast one option to change, either --new-user-name (or) --new-path' exit end @iam.update_user end |