Skip to main content

redis

Creates, updates, deletes, gets or lists a redis resource.

Overview

Nameredis
TypeResource
Idazure_isv.redis.redis

Fields

NameDatatypeDescription
nametextfield from the properties object
access_keystextfield from the properties object
host_nametextfield from the properties object
identitytextManaged service identity (system assigned and/or user assigned identities)
instancestextfield from the properties object
linked_serverstextfield from the properties object
locationtextThe geo-location where the resource lives
porttextfield from the properties object
private_endpoint_connectionstextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
skutextfield from the properties object
ssl_porttextfield from the properties object
static_iptextfield from the properties object
subnet_idtextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
zonestextA list of availability zones denoting where the resource needs to come from.

Methods

NameAccessible byRequired ParamsDescription
getSELECTname, resourceGroupName, subscriptionIdGets a Redis cache (resource description).
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists all Redis caches in a resource group.
list_by_subscriptionSELECTsubscriptionIdGets all Redis caches in the specified subscription.
createINSERTname, resourceGroupName, subscriptionId, data__location, data__propertiesCreate or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
deleteDELETEname, resourceGroupName, subscriptionIdDeletes a Redis cache.
updateUPDATEname, resourceGroupName, subscriptionIdUpdate an existing Redis cache.
check_name_availabilityEXECsubscriptionId, data__name, data__typeChecks that the redis cache name is valid and is not already in use.
export_dataEXECname, resourceGroupName, subscriptionId, data__container, data__prefixExport data from the redis cache to blobs in a container.
flush_cacheEXECcacheName, resourceGroupName, subscriptionIdDeletes all of the keys in a cache.
force_rebootEXECname, resourceGroupName, subscriptionIdReboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.
import_dataEXECname, resourceGroupName, subscriptionId, data__filesImport data into Redis cache.
regenerate_keyEXECname, resourceGroupName, subscriptionId, data__keyTypeRegenerate Redis cache's access keys. This operation requires write permission to the cache resource.

SELECT examples

Gets all Redis caches in the specified subscription.

SELECT
name,
access_keys,
host_name,
identity,
instances,
linked_servers,
location,
port,
private_endpoint_connections,
provisioning_state,
resourceGroupName,
sku,
ssl_port,
static_ip,
subnet_id,
subscriptionId,
tags,
zones
FROM azure_isv.redis.vw_redis
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new redis resource.

/*+ create */
INSERT INTO azure_isv.redis.redis (
name,
resourceGroupName,
subscriptionId,
data__location,
data__properties,
properties,
zones,
location,
tags,
identity
)
SELECT
'{{ name }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ data__properties }}',
'{{ properties }}',
'{{ zones }}',
'{{ location }}',
'{{ tags }}',
'{{ identity }}'
;

UPDATE example

Updates a redis resource.

/*+ update */
UPDATE azure_isv.redis.redis
SET
properties = '{{ properties }}',
tags = '{{ tags }}',
identity = '{{ identity }}'
WHERE
name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified redis resource.

/*+ delete */
DELETE FROM azure_isv.redis.redis
WHERE name = '{{ name }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';