-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create SubscriptionAndDatabase.yml (#1)
- Loading branch information
Showing
1 changed file
with
247 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,247 @@ | ||
AWSTemplateFormatVersion: 2010-09-09 | ||
Resources: | ||
ProSubscription: | ||
Type: Redis::Cloud::Subscription | ||
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::Cloud::Database | ||
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 |