ravia
Intern
Intern
  • UID7494
  • Fans0
  • Follows0
  • Posts1
Reads:155Replies:2

[products]ROS create stack not working

Created#
More Posted time:Jun 4, 2019 8:05 AM
Does anyone has a working example for creating a stack using ROS using CLI.


I tried creating a simple stack with just a Topic resource, but can't get away with the error below:


aliyun ros --TimeoutMins 10 POST /stacks --body '{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "MaximumMessageSize": { "Type": "Number", "Description": "Maximum body length of a message sent to the topic, in the unit of bytes.\nAn integer in the range of 1,024 (1 KB) to 65, 536 (64 KB); default value: 65,536 (64 KB).", "MinValue": 1024, "MaxValue": 65536, "Default": 65536 }, "TopicName": { "Type": "String", "Description": "Topic name", "MinLength": 1, "MaxLength": 256 } }, "Resources": { "Topic": { "Type": "ALIYUN::MNS::Topic", "Properties": { "MaximumMessageSize": { "Ref": "MaximumMessageSize" }, "LoggingEnabled": { "Ref": "LoggingEnabled" }, "TopicName": { "Ref": "TopicName" } } } }, "Outputs": { "TopicUrl": { "Description": "URL of created topic", "Value": { "Fn::GetAtt": [ "Topic", "TopicUrl" ] } } } }' --content-type "application/json"



ERROR: SDK.ServerError
ErrorCode: HTTPBadRequest
Recommend:
RequestId:
Message: Parameter 'TimeoutMins' stack timeout needed.


Not sure where and how do I specify this TimeoutMins.


Thanks,
Ravi

depy
Intern
Intern
  • UID5786
  • Fans0
  • Follows0
  • Posts3
1st Reply#
Posted time:Jun 11, 2019 19:40 PM
Hello Ravi,

From the error message you are receiving it says that you are missing a parameter 'TimeoutMins' which is needed by the endpoint.

I have myself not tried it, or do not have any working examples to show however Alibaba Cloud's own documentation may prove to be a guide for using CLI to create a stack.

https://www.alibabacloud.com/help/doc-detail/57843.htm?spm=a2c63.l28256.a3.24.698b13a3veYVoZ

Also if you can mention the steps you took to try to solve the issue or create a stack it may help me in helping you further.

roura
Intern
Intern
  • UID5629
  • Fans4
  • Follows2
  • Posts26
2nd Reply#
Posted time:Jun 11, 2019 19:45 PM
Hi! TimeoutMins should go in the body of the POST request, not as an argument. So you should add ""TimeoutMins": "10"" before the "Parameters" key.



By the way, I strongly recommend you using the web console if you are new in ROS (https://ros.console.aliyun.com/). There you can visually create stacks and get some cool examples of working solutions. Great way to learn!
Guest