Query template information

Last Updated: Apr 20, 2017


This interface is used to query the template information that is input during stack creation.

Request parameters

Name Location Type Required? Description
StackName URI String Yes Name of the resource type.
StackId URI String Yes ID of the resource type.

Return parameters

The system returns the following template details:

Name Parameter type Description
ROSTemplateFormatVersion String Template version.
Parameters Json These parameters are output if they are set during stack creation. The input parameters are the parameters required to create a stack based on the template. These parameters specify the details of stack creation, such as the username, password, and environment-related ECS instance type.
Outputs Json These parameters are output if they are set during stack creation. The Outputs parameter defines the information returned to the user after the stack is created.
Resources Json The Resources parameter defines the cloud resources that ROS deploys using the template. Each resource is defined in a separate resource block.
Description Json These parameters are output if they are set during stack creation. The Description parameter contains information about the template.

Error codes

Error code Description HTTP status code Meaning
InternalError Server error. 500 Server-side unknown exception.
StackNotFound The Stack (%(stack_name)s) could not be found. 404 The stack does not exist.


Request example

  1. GET http://ros.aliyuncs.com/ stacks/myStack/378826b1-a71b-4c14-aa91-9b36351fbea9/template HTTP/1.1
  2. x-acs-signature-method: HMAC-SHA1
  3. Authorization: acs ACSTQDkNtSMrZtwL:fWkOnYo6QzK3KvMANKE0VFeBos4=
  4. Date: Fri, 11 Sep 2015 05:31:53 GMT
  5. x-acs-signature-version: 1.0
  6. x-sdk-client: Java/2.0.0
  7. Accept: application/octet-stream
  8. x-acs-version: 2015-09-01
  9. Cache-Control: no-cache
  10. Pragma: no-cache
  11. User-Agent: Java/1.6.0_27
  12. Host: ros.aliyuncs.com
  13. Connection: keep-alive

Response example

  1. HTTP/1.1 200 OK
  2. Date: Fri, 11 Sep 2015 05:30:12 GMT
  3. Content-Type: application/json; charset=UTF-8
  4. Content-Length: 1694
  5. Connection: close
  6. Vary: Accept-Encoding
  7. Access-Control-Allow-Origin: *
  8. Access-Control-Allow-Methods: POST, GET, OPTIONS
  9. Access-Control-Allow-Headers: X-Requested-With, X-Sequence, _aop_secret, _aop_signature
  10. Access-Control-Max-Age: 172800
  11. X-Acs-Request-Id: A21A4B12-CCD7-42F0-9A62-DE8347D88385
  12. Server: Jetty(7.2.2.v20101205)
  13. {
  14. "ROSTemplateFormatVersion" : "2015-09-01",
  15. "Resources" : {
  16. "str2" : {
  17. "Type" : "ALIYUN::RandomString"
  18. },
  19. "str1" : {
  20. "Type" : "ALIYUN::RandomString",
  21. "DependsOn" : "str2"
  22. }
  23. },
  24. "Description" : "Simple template to deploy a single compute instance"
  25. }
Thank you! We've received your feedback.