Query the resource type template information

Last Updated: Apr 20, 2017

Description

This interface is used to query the template information that corresponds to a specific resource type.

Request parameters

Name Location Type Required? Description
TypeName URI String Yes Name of the resource type.

Return parameters

Name Parameter type Description
ROSTemplateFormatVersion String Template version.
Parameters Json 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 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.

Error codes

Error code Description HTTP status code Meaning
InternalError Server error. 500 Server-side unknown exception.
ResourceTypeNotFound The Resource Type (%(type_name)s) could not be found. 404 The resource type cannot be found.

Example

Request example

  1. GET http://ros.aliyuncs.com/resource_types/ALIYUN::SLB::LoadBalancer/template HTTP/1.1
  2. x-acs-signature-method: HMAC-SHA1
  3. Authorization: acs ACSTQDkNtSMrZtwL:niea/6wW/HHwwiafneHX+oM3ALU=
  4. Date: Fri, 11 Sep 2015 05:30:54 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. "Parameters" : {
  16. "InternetChargeType" : {
  17. "AllowedValues" : [
  18. "paybybandwidth",
  19. "paybytraffic"
  20. ],
  21. "Type" : "String",
  22. "Description" : "The charging type of network billing."
  23. },
  24. "AddressType" : {
  25. "AllowedValues" : [
  26. "internet",
  27. "intranet"
  28. ],
  29. "Type" : "String",
  30. "Description" : "The type of address."
  31. },
  32. "Bandwidth" : {
  33. "Description" : "The bandwidth in Mbps of network.",
  34. "Type" : "Number",
  35. "MinValue" : 1,
  36. "MaxValue" : 1000
  37. },
  38. "VpcId" : {
  39. "Type" : "String",
  40. "Description" : "The id of virtual private cloud."
  41. },
  42. "VSwitchId" : {
  43. "Type" : "String",
  44. "Description" : "The id of software-based network switch."
  45. },
  46. "LoadBalancerName" : {
  47. "Type" : "String",
  48. "Description" : "The display name of load balance."
  49. }
  50. },
  51. "Outputs" : {
  52. "LoadBalancerId" : {
  53. "Value" : "{\"Fn::GetAtt\": [\"LoadBalance\", \"LoadBalancerId\"]}",
  54. "Description" : "The id of load balance generated"
  55. }
  56. },
  57. "Resources" : {
  58. "LoadBalance" : {
  59. "Type" : "ALIYUN::SLB::LoadBalancer",
  60. "Properties" : {
  61. "InternetChargeType" : {
  62. "Ref" : "InternetChargeType"
  63. },
  64. "AddressType" : {
  65. "Ref" : "AddressType"
  66. },
  67. "Bandwidth" : {
  68. "Ref" : "Bandwidth"
  69. },
  70. "VpcId" : {
  71. "Ref" : "VpcId"
  72. },
  73. "VSwitchId" : {
  74. "Ref" : "VSwitchId"
  75. },
  76. "LoadBalancerName" : {
  77. "Ref" : "LoadBalancerName"
  78. }
  79. }
  80. }
  81. }
  82. }
Thank you! We've received your feedback.