Validate template information

Last Updated: May 02, 2017

Description

Validate the template used for stack creation.

Request parameters

Name Location Type Required? Description
Template Body Json Yes Template information to be validated.

Returned parameters

Name Parameter type Description
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.
Description Json Information about the template.

Error codes

Error code Description HTTP status code Meaning
InternalError Server error. 500 Server-side unknown exception.
InvalidTemplateVersion Template version was not provided. 400 Invalid template version.
InvalidTemplateVersion Ambiguous versions (%s). 400 Invalid template version.
InvalidTemplateSection The Parameter (%(key)s) has no attributes. 400 Incorrect template attributes.
StackValidationFailed Each Resource must contain a Type key. 400 Resources must contain the Type attribute.
StackValidationFailed Invalid deletion policy “%s”. 400 Invalid deletion policy.
StackValidationFailed “%s” deletion policy not supported. 400 Invalid deletion policy.
StackValidationFailed Unknown Property %s. 400 Unknown property.
InvalidSchemaError Property %(prop)s: %(ua)s and %(im)s cannot both be True. 400 Incorrect template format.

Example

Request example

  1. GET http://ros.aliyuncs.com/validate 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
  14. {
  15. "Template" : {
  16. "ROSTemplateFormatVersion" : "2015-09-01"
  17. }
  18. }

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. "Parameters" : {
  15. },
  16. "Description" : "No description"
  17. }
Thank you! We've received your feedback.