edit-icon download-icon

ALIYUN::CS::App

Last Updated: Jun 13, 2018

The ALIYUN::CS::App type is used to create an ALIYUN::CS::Cluster application.

Syntax

  1. {
  2. "Type" : "ALIYUN::CS::App",
  3. "Properties" : {
  4. "Name" : String,
  5. "Ca" : String,
  6. "ClusterId" : String,
  7. "Environment" : Map,
  8. "Cert" : String,
  9. "Version" : String,
  10. "MasterUrl" : String,
  11. "Key" : String,
  12. "Template" : String,
  13. "Description" : String
  14. }
  15. }

Attributes

Attribute name Type Required Description Constraint
Name string Yes Application name N/A
ClusterId string Yes Cluster ID N/A
MasterUrl string Yes Master URL of the cluster N/A
Ca string No CA certificate of the cluster N/A
Environment map No Environment variable N/A
Cert string No Client certificate of the cluster N/A
Version string No Application version N/A
Key string No Primary key of the cluster at the client end N/A
Template string No Template used to deploy the Docker application N/A
Description string No Application description The description is a string of 2 to 256 characters. The default value is null

Return values

Fn::GetAtt

Endpoints: domain used to access the application.

Example

  1. {
  2. "ROSTemplateFormatVersion": "2015-09-01",
  3. "Resources": {
  4. "App": {
  5. "Properties": {
  6. "Ca": {
  7. "Fn::GetAtt": [
  8. "MyCluster",
  9. "Ca"
  10. ]
  11. },
  12. "Cert": {
  13. "Fn::GetAtt": [
  14. "MyCluster",
  15. "Cert"
  16. ]
  17. },
  18. "ClusterId": {
  19. "Fn::GetAtt": [
  20. "MyCluster",
  21. "ClusterId"
  22. ]
  23. },
  24. "Key": {
  25. "Fn::GetAtt": [
  26. "MyCluster",
  27. "Key"
  28. ]
  29. },
  30. "MasterUrl": {
  31. "Fn::GetAtt": [
  32. "MyCluster",
  33. "MasterUrl"
  34. ]
  35. },
  36. "Name": "ngix",
  37. "Template": {"Fn::Join": ["\\n", [
  38. "mysql:",
  39. " environment:",
  40. " - MYSQL_MAJOR=5.6",
  41. " - MYSQL_ROOT_PASSWORD=password",
  42. " expose:",
  43. " - 3306/tcp",
  44. " image: 'registry.aliyuncs.com/acs-sample/mysql:5.6'",
  45. " labels:",
  46. " aliyun.routing.port_3306: nnn;http://nn.abc.com",
  47. " aliyun.scale: '3'",
  48. " restart: always",
  49. " volumes:",
  50. " - /var/lib/mysql"
  51. ]]}
  52. },
  53. "Type": "ALIYUN::CS::App"
  54. },
  55. "MyCluster": {
  56. "Properties": {
  57. "InstanceType": "ecs.s1.small",
  58. "Name": "mysqlcluster",
  59. "Password": "Test1234",
  60. "Size": 3
  61. },
  62. "Type": "ALIYUN::CS::Cluster"
  63. }
  64. },
  65. "Outputs": {
  66. "Endpoints": {
  67. "Description": "Endpoints of the app.",
  68. "Value": {
  69. "Fn::GetAtt": [
  70. "App",
  71. "Endpoints"
  72. ]
  73. }
  74. }
  75. }
  76. }
Thank you! We've received your feedback.