forked from aliyun/ros-templates
-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless-instance.yml
149 lines (149 loc) · 3.74 KB
/
serverless-instance.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
ROSTemplateFormatVersion: '2015-09-01'
Description: MONGODB ServerlessInstance resource example
Parameters:
VpcId:
Type: String
Description: The VPC id to create mongodb instance.
VSwitchId:
Type: String
Description: The vSwitch Id to create mongodb instance.
ZoneId:
Type: String
Description: On which zone to create the instance. If VpcId and VSwitchId is specified,
ZoneId is required and VSwitch should be in same zone.
AccountPassword:
Type: String
Description: Root account password, can contain the letters, numbers or underscores
the composition, length of 6~32 bit.
DBInstanceDescription:
Type: String
Description: Description of created database instance.
Default: null
AutoRenew:
Type: Boolean
Description: 'Indicates whether automatic renewal is enabled for the instance.
Valid values:true: Automatic renewal is enabled.false: Automatic renewal is
not enabled. You must renew the instance manually.Default value: false.'
Default: false
AllowedValues:
- true
- false
PeriodPriceType:
Type: String
Description: Charge period for created instance.
Default: Day
AllowedValues:
- Day
- Month
Period:
Type: Number
Description: 'The subscription period of the instance.Unit: months.Valid values:
[1~9], 12, 24, 36. Default to 1.'
Default: 1
AllowedValues:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 12
- 24
- 36
ResourceGroupId:
Type: String
Description: The ID of the resource group.
Default: null
DBInstanceStorage:
Type: Number
Description: Database instance storage size. MongoDB is [1,10], increased every
1 GB, Unit in GB
Default: 2
SecurityIPArray:
Type: String
Description: Security ips to add or remove.
Default: 0.0.0.0/0
ChargeType:
Type: String
Description: 'The billing method of the instance.values:PrePaid: Subscription.'
Default: PrePaid
AllowedValues:
- PrePaid
EngineVersion:
Type: String
Description: Database instance version.Support 4.2
Default: '4.2'
StorageEngine:
Type: String
Description: Database storage engine.Support WiredTiger
Default: WiredTiger
AllowedValues:
- WiredTiger
NetworkType:
Type: String
Description: 'The instance network type. '
Default: VPC
AllowedValues:
- VPC
Resources:
MongoDbServerlessInstance:
Type: ALIYUN::MONGODB::ServerlessInstance
Properties:
ZoneId:
Ref: ZoneId
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
DBInstanceDescription:
Ref: DBInstanceDescription
AutoRenew:
Ref: AutoRenew
PeriodPriceType:
Ref: PeriodPriceType
Period:
Ref: Period
ResourceGroupId:
Ref: ResourceGroupId
DBInstanceStorage:
Ref: DBInstanceStorage
SecurityIPArray:
Ref: SecurityIPArray
ChargeType:
Ref: ChargeType
EngineVersion:
Ref: EngineVersion
StorageEngine:
Ref: StorageEngine
NetworkType:
Ref: NetworkType
AccountPassword:
Ref: AccountPassword
Outputs:
OrderId:
Description: Order Id of created instance.
Value:
Fn::GetAtt:
- MongoDbServerlessInstance
- OrderId
ConnectionURI:
Description: Connection uri.
Value:
Fn::GetAtt:
- MongoDbServerlessInstance
- ConnectionURI
DBInstanceId:
Description: The instance id of created mongodb instance.
Value:
Fn::GetAtt:
- MongoDbServerlessInstance
- DBInstanceId
DBInstanceStatus:
Description: Status of mongodb instance.
Value:
Fn::GetAtt:
- MongoDbServerlessInstance
- DBInstanceStatus