RedisOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:redis> attribute.
- Inheritance
-
builtins.objectRedisOperations
Constructor
RedisOperations(*args, **kwargs)
Methods
begin_create |
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. |
begin_delete |
Deletes a Redis cache. |
begin_export_data |
Export data from the redis cache to blobs in a container. |
begin_flush_cache |
Deletes all of the keys in a cache. |
begin_import_data |
Import data into Redis cache. |
begin_update |
Update an existing Redis cache. |
check_name_availability |
Checks that the redis cache name is valid and is not already in use. |
force_reboot |
Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. |
get |
Gets a Redis cache (resource description). |
list_by_resource_group |
Lists all Redis caches in a resource group. |
list_by_subscription |
Gets all Redis caches in the specified subscription. |
list_keys |
Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. |
list_upgrade_notifications |
Gets any upgrade notifications for a Redis cache. |
regenerate_key |
Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. |
begin_create
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
async begin_create(resource_group_name: str, name: str, parameters: _models.RedisCreateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.RedisResource]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Parameters supplied to the Create Redis operation. Is either a RedisCreateParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either RedisResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_delete
Deletes a Redis cache.
async begin_delete(resource_group_name: str, name: str, **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_export_data
Export data from the redis cache to blobs in a container.
async begin_export_data(resource_group_name: str, name: str, parameters: _models.ExportRDBParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Parameters for Redis export operation. Is either a ExportRDBParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_flush_cache
Deletes all of the keys in a cache.
async begin_flush_cache(resource_group_name: str, cache_name: str, **kwargs: Any) -> AsyncLROPoller[OperationStatusResult]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
cache_name
Required
|
The name of the Redis cache. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either OperationStatusResult or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_import_data
Import data into Redis cache.
async begin_import_data(resource_group_name: str, name: str, parameters: _models.ImportRDBParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Parameters for Redis import operation. Is either a ImportRDBParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
Update an existing Redis cache.
async begin_update(resource_group_name: str, name: str, parameters: _models.RedisUpdateParameters, *, content_type: str = 'application/json', **kwargs: Any) -> AsyncLROPoller[_models.RedisResource]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Parameters supplied to the Update Redis operation. Is either a RedisUpdateParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either RedisResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
check_name_availability
Checks that the redis cache name is valid and is not already in use.
async check_name_availability(parameters: _models.CheckNameAvailabilityParameters, *, content_type: str = 'application/json', **kwargs: Any) -> None
Parameters
Name | Description |
---|---|
parameters
Required
|
Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis'. Is either a CheckNameAvailabilityParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
force_reboot
Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.
async force_reboot(resource_group_name: str, name: str, parameters: _models.RedisRebootParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RedisForceRebootResponse
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Specifies which Redis node(s) to reboot. Is either a RedisRebootParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
RedisForceRebootResponse or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
Gets a Redis cache (resource description).
async get(resource_group_name: str, name: str, **kwargs: Any) -> RedisResource
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
Returns
Type | Description |
---|---|
RedisResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_resource_group
Lists all Redis caches in a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> AsyncIterable[RedisResource]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either RedisResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_by_subscription
Gets all Redis caches in the specified subscription.
list_by_subscription(**kwargs: Any) -> AsyncIterable[RedisResource]
Returns
Type | Description |
---|---|
An iterator like instance of either RedisResource or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_keys
Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
async list_keys(resource_group_name: str, name: str, **kwargs: Any) -> RedisAccessKeys
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
Returns
Type | Description |
---|---|
RedisAccessKeys or the result of cls(response) |
Exceptions
Type | Description |
---|---|
list_upgrade_notifications
Gets any upgrade notifications for a Redis cache.
list_upgrade_notifications(resource_group_name: str, name: str, history: float, **kwargs: Any) -> AsyncIterable[UpgradeNotification]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
history
Required
|
how many minutes in past to look for upgrade notifications. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either UpgradeNotification or the result of cls(response) |
Exceptions
Type | Description |
---|---|
regenerate_key
Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
async regenerate_key(resource_group_name: str, name: str, parameters: _models.RedisRegenerateKeyParameters, *, content_type: str = 'application/json', **kwargs: Any) -> _models.RedisAccessKeys
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
name
Required
|
The name of the Redis cache. Required. |
parameters
Required
|
Specifies which key to regenerate. Is either a RedisRegenerateKeyParameters type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
RedisAccessKeys or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.redis.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\redis\\models\\__init__.py'>
Azure SDK for Python