Hi Ali,

Please note, *APIv1 has been deprecated*.  This is easily achievable with 
APIv2 server action suspend as documented here 
<https://api-explorer.scalr.com/user/servers/actions/post_suspend.html>.  
We also recommend that you use the new scalr-ctl tool instead of the 
previous command line tools.  This can be installed with: #pip install 
scalr-ctl

This suspend action is not possible directly from APIv1, but you may be 
able to achieve this by setting your autoscaling settings for the Farm Role 
to a Scaling Behavior of "Resume / Suspend" instead of the default "Launch 
/ Terminate" as described in our Wiki 
<https://scalr-wiki.atlassian.net/wiki/display/docs/Autoscaling+and+Suspend+-+Resume>.
  
You could then use the APIv1 FarmUpdateRole 
<https://scalr-wiki.atlassian.net/wiki/display/docs/FarmUpdateRole> call to 
change the max instances value and cause a downscale with suspend as the 
default action.

Many thanks,
Wm. Marc O'Brien
Scalr Technical Support




On Wednesday, July 20, 2016 at 8:24:29 AM UTC-6, Ali wrote:
>
> Hi I am  using the REST-API 1.0 and scalr CLI. for now.
>
> the AWS EC2 instances I have are all of type "R3" so when I stop server I 
> don't loose any data when restarting the instance . so I am able   to stop 
> the EC2s without worrying about loosing data when I restart it.
>
> having said that. here is my question.
>
> it seems I can spin EC2 or terminate EC2 instances and not stop instances 
>  using scalr CLI or the rest-api
> is there a way to be able to stop (suspend) EC2 using the rest-api or 
> scalr CLI  that I may be missing or miss-understanding looking at the 
> documents ? 
> since the option of stop/suspend EC2 instance is in the web console, so I 
> assume you should be able to do the same using the CLI or rest-api.
>
> the scalr CLI options  that I see are:
> launch-server
> list-servers
> reboot-server
> terminate-server
>
> and there not seem to be a stop-server option  in the CLI or  rest-api 1.0.
>
> very much appreciate your help on this matter.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to