RedisOperations Class
RedisOperations operations.
You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.
- Inheritance
-
builtins.objectRedisOperations
Constructor
RedisOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
An object model deserializer.
Variables
- models
Alias to model classes used in this operation group.
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_import_data |
Import data into 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. |
| update |
Update an existing Redis cache. |
begin_create
Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache.
begin_create(resource_group_name: str, name: str, parameters: _models.RedisCreateParameters, **kwargs: Any) -> LROPoller[_models.RedisResource]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
- continuation_token
- str
A continuation token to restart a poller from a saved state.
- polling
- bool or PollingMethod
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
- polling_interval
- int
Default waiting time between two polls for LRO operations if no Retry-After header is present.
Returns
An instance of LROPoller that returns either RedisResource or the result of cls(response)
Return type
Exceptions
begin_delete
Deletes a Redis cache.
begin_delete(resource_group_name: str, name: str, **kwargs: Any) -> LROPoller[None]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
- continuation_token
- str
A continuation token to restart a poller from a saved state.
- polling
- bool or PollingMethod
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
- polling_interval
- int
Default waiting time between two polls for LRO operations if no Retry-After header is present.
Returns
An instance of LROPoller that returns either None or the result of cls(response)
Return type
Exceptions
begin_export_data
Export data from the redis cache to blobs in a container.
begin_export_data(resource_group_name: str, name: str, parameters: _models.ExportRDBParameters, **kwargs: Any) -> LROPoller[None]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
- continuation_token
- str
A continuation token to restart a poller from a saved state.
- polling
- bool or PollingMethod
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
- polling_interval
- int
Default waiting time between two polls for LRO operations if no Retry-After header is present.
Returns
An instance of LROPoller that returns either None or the result of cls(response)
Return type
Exceptions
begin_import_data
Import data into Redis cache.
begin_import_data(resource_group_name: str, name: str, parameters: _models.ImportRDBParameters, **kwargs: Any) -> LROPoller[None]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
- continuation_token
- str
A continuation token to restart a poller from a saved state.
- polling
- bool or PollingMethod
By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
- polling_interval
- int
Default waiting time between two polls for LRO operations if no Retry-After header is present.
Returns
An instance of LROPoller that returns either None or the result of cls(response)
Return type
Exceptions
check_name_availability
Checks that the redis cache name is valid and is not already in use.
check_name_availability(parameters: _models.CheckNameAvailabilityParameters, **kwargs: Any) -> None
Parameters
- parameters
- CheckNameAvailabilityParameters
Parameters supplied to the CheckNameAvailability Redis operation. The only supported resource type is 'Microsoft.Cache/redis'.
- cls
- callable
A custom type or function that will be passed the direct response
Returns
None, or the result of cls(response)
Return type
Exceptions
force_reboot
Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.
force_reboot(resource_group_name: str, name: str, parameters: _models.RedisRebootParameters, **kwargs: Any) -> _models.RedisForceRebootResponse
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RedisForceRebootResponse, or the result of cls(response)
Return type
Exceptions
get
Gets a Redis cache (resource description).
get(resource_group_name: str, name: str, **kwargs: Any) -> _models.RedisResource
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RedisResource, or the result of cls(response)
Return type
Exceptions
list_by_resource_group
Lists all Redis caches in a resource group.
list_by_resource_group(resource_group_name: str, **kwargs: Any) -> Iterable[_models.RedisListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either RedisListResult or the result of cls(response)
Return type
Exceptions
list_by_subscription
Gets all Redis caches in the specified subscription.
list_by_subscription(**kwargs: Any) -> Iterable[_models.RedisListResult]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either RedisListResult or the result of cls(response)
Return type
Exceptions
list_keys
Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource.
list_keys(resource_group_name: str, name: str, **kwargs: Any) -> _models.RedisAccessKeys
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RedisAccessKeys, or the result of cls(response)
Return type
Exceptions
list_upgrade_notifications
Gets any upgrade notifications for a Redis cache.
list_upgrade_notifications(resource_group_name: str, name: str, history: float, **kwargs: Any) -> Iterable[_models.NotificationListResponse]
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
An iterator like instance of either NotificationListResponse or the result of cls(response)
Return type
Exceptions
regenerate_key
Regenerate Redis cache's access keys. This operation requires write permission to the cache resource.
regenerate_key(resource_group_name: str, name: str, parameters: _models.RedisRegenerateKeyParameters, **kwargs: Any) -> _models.RedisAccessKeys
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RedisAccessKeys, or the result of cls(response)
Return type
Exceptions
update
Update an existing Redis cache.
update(resource_group_name: str, name: str, parameters: _models.RedisUpdateParameters, **kwargs: Any) -> _models.RedisResource
Parameters
- cls
- callable
A custom type or function that will be passed the direct response
Returns
RedisResource, or the result of cls(response)
Return type
Exceptions
Attributes
models
models = <module 'azure.mgmt.redis.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\redis\\models\\__init__.py'>
Feedback
Submit and view feedback for