Skip to content

Commit 69aa369

Browse files
authored
Create SubscriptionAndDatabase.yml (#1)
1 parent a271e16 commit 69aa369

File tree

1 file changed

+247
-0
lines changed

1 file changed

+247
-0
lines changed

Examples/SubscriptionAndDatabase.yml

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
AWSTemplateFormatVersion: 2010-09-09
2+
Resources:
3+
ProSubscription:
4+
Type: Redis::Cloud::Subscription
5+
Properties:
6+
SubscriptionName: !Ref SubscriptionName
7+
BaseUrl: !Ref BaseUrl
8+
DryRun: !Ref DryRun
9+
DeploymentType: !Ref DeploymentType
10+
PaymentMethod: !Ref PaymentMethod
11+
PaymentMethodId: !Ref PaymentMethodId
12+
MemoryStorage: !Ref MemoryStorage
13+
CloudProviders: !Ref CloudProviders
14+
RedisVersion: !Ref RedisVersion
15+
ProDatabase:
16+
Type: Redis::Cloud::Database
17+
Properties:
18+
BaseUrl: !Ref BaseUrl
19+
SubscriptionID: !Ref ProSubscription
20+
DryRun: !Ref DryRun
21+
DatabaseName: !Ref DatabaseName
22+
Protocol: !Ref Protocol
23+
Port: !Ref Port
24+
DatasetSizeInGb: !Ref DatasetSizeInGb
25+
RespVersion: !Ref RespVersion
26+
SupportOSSClusterApi: !Ref SupportOSSClusterApi
27+
UseExternalEndpointForOSSClusterApi: !Ref UseExternalEndpointForOSSClusterApi
28+
DataPersistence: !Ref DataPersistence
29+
DataEvictionPolicy: !Ref DataEvictionPolicy
30+
Replication: !Ref Replication
31+
Replica: !Ref Replica
32+
ThroughputMeasurement: !Ref ThroughputMeasurement
33+
LocalThroughputMeasurement: !Ref LocalThroughputMeasurement
34+
AverageItemSizeInBytes: !Ref AverageItemSizeInBytes
35+
RemoteBackup: !Ref RemoteBackup
36+
SourceIp: !Ref SourceIp
37+
ClientTlsCertificates: !Ref ClientTlsCertificates
38+
EnableTls: !Ref EnableTls
39+
Password: !Ref Password
40+
SaslUsername: !Ref SaslUsername
41+
SaslPassword: !Ref SaslPassword
42+
Alerts: !Ref Alerts
43+
Modules: !Ref Modules
44+
QueryPerformanceFactor: !Ref QueryPerformanceFactor
45+
RegexRules: !Ref RegexRules
46+
EnableDefaultUser: !Ref EnableDefaultUser
47+
OnDemandBackup: !Ref OnDemandBackup
48+
RegionName: !Ref RegionName
49+
OnDemandImport: !Ref OnDemandImport
50+
SourceType: !Ref SourceType
51+
ImportFromUri: !Ref ImportFromUri
52+
53+
Parameters:
54+
SubscriptionName:
55+
Type: String
56+
Description: "[Optional]. Subscription name. Example: My new subscription"
57+
Default: "Example Subscription"
58+
BaseUrl:
59+
Type: String
60+
Description: "The Base URL where the API calls are sent. Example: https://api-k8s-cloudapi.qa.redislabs.com"
61+
Default: "https://api-k8s-cloudapi.qa.redislabs.com"
62+
DryRun:
63+
Type: String
64+
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'."
65+
DeploymentType:
66+
Type: String
67+
Description: "[Optional]. Creates a single region subscription. Example: single-region"
68+
Default: "single-region"
69+
PaymentMethod:
70+
Type: String
71+
Description: "[Optional]. Payment method for the requested subscription. If credit card is specified, the payment method Id must be defined. Default: 'credit-card'"
72+
PaymentMethodId:
73+
Type: String
74+
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"
75+
Default: 33292
76+
MemoryStorage:
77+
Type: String
78+
Description: "[Optional]. Optional. Memory storage preference: either 'ram' or a combination of 'ram-and-flash'. Example: ram. Default: 'ram'"
79+
CloudProviders:
80+
Type: String
81+
Description: '[Required as JSON]. Cloud hosting & networking details. Example: [{"regions": [{"region": "us-east-1", "networking": {}}]}]'
82+
Default: '[{"regions": [{"region": "us-east-1", "networking": {}}]}]'
83+
RedisVersion:
84+
Type: String
85+
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'"
86+
DatabaseName:
87+
Type: String
88+
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"
89+
Default: "ExampleDatabase"
90+
Protocol:
91+
Type: String
92+
Description: "[Optional]. Database protocol: either 'redis' or 'memcached'. Default: 'redis'"
93+
Port:
94+
Type: String
95+
Description: "[Optional]. TCP port on which the database is available (10000-19999). Generated automatically if omitted. Example: 10000"
96+
DatasetSizeInGb:
97+
Type: String
98+
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"
99+
Default: "1"
100+
RespVersion:
101+
Type: String
102+
Description: "[Optional]. RESP version must be compatible with Redis version. Example: resp3. Allowed values: resp2/resp3."
103+
SupportOSSClusterApi:
104+
Type: String
105+
Description: "[Optional]. Support Redis open-source (OSS) Cluster API. Default: 'false'"
106+
UseExternalEndpointForOSSClusterApi:
107+
Type: String
108+
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'"
109+
DataPersistence:
110+
Type: String
111+
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'."
112+
DataEvictionPolicy:
113+
Type: String
114+
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'"
115+
Replication:
116+
Type: String
117+
Description: "[Optional]. Databases replication. Default: 'true'"
118+
Replica:
119+
Type: String
120+
Description: "[Optional. Input as JSON]. Replica Of configuration"
121+
ThroughputMeasurement:
122+
Type: String
123+
Description: "[Optional. Input as JSON]. Throughput measurement method. Default: 25000 ops/sec"
124+
LocalThroughputMeasurement:
125+
Type: String
126+
Description: "[Optional. Input as JSON]. Throughput measurement for an active-active subscription"
127+
AverageItemSizeInBytes:
128+
Type: String
129+
Description: "[Optional]. Relevant only to ram-and-flash clusters. Estimated average size (measured in bytes) of the items stored in the database. Default: 1000"
130+
RemoteBackup:
131+
Type: String
132+
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"}'
133+
SourceIp:
134+
Type: String
135+
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']'"
136+
ClientTlsCertificates:
137+
Type: String
138+
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'"
139+
EnableTls:
140+
Type: String
141+
Description: "[Optional]. When 'true', requires TLS authentication for all connections (mTLS with valid clientSslCertificate, regular TLS when the clientSslCertificate is not provided. Default: 'false'"
142+
Password:
143+
Type: String
144+
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"
145+
SaslUsername:
146+
Type: String
147+
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"
148+
SaslPassword:
149+
Type: String
150+
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"
151+
Alerts:
152+
Type: String
153+
Description: "[Optional. Input as JSON]. Redis database alerts."
154+
Modules:
155+
Type: String
156+
Description: "[Optional. Input as JSON]. Redis modules to be provisioned in the database."
157+
QueryPerformanceFactor:
158+
Type: String
159+
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"
160+
RegexRules:
161+
Type: String
162+
Description: "[Optional. Can only be modified upon Update request from a Cloud Formation stack]. Shard regex rules. Relevant only for a sharded database."
163+
EnableDefaultUser:
164+
Type: String
165+
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"
166+
OnDemandBackup:
167+
Type: String
168+
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."
169+
RegionName:
170+
Type: String
171+
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'."
172+
OnDemandImport:
173+
Type: String
174+
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'."
175+
SourceType:
176+
Type: String
177+
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 ]."
178+
ImportFromUri:
179+
Type: String
180+
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'])"
181+
182+
Metadata:
183+
AWS::CloudFormation::Interface:
184+
ParameterGroups:
185+
-
186+
Label:
187+
default: "Subscription Parameters"
188+
Parameters:
189+
- BaseUrl
190+
- SubscriptionName
191+
- DryRun
192+
- DeploymentType
193+
- PaymentMethod
194+
- PaymentMethodId
195+
- MemoryStorage
196+
- CloudProviders
197+
- RedisVersion
198+
-
199+
Label:
200+
default: "Database Parameters"
201+
Parameters:
202+
- BaseUrl
203+
- SubscriptionID
204+
- DatabaseName
205+
- DryRun
206+
- Protocol
207+
- Port
208+
- DatasetSizeInGb
209+
- RespVersion
210+
- SupportOSSClusterApi
211+
- UseExternalEndpointForOSSClusterApi
212+
- DataPersistence
213+
- DataEvictionPolicy
214+
- Replication
215+
- Replica
216+
- ThroughputMeasurement
217+
- LocalThroughputMeasurement
218+
- AverageItemSizeInBytes
219+
- RemoteBackup
220+
- SourceIp
221+
- ClientTlsCertificates
222+
- EnableTls
223+
- Password
224+
- SaslUsername
225+
- SaslPassword
226+
- Alerts
227+
- Modules
228+
- QueryPerformanceFactor
229+
-
230+
Label:
231+
default: "Parameters supported only for Update action on Database"
232+
Parameters:
233+
- RegexRules
234+
- EnableDefaultUser
235+
-
236+
Label:
237+
default: "Parameters for On Demand Backup on Database"
238+
Parameters:
239+
- OnDemandBackup
240+
- RegionName
241+
-
242+
Label:
243+
default: "Parameters for On Demand Import on Database"
244+
Parameters:
245+
- OnDemandImport
246+
- SourceType
247+
- ImportFromUri

0 commit comments

Comments
 (0)