閱讀654 返回首頁    go iPhone_iPad_Mac_手機_平板_蘋果apple


ALIYUN::SLB::VServerGroup__資源列表_資源編排-阿裏雲

ALIYUN::SLB::VServerGroup 類型可用於創建虛擬服務器組並添加後端服務器到負載均衡實例

語法

  1. {
  2. "Type" : "ALIYUN::SLB::VServerGroup",
  3. "Properties" : {
  4. "VServerGroupName" : String,
  5. "BackendServers" : List,
  6. "LoadBalancerId" : String
  7. }
  8. }

屬性

屬性名稱 類型 必須 描述 約束
VServerGroupName string 虛擬服務器組名稱
BackendServers list 需要添加的後端服務器列表 列表元素個數最多20個
LoadBalancerId string 負載均衡實例 ID

BackendServers 語法

  1. "BackendServers" : [
  2. {
  3. "ServerId" : String,
  4. "Port" : Integer,
  5. "Weight" : Integer
  6. }
  7. ]

BackendServers 屬性

屬性名稱 類型 必須 描述 約束
ServerId string ECS 實例 ID
Port integer 在負載均衡中監聽的 ECS 端口號 取值:[1, 65535]
Weight integer ECS 實例在負載均衡實例中的權重 取值:[0,100]

返回值

Fn::GetAtt

  • VServerGroupId 虛擬服務器組的 ID
  • BackendServers 添加到負載均衡實例的後端服務器列表

示例

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Resources": {
  4. "CreateVServerGroup": {
  5. "Type": "ALIYUN::SLB::VServerGroup",
  6. "Properties": {
  7. "LoadBalancerId": "lb-2zenh4ndwrqg14yt094fg",
  8. "VServerGroupName": "VServerGroup-test",
  9. "BackendServers": [
  10. {
  11. "ServerId": "i-25zskuabf",
  12. "Weight": 20,
  13. "Port": 8080
  14. },
  15. {
  16. "ServerId": "i-25zskuabf",
  17. "Weight": 100,
  18. "Port": 8081
  19. }
  20. ]
  21. }
  22. }
  23. },
  24. "Outputs": {
  25. "VServerGroupId": {
  26. "Value" : {"Fn::GetAttr": ["CreateVServerGroup", "VServerGroupId"]
  27. }
  28. }
  29. }
  30. }

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

  上一篇:go ALIYUN::ROS::WaitConditionHandle__資源列表_資源編排-阿裏雲
  下一篇:go ALIYUN::SLS::ApplyConfigToMachineGroup__資源列表_資源編排-阿裏雲