Macros are available only in LCP. Macros have been deprecated and are not available in the Unified Cloud Platform.
To create a custom Macro that will start/stop a specific Server.
Table of Contents
Go to Design -> Macros. Click the New button.
Next, select the "Create New" option. Then click Create to produce a blank macro where you can add your own code that will be executed when a macro is run.
Change the macro's name to be more descriptive of the macro's action. First let's make a macro that will start a server. Change the macro's name to "Start Server 'X'".
Click the Commands tab so that you can add the macro's executable code. Click the Edit link and paste the following code. Use the following code to start and stop a server. (If you are starting a server, remove the "stop server" code and vice-versa)
// replace the account id and the server id// var server_url = "https://my.rightscale.com/api/acct/[acct id]/servers/[server id]" // for example, the account id is 6789// and I want to start a server that has id 12345, for examplevar server_url = "https://my.rightscale.com/api/acct/6789/servers/12345" // start server start_server(server_url) // stop server stop_server(server_url)
You will need to specify the following information for the server:
Repeat the process to create another macro for stopping a Server.
© 2006-2014 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.