Class: AwsCli::CLI::IAM::Policies
- Inherits:
-
Thor
- Object
- Thor
- AwsCli::CLI::IAM::Policies
- Defined in:
- lib/awscli/cli/iam/policies.rb
Instance Method Summary collapse
Instance Method Details
#add ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/awscli/cli/iam/policies.rb', line 17 def add create_iam_object if ![:user_name] and ![:group_name] and ![:role_name] puts 'should pass either --user-name or --group-name or --role-name' exit end @iam.add_policy_document end |
#delete ⇒ Object
59 60 61 62 63 64 65 66 |
# File 'lib/awscli/cli/iam/policies.rb', line 59 def delete if ![:user_name] and ![:group_name] and ![:role_name] puts 'should pass either --user-name or --group-name or --role-name' exit end create_iam_object @iam.delete_policy end |
#list ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'lib/awscli/cli/iam/policies.rb', line 45 def list if ![:user_name] and ![:group_name] and ![:role_name] puts 'should pass either --user-name or --group-name or --role-name' exit end create_iam_object @iam.list end |