Class: SoracomCli::User
- Inherits:
-
Thor
- Object
- Thor
- SoracomCli::User
- Defined in:
- lib/soracom/cli.rb
Overview
User related commands
Instance Method Summary collapse
- #create_password ⇒ Object
- #create_user ⇒ Object
- #delete_auth_key ⇒ Object
- #delete_password ⇒ Object
- #delete_user ⇒ Object
- #generate_auth_key ⇒ Object
- #get_auth_key ⇒ Object
- #get_permission ⇒ Object
- #get_user ⇒ Object
- #has_password ⇒ Object
- #list_auth_keys ⇒ Object
- #list_users ⇒ Object
- #update_permission ⇒ Object
- #update_user ⇒ Object
Instance Method Details
#create_password ⇒ Object
426 427 428 429 430 |
# File 'lib/soracom/cli.rb', line 426 def create_password client = Soracom::Client.new(profile:.profile) data = client.create_user_password(.user_name, .password) puts JSON.pretty_generate(data) end |
#create_user ⇒ Object
358 359 360 361 362 |
# File 'lib/soracom/cli.rb', line 358 def create_user client = Soracom::Client.new(profile:.profile) data = client.create_user(.user_name, .description) puts JSON.pretty_generate(data) end |
#delete_auth_key ⇒ Object
392 393 394 395 396 |
# File 'lib/soracom/cli.rb', line 392 def delete_auth_key client = Soracom::Client.new(profile:.profile) data = client.delete_users_auth_key(.user_name, .auth_key_id) puts JSON.pretty_generate(data) end |
#delete_password ⇒ Object
409 410 411 412 413 |
# File 'lib/soracom/cli.rb', line 409 def delete_password client = Soracom::Client.new(profile:.profile) data = client.delete_user_password(.user_name) puts JSON.pretty_generate(data) end |
#delete_user ⇒ Object
341 342 343 344 345 |
# File 'lib/soracom/cli.rb', line 341 def delete_user client = Soracom::Client.new(profile:.profile) data = client.delete_user(.user_name) puts JSON.pretty_generate(data) end |
#generate_auth_key ⇒ Object
383 384 385 386 387 |
# File 'lib/soracom/cli.rb', line 383 def generate_auth_key client = Soracom::Client.new(profile:.profile) data = client.generate_users_auth_key(.user_name) puts JSON.pretty_generate(data) end |
#get_auth_key ⇒ Object
401 402 403 404 405 |
# File 'lib/soracom/cli.rb', line 401 def get_auth_key client = Soracom::Client.new(profile:.profile) data = client.get_users_auth_key(.user_name, .auth_key_id) puts JSON.pretty_generate(data) end |
#get_permission ⇒ Object
434 435 436 437 438 |
# File 'lib/soracom/cli.rb', line 434 def client = Soracom::Client.new(profile:.profile) data = client.(.user_name) puts JSON.pretty_generate(data) end |
#get_user ⇒ Object
349 350 351 352 353 |
# File 'lib/soracom/cli.rb', line 349 def get_user client = Soracom::Client.new(profile:.profile) data = client.get_user(.user_name) puts JSON.pretty_generate(data) end |
#has_password ⇒ Object
417 418 419 420 421 |
# File 'lib/soracom/cli.rb', line 417 def has_password client = Soracom::Client.new(profile:.profile) data = client.has_user_password(.user_name) puts JSON.pretty_generate(data) end |
#list_auth_keys ⇒ Object
375 376 377 378 379 |
# File 'lib/soracom/cli.rb', line 375 def list_auth_keys client = Soracom::Client.new(profile:.profile) data = client.list_users_auth_key(.user_name) puts JSON.pretty_generate(data) end |
#list_users ⇒ Object
333 334 335 336 337 |
# File 'lib/soracom/cli.rb', line 333 def list_users client = Soracom::Client.new(profile:.profile) data = client.list_users() puts JSON.pretty_generate(data) end |