Create Essentials database
Creates a new database in the specified Essentials subscription.
Path parameters
Subscription ID.
Request body
Name of the database. Database name is limited to 40 characters or less and must include only letters, digits, and hyphens ('-'). It must start with a letter and end with a letter or digit.
Optional. Database protocol. Use 'stack' to get all of Redis' advanced capabilities. Only use 'redis' for Pay-as-you-go or Redis Flex subscriptions. Default: 'stack' for most subscriptions, 'redis' for Redis Flex subscriptions.
(Pay-as-you-go subscriptions only) Optional. Total memory in GB, including replication and other overhead. You cannot set both datasetSizeInGb and totalMemoryInGb.
(Pay-as-you-go subscriptions only) Optional. The maximum amount of data in the dataset for this database in GB. You cannot 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 will be the datasetSizeInGb value.
(Pay-as-you-go subscriptions only) Optional. Support Redis OSS Cluster API. Default: 'false'
Optional. If specified, redisVersion defines the Redis database version. If omitted, the Redis version will be set to the default version. (available in 'GET /fixed/redis-versions')
Optional. Redis Serialization Protocol version. Must be compatible with Redis version.
(Pay-as-you-go subscriptions only) Optional. If set to 'true', the database will use the external endpoint for OSS Cluster API. This setting blocks the database's private endpoint. Can only be set if 'supportOSSClusterAPI' is 'true'. Default: 'false'
(Pay-as-you-go subscriptions only) Optional. Distributes database data to different cloud instances. Default: 'false'
(Pay-as-you-go subscriptions only) Optional. Specifies the number of master shards.
Optional. Type and rate of data persistence in persistent storage. Use GET /fixed/plans/{planId} to see if your plan supports data persistence.
Optional. Data eviction policy.
Optional. Sets database replication. Use GET /fixed/plans/{planId} to see if your plan supports database replication.
Optional. The path to a backup storage location. If specified, the database will back up every 24 hours to this location, and you can manually back up the database to this location at any time. Use GET /fixed/plans/{planId} to see if your plan supports database backups.
Optional. List of source IP addresses or subnet masks to allow. If specified, Redis clients will be able to connect to this database only from within the specified source IP addresses ranges. Use GET /fixed/plans/{planId} to see how many CIDR allow rules your plan supports. Example: '['192.168.10.0/32', '192.168.12.0/24']'
(Pay-as-you-go subscriptions only) Optional. Hashing policy Regex rules. Used only if 'enableDatabaseClustering' is set to 'true' and .
Optional. This database will be a replica of the specified Redis databases provided as one or more URI(s). Example: 'redis://user:password@host:port'. If the URI provided is a Redis Cloud database, only host and port should be provided. Example: ['redis://endpoint1:6379', 'redis://endpoint2:6380'].
Optional. A public key client TLS/SSL certificate with new line characters replaced with '\n'. If specified, mTLS authentication will be required to authenticate user connections. Default: 'null'
Optional. When 'true', requires TLS authentication for all connections - mTLS with valid clientTlsCertificates, regular TLS when clientTlsCertificates is not provided. Default: 'false'
Optional. Password to access the database. If not set, a random 32-character alphanumeric password will be automatically generated.
Example request
{
"name": "Redis-Essentials-database-example",
"memoryLimitInGb": 1,
"datasetSizeInGb": 1,
"supportOSSClusterApi": true,
"redisVersion": "7.4",
"respVersion": "resp3",
"useExternalEndpointForOSSClusterApi": true,
"numberOfShards": 2,
"periodicBackupPath": "s3://<backup-path>",
"alerts": [
{
"name": "dataset-size",
"value": 80
}
],
"modules": [
{
"parameters": {}
}
]
}Response
OK