Class: NeetoDeploy::CLI::AutoscalingConfig::List
- Includes:
- Session
- Defined in:
- lib/neeto_deploy/cli/autoscaling_config/list.rb
Instance Attribute Summary collapse
-
#app_slug ⇒ Object
readonly
Returns the value of attribute app_slug.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(options:) ⇒ List
constructor
A new instance of List.
- #run ⇒ Object
Methods included from Session
#common_body, require_app_option, #send_delete_request, #send_get_request, #send_patch_request, #send_post_request
Methods inherited from Base
Constructor Details
#initialize(options:) ⇒ List
Returns a new instance of List.
13 14 15 16 |
# File 'lib/neeto_deploy/cli/autoscaling_config/list.rb', line 13 def initialize(options:) super() @app_slug = [:app] end |
Instance Attribute Details
#app_slug ⇒ Object (readonly)
Returns the value of attribute app_slug.
11 12 13 |
# File 'lib/neeto_deploy/cli/autoscaling_config/list.rb', line 11 def app_slug @app_slug end |
Instance Method Details
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/neeto_deploy/cli/autoscaling_config/list.rb', line 18 def run response = send_get_request( "#{NEETO_DEPLOY_CLI_API_BASE_URL}/autoscaling_configs/#{app_slug}", { app_slug: } ) ui.error(response) and return unless response.success? ui.success(JSON.parse(response.body)["autoscaling_status"]) end |