阅读227 返回首页    go 阿里云 go 技术社区[云栖]


ALIYUN::CS::Cluster__资源列表_资源编排-阿里云

ALIYUN::CS::Cluster 类型可用于创建阿里云 Docker 集群

语法

  1. {
  2. "Type" : "ALIYUN::CS::Cluster",
  3. "Properties" : {
  4. "VpcId" : String,
  5. "Name" : String,
  6. "ImageId" : String,
  7. "VSwitchId" : String,
  8. "SubnetCidr" : String,
  9. "Password" : String,
  10. "InstanceType" : String,
  11. "ZoneId" : String,
  12. "Size" : Integer
  13. }
  14. }

属性

属性名称 类型 必须 描述 约束
Name string 指定Docker集群的名称 名称为1-64个字符,可包含数字、汉字、英文字符,或”-“
InstanceType string 指定创建Docker集群所用 ECS 的规格
Size integer 指定集群使用多少台 ECS 实例
VpcId string 指定专有网络 ID
ImageId string 指定 ECS 实例所用的镜像 ID
VSwitchId string 指定 VpcId 下的虚拟交换机 ID
SubnetCidr string 指定 Docker 容器的子网地址. 允许的子网段为:172.17.0.0/24 - 172.31.0.0/24. 确保此网段不能和专有网络相同
Password string 指定 ECS 实例的登录密码 实例的密码。8 - 30 个字符,同时包含大小写字母和数字,不支持特殊符号
ZoneId string 指定创建 Cluster 的可用区

返回值

Fn::GetAtt

  • MasterUrl 集群的主 URL 地址
  • Ca CA 证书
  • ClusterId 集群 ID
  • Cert 客户端证书
  • Key 客户端主键

示例

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Resources": {
  4. "MyCluster": {
  5. "Properties": {
  6. "InstanceType": "ecs.s1.small",
  7. "Name": "stormcluster",
  8. "Password": "Test1234",
  9. "Size": "1"
  10. },
  11. "Type": "ALIYUN::CS::Cluster"
  12. }
  13. },
  14. "Outputs": {
  15. "CaCert": {
  16. "Description": "CA cert of the cluster.",
  17. "Value": {
  18. "Fn::GetAtt": [
  19. "MyCluster",
  20. "Ca"
  21. ]
  22. }
  23. },
  24. "ClientCert": {
  25. "Description": "Client cert of the cluster.",
  26. "Value": {
  27. "Fn::GetAtt": [
  28. "MyCluster",
  29. "Cert"
  30. ]
  31. }
  32. },
  33. "ClientKey": {
  34. "Description": "Client key of the cluster.",
  35. "Value": {
  36. "Fn::GetAtt": [
  37. "MyCluster",
  38. "Key"
  39. ]
  40. }
  41. },
  42. "ClusterId": {
  43. "Description": "Id of the cluster.",
  44. "Value": {
  45. "Fn::GetAtt": [
  46. "MyCluster",
  47. "ClusterId"
  48. ]
  49. }
  50. },
  51. "Endpoints": {
  52. "Description": "Endpoints of the app.",
  53. "Value": {
  54. "Fn::GetAtt": [
  55. "App",
  56. "Endpoints"
  57. ]
  58. }
  59. },
  60. "MasterUrl": {
  61. "Description": "Master url of the cluster.",
  62. "Value": {
  63. "Fn::GetAtt": [
  64. "MyCluster",
  65. "MasterUrl"
  66. ]
  67. }
  68. }
  69. }
  70. }

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

  上一篇:go ALIYUN::CS::App__资源列表_资源编排-阿里云
  下一篇:go ALIYUN::ECS::BandwidthPackage__资源列表_资源编排-阿里云