databases
Creates, updates, deletes, gets or lists a databases
resource.
Overview
Name | databases |
Type | Resource |
Id | azure_isv.redis_enterprise.databases |
Fields
- vw_databases
- databases
Name | Datatype | Description |
---|---|---|
access_keys_authentication | text | field from the properties object |
client_protocol | text | field from the properties object |
clusterName | text | field from the properties object |
clustering_policy | text | field from the properties object |
databaseName | text | field from the properties object |
defer_upgrade | text | field from the properties object |
eviction_policy | text | field from the properties object |
geo_replication | text | field from the properties object |
modules | text | field from the properties object |
persistence | text | field from the properties object |
port | text | field from the properties object |
provisioning_state | text | field from the properties object |
redis_version | text | field from the properties object |
resourceGroupName | text | field from the properties object |
resource_state | text | field from the properties object |
subscriptionId | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | Properties of Redis Enterprise databases, as opposed to general resource properties like location, tags |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | clusterName, databaseName, resourceGroupName, subscriptionId | Gets information about a database in a Redis Enterprise cluster. |
list_by_cluster | SELECT | clusterName, resourceGroupName, subscriptionId | Gets all databases in the specified Redis Enterprise cluster. |
create | INSERT | clusterName, databaseName, resourceGroupName, subscriptionId | Creates a database |
delete | DELETE | clusterName, databaseName, resourceGroupName, subscriptionId | Deletes a single database |
update | UPDATE | clusterName, databaseName, resourceGroupName, subscriptionId | Updates a database |
export | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__sasUri | Exports a database file from target database. |
flush | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId | Flushes all the keys in this database and also from its linked databases. |
force_link_to_replication_group | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__groupNickname, data__linkedDatabases | Forcibly recreates an existing database on the specified cluster, and rejoins it to an existing replication group. IMPORTANT NOTE: All data in this database will be discarded, and the database will temporarily be unavailable while rejoining the replication group. |
force_unlink | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__ids | Forcibly removes the link to the specified database resource. |
import | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__sasUris | Imports database files to target database. |
regenerate_key | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId, data__keyType | Regenerates the Redis Enterprise database's access keys. |
upgrade_db_redis_version | EXEC | clusterName, databaseName, resourceGroupName, subscriptionId | Upgrades the database Redis version to the latest available. |
SELECT
examples
Gets all databases in the specified Redis Enterprise cluster.
- vw_databases
- databases
SELECT
access_keys_authentication,
client_protocol,
clusterName,
clustering_policy,
databaseName,
defer_upgrade,
eviction_policy,
geo_replication,
modules,
persistence,
port,
provisioning_state,
redis_version,
resourceGroupName,
resource_state,
subscriptionId
FROM azure_isv.redis_enterprise.vw_databases
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
properties
FROM azure_isv.redis_enterprise.databases
WHERE clusterName = '{{ clusterName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new databases
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure_isv.redis_enterprise.databases (
clusterName,
databaseName,
resourceGroupName,
subscriptionId,
properties
)
SELECT
'{{ clusterName }}',
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: clientProtocol
value: string
- name: port
value: integer
- name: provisioningState
value: []
- name: resourceState
value: []
- name: clusteringPolicy
value: string
- name: evictionPolicy
value: string
- name: persistence
value:
- name: aofEnabled
value: boolean
- name: rdbEnabled
value: boolean
- name: aofFrequency
value: string
- name: rdbFrequency
value: string
- name: modules
value:
- - name: name
value: string
- name: args
value: string
- name: version
value: string
- name: geoReplication
value:
- name: groupNickname
value: string
- name: linkedDatabases
value:
- - name: id
value: string
- name: state
value: string
- name: redisVersion
value: string
- name: deferUpgrade
value: string
- name: accessKeysAuthentication
value: string
UPDATE
example
Updates a databases
resource.
/*+ update */
UPDATE azure_isv.redis_enterprise.databases
SET
properties = '{{ properties }}'
WHERE
clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified databases
resource.
/*+ delete */
DELETE FROM azure_isv.redis_enterprise.databases
WHERE clusterName = '{{ clusterName }}'
AND databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';