阅读774 返回首页    go 阿里云


ALIYUN::ROS::WaitConditionHandle__资源列表_资源编排-阿里云

ALIYUN::ROS::WaitConditionHandle 类型可用于创建在 UserData 执行过程中发送消息和接收消息的实例

语法

  1. {
  2. "Type" : "ALIYUN::ROS::WaitConditionHandle",
  3. "Properties" : {
  4. }
  5. }

返回值

Fn::GetAtt

  • CurlCli 该资源产生一个 curl 命令,通过该命令发送 UserData 执行的结果或者状态到 ROS

示例

  1. {
  2. "ROSTemplateFormatVersion" : "2015-09-01",
  3. "Resources" : {
  4. "WebServer": {
  5. "Type": "ALIYUN::ECS::Instance",
  6. "Properties": {
  7. "ImageId" : "centos6u5_64_40G_cloudinit_20160728.raw",
  8. "InstanceType": "ecs.s2.large",
  9. "SecurityGroupId": "sg-94q49gota",
  10. "IoOptimized": "optimized",
  11. "VSwitchId": "vsw-94vdvonyi",
  12. "VpcId": "vpc-949uzr8c9",
  13. "SystemDiskCategory": "cloud_ssd",
  14. "UserData": {"Fn::Replace": [
  15. {"ros-notify": {"Fn::GetAtt": ["WaitConHandle", "CurlCli"]}},
  16. {"Fn::Join": ["", [
  17. "#!/bin/shn",
  18. "mkdir ~/test_rosn",
  19. "print hello > ~/1.txtn",
  20. "ros-notify n",
  21. "ros-notify -d '{\"id\" : \"1\"}'n"
  22. ]]}]}
  23. }
  24. },
  25. "WaitConHandle": {
  26. "Type": "ALIYUN::ROS::WaitConditionHandle"
  27. },
  28. "WaitCondition": {
  29. "Type": "ALIYUN::ROS::WaitCondition",
  30. "Properties": {
  31. "Handle": {"Ref": "WaitConHandle"},
  32. "Timeout": 60,
  33. "Count": 2
  34. }
  35. },
  36. },
  37. "Outputs": {
  38. "InstanceId": {
  39. "Value" : {"Fn::GetAtt": ["WebServer","InstanceId"]}
  40. },
  41. "PublicIp": {
  42. "Value" : {"Fn::GetAtt": ["WebServer","PublicIp"]}
  43. },
  44. "CurlCli" : {
  45. "Value" : { "Fn::GetAtt": ["WaitConHandle", "CurlCli"] }
  46. },
  47. "Data" : {
  48. "Value" : { "Fn::GetAtt": ["WaitCondition", "Data"] }
  49. }
  50. }
  51. }

最后更新:2016-12-20 17:12:51

  上一篇:go ALIYUN::ROS::WaitCondition__资源列表_资源编排-阿里云
  下一篇:go ALIYUN::SLB::VServerGroup__资源列表_资源编排-阿里云