Note: Please go to docs.rightscale.com to access the current RightScale documentation set. Also, feel free to Chat with us!
Home > Guides > RightScale API 1.5 > Examples > ServerTemplates > Clone a ServerTemplate

Clone a ServerTemplate

 

Clone a specific ServerTemplate, provide a name for the new ServerTemplate.

   

Table of Contents

Curl

Prerequisite:  Example assumes you have previously authenticated, and your valid session cookie is in 'mycookie'.

Example Call

#!/bin/sh -e
ST="252299001"                           # STID to clone.  Obtain via the Dashboard or using the API to List STs.
curl -i -H X_API_VERSION:1.5 -b mycookie \
-d server_template[name]="HAProxy Clone" \                 # Specify the new name of the cloned ServerTemplate
-d server_template[description]="ST Clone via API" \       # Specify new description
-X POST https://my.rightscale.com/api/server_templates/$ST/clone

Sample Output

HTTP/1.1 201 Created
Server: nginx/1.0.15
Date: Tue, 06 Nov 2012 18:36:46 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 201 Created
Location: /api/server_templates/270391001
X-Runtime: 6107
X-Request-Uuid: 57692eb0a7594ccc900d03021874f50b
Set-Cookie:
Cache-Control: no-cache

To view the cloned ServerTemplate in the Dashboard:

  • Navigate to Design > ServerTemplates
  • Enter the nickname you specified and apply the filter

Postman

See the Clone a ServerTemplate example (RightScale API 1.6 Guide:  Appendix A - APEye Tools > Google Chrome Postman Plugin)

You must to post a comment.
Last modified
13:05, 17 Dec 2013

Tags

Classifications

This page has no classifications.

Announcements

None


© 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.