-
Notifications
You must be signed in to change notification settings - Fork 0
/
SubscriptionAndDatabase.yml
247 lines (245 loc) · 13 KB
/
SubscriptionAndDatabase.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
AWSTemplateFormatVersion: 2010-09-09
Resources:
ProSubscription:
Type: Redis::CloudFormation::ProSubscription
Properties:
SubscriptionName: !Ref SubscriptionName
BaseUrl: !Ref BaseUrl
DryRun: !Ref DryRun
DeploymentType: !Ref DeploymentType
PaymentMethod: !Ref PaymentMethod
PaymentMethodId: !Ref PaymentMethodId
MemoryStorage: !Ref MemoryStorage
CloudProviders: !Ref CloudProviders
RedisVersion: !Ref RedisVersion
ProDatabase:
Type: Redis::CloudFormation::ProDatabase
Properties:
BaseUrl: !Ref BaseUrl
SubscriptionID: !Ref ProSubscription
DryRun: !Ref DryRun
DatabaseName: !Ref DatabaseName
Protocol: !Ref Protocol
Port: !Ref Port
DatasetSizeInGb: !Ref DatasetSizeInGb
RespVersion: !Ref RespVersion
SupportOSSClusterApi: !Ref SupportOSSClusterApi
UseExternalEndpointForOSSClusterApi: !Ref UseExternalEndpointForOSSClusterApi
DataPersistence: !Ref DataPersistence
DataEvictionPolicy: !Ref DataEvictionPolicy
Replication: !Ref Replication
Replica: !Ref Replica
ThroughputMeasurement: !Ref ThroughputMeasurement
LocalThroughputMeasurement: !Ref LocalThroughputMeasurement
AverageItemSizeInBytes: !Ref AverageItemSizeInBytes
RemoteBackup: !Ref RemoteBackup
SourceIp: !Ref SourceIp
ClientTlsCertificates: !Ref ClientTlsCertificates
EnableTls: !Ref EnableTls
Password: !Ref Password
SaslUsername: !Ref SaslUsername
SaslPassword: !Ref SaslPassword
Alerts: !Ref Alerts
Modules: !Ref Modules
QueryPerformanceFactor: !Ref QueryPerformanceFactor
RegexRules: !Ref RegexRules
EnableDefaultUser: !Ref EnableDefaultUser
OnDemandBackup: !Ref OnDemandBackup
RegionName: !Ref RegionName
OnDemandImport: !Ref OnDemandImport
SourceType: !Ref SourceType
ImportFromUri: !Ref ImportFromUri
Parameters:
SubscriptionName:
Type: String
Description: "[Optional]. Subscription name. Example: My new subscription"
Default: "Example Subscription"
BaseUrl:
Type: String
Description: "The Base URL where the API calls are sent. Example: https://api-k8s-cloudapi.qa.redislabs.com"
Default: "https://api-k8s-cloudapi.qa.redislabs.com"
DryRun:
Type: String
Description: "[Optional]. When 'false': Creates a deployment plan and deploys it (creating any resources required by the plan). When 'true': creates a read-only deployment plan without any resource creation. Example: false. Default: 'false'."
DeploymentType:
Type: String
Description: "[Optional]. Creates a single region subscription. Example: single-region"
Default: "single-region"
PaymentMethod:
Type: String
Description: "[Optional]. Payment method for the requested subscription. If credit card is specified, the payment method Id must be defined. Default: 'credit-card'"
PaymentMethodId:
Type: String
Description: "[Optional]. A valid payment method that was pre-defined in the current account. This value is Optional if 'paymentMethod' is 'marketplace', but Required for all other account types. Example: 33292"
Default: 33292
MemoryStorage:
Type: String
Description: "[Optional]. Optional. Memory storage preference: either 'ram' or a combination of 'ram-and-flash'. Example: ram. Default: 'ram'"
CloudProviders:
Type: String
Description: '[Required as JSON]. Cloud hosting & networking details. Example: [{"regions": [{"region": "us-east-1", "networking": {}}]}]'
Default: '[{"regions": [{"region": "us-east-1", "networking": {}}]}]'
RedisVersion:
Type: String
Description: "[Optional]. If specified, the redisVersion defines the Redis version of the databases in the subscription. If omitted, the Redis version will be the default (available in 'GET /subscriptions/redis-versions'). Example: 7.2. Default = 'default'"
DatabaseName:
Type: String
Description: "[Required]. Database name (Database name must be up to 40 characters long, include only letters, digits, or hyphen ('-'), start with a letter, and end with a letter or digit). Example: Redis-database-example"
Default: "ExampleDatabase"
Protocol:
Type: String
Description: "[Optional]. Database protocol: either 'redis' or 'memcached'. Default: 'redis'"
Port:
Type: String
Description: "[Optional]. TCP port on which the database is available (10000-19999). Generated automatically if omitted. Example: 10000"
DatasetSizeInGb:
Type: String
Description: "[Optional]. The maximum amount of data in the dataset for this specific database is in GB. You can not set both datasetSizeInGb and totalMemoryInGb. if 'replication' is true, the database's total memory will be twice as large as the datasetSizeInGb.if 'replication' is false, the database's total memory of the database will be the datasetSizeInGb value. Minimum: 0.1. ExclusiveMinimum: false. Example: 1"
Default: "1"
RespVersion:
Type: String
Description: "[Optional]. RESP version must be compatible with Redis version. Example: resp3. Allowed values: resp2/resp3."
SupportOSSClusterApi:
Type: String
Description: "[Optional]. Support Redis open-source (OSS) Cluster API. Default: 'false'"
UseExternalEndpointForOSSClusterApi:
Type: String
Description: "[Optional]. Should use external endpoint for open-source (OSS) Cluster API. Can only be enabled if OSS Cluster API support is enabled'. Default: 'false'"
DataPersistence:
Type: String
Description: "[Optional]. Rate of database data persistence (in persistent storage). List of options: [ none, aof-every-1-second, aof-every-write, snapshot-every-1-hour, snapshot-every-6-hours, snapshot-every-12-hours ]. Example: none. Default: 'none'."
DataEvictionPolicy:
Type: String
Description: "[Optional]. Data items eviction method. List of options: [ allkeys-lru, allkeys-lfu, allkeys-random, volatile-lru, volatile-lfu, volatile-random, volatile-ttl, noeviction ]. Default: 'volatile-lru'"
Replication:
Type: String
Description: "[Optional]. Databases replication. Default: 'true'"
Replica:
Type: String
Description: "[Optional. Input as JSON]. Replica Of configuration"
ThroughputMeasurement:
Type: String
Description: "[Optional. Input as JSON]. Throughput measurement method. Default: 25000 ops/sec"
LocalThroughputMeasurement:
Type: String
Description: "[Optional. Input as JSON]. Throughput measurement for an active-active subscription"
AverageItemSizeInBytes:
Type: String
Description: "[Optional]. Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) of the items stored in the database. Default: 1000"
RemoteBackup:
Type: String
Description: '[Optional. Input as JSON]. Database remote backup configuration. Example: {"active": true, "interval": "every-4-hours", "storageType": "aws-s3", "storagePath": "s3://redis-test-for-backup-and-import"}'
SourceIp:
Type: String
Description: "[Optional]. List of source IP addresses or subnet masks. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges. example value: '['192.168.10.0/32', '192.168.12.0/24']'"
ClientTlsCertificates:
Type: String
Description: "[Optional. Input as a JSON]. A list of TLS/SSL certificates (public keys) with new line characters replaced by \n. If specified, mTLS authentication (with enableTls not specified or set to true) will be required to authenticate user connections. If empty list is received, SSL certificates will be removed and mTLS will not be required (note that TLS connection may still apply, depending on the value of the enableTls property). Default: 'null'"
EnableTls:
Type: String
Description: "[Optional]. When 'true', requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided. Default: 'false'"
Password:
Type: String
Description: "[Optional]. Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is REDIS"
SaslUsername:
Type: String
Description: "[Optional]. Memcached (SASL) Username to access the database. If omitted, the username will be set to a 'mc-' prefix followed by a random 5 character long alphanumeric. Can only be set if Database Protocol is MEMCACHED"
SaslPassword:
Type: String
Description: "[Optional]. Memcached (SASL) Password to access the database. If omitted, a random 32 character long alphanumeric password will be automatically generated. Can only be set if Database Protocol is MEMCACHED"
Alerts:
Type: String
Description: "[Optional. Input as JSON]. Redis database alerts."
Modules:
Type: String
Description: "[Optional. Input as JSON]. Redis modules to be provisioned in the database."
QueryPerformanceFactor:
Type: String
Description: "[Optional]. The query performance factor adds extra compute power specifically for search and query. For databases with search and query, you can increase your search queries per second by the selected factor. Example: 2x"
RegexRules:
Type: String
Description: "[Optional. Can only be modified upon Update request from a Cloud Formation stack]. Shard regex rules. Relevant only for a sharded database."
EnableDefaultUser:
Type: String
Description: "[Optional. Can only be modified upon Update request from a Cloud Formation stack]. When 'true', enables connecting to the database with the 'default' user. Default: 'true'. Can only be set if Database Protocol is REDIS"
OnDemandBackup:
Type: String
Description: "[Required to enable Backup. Can only be modified upon Update request from a Cloud Formation stack]. Requires 'remoteBackup' to be active]. If 'true', creates a backup of the current database and disables all other parameters set for Update except for 'RegionName'. Default false."
RegionName:
Type: String
Description: "[Optional. Can only be modified upon Update request from a Cloud Formation stack. Requires 'OnDemandBackup' set to 'true']. Name of cloud provider region where the local database is located. When backing up an active-active database, backup is done separately for each local database at a specified region. Example for active-active database: 'us-east-1'. For single-region deployment, the value MUST be 'null'."
OnDemandImport:
Type: String
Description: "[Required to enable Import. Can only be modified upon Update request from a Cloud Formation stack]. If 'true', imports the previous created backup of a database and disables all other parameters set for Update except for 'SourceType' and 'ImportFromUri'. Default 'false'."
SourceType:
Type: String
Description: "[Required for Import. Can only be modified upon Update request from a Cloud Formation stack. Requires 'OnDemandImport' set to 'true']. Type of storage source from which to import the database file (RDB files) or data (Redis connection). List of options: [ http, redis, ftp, aws-s3, azure-blob-storage, google-blob-storage ]."
ImportFromUri:
Type: String
Description: "[Required for Import. Can only be modified upon Update request from a Cloud Formation stack. Requires 'OnDemandImport' set to 'true']. One or more URIs to source data files or Redis databases, as appropriate to specified source type (example: ['http://mydomain.com/redis-backup-file1', 'http://mydomain.com/redis-backup-file2'])"
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: "Subscription Parameters"
Parameters:
- BaseUrl
- SubscriptionName
- DryRun
- DeploymentType
- PaymentMethod
- PaymentMethodId
- MemoryStorage
- CloudProviders
- RedisVersion
-
Label:
default: "Database Parameters"
Parameters:
- BaseUrl
- SubscriptionID
- DatabaseName
- DryRun
- Protocol
- Port
- DatasetSizeInGb
- RespVersion
- SupportOSSClusterApi
- UseExternalEndpointForOSSClusterApi
- DataPersistence
- DataEvictionPolicy
- Replication
- Replica
- ThroughputMeasurement
- LocalThroughputMeasurement
- AverageItemSizeInBytes
- RemoteBackup
- SourceIp
- ClientTlsCertificates
- EnableTls
- Password
- SaslUsername
- SaslPassword
- Alerts
- Modules
- QueryPerformanceFactor
-
Label:
default: "Parameters supported only for Update action on Database"
Parameters:
- RegexRules
- EnableDefaultUser
-
Label:
default: "Parameters for On Demand Backup on Database"
Parameters:
- OnDemandBackup
- RegionName
-
Label:
default: "Parameters for On Demand Import on Database"
Parameters:
- OnDemandImport
- SourceType
- ImportFromUri