# azure.mgmt.redis.operations module

class `azure.mgmt.redis.operations.``RedisOperations`(client, config, serializer, deserializer)

  Bases: `object`

  RedisOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An objec model deserializer.

  `create_or_update`(resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config)

    Create a redis cache, or replace (overwrite/recreate, with potential downtime) an existing cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - parameters (`RedisCreateOrUpdateParameters`) – Parameters supplied to the CreateOrUpdate redis operation.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisResourceWithAccessKey`
    Return type: | `ClientRawResponse` if raw=true

  `delete`(resource_group_name, name, custom_headers=None, raw=False, **operation_config)

    Deletes a redis cache. This operation takes a while to complete.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | None
    Return type: | `ClientRawResponse` if raw=true

  `export`(resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config)

    Import data into redis cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - parameters (`ExportRDBParameters`) – Parameters for redis export operation.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response

    Return type: | `AzureOperationPoller` instance that returns None
    Return type: | `ClientRawResponse` if raw=true

  `force_reboot`(resource_group_name, name, reboot_type, shard_id=None, custom_headers=None, raw=False, **operation_config)

    Reboot specified redis node(s). This operation requires write permission to the cache resource. There can be potential data loss.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - reboot_type (str or `RebootType`) – Which redis node(s) to reboot. Depending on this value data loss is possible. Possible values include: ‘PrimaryNode’, ‘SecondaryNode’, ‘AllNodes’
    - shard_id (int) – In case of cluster cache, this specifies shard id which should be rebooted.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | None
    Return type: | `ClientRawResponse` if raw=true

  `get`(resource_group_name, name, custom_headers=None, raw=False, **operation_config)

    Gets a redis cache (resource description).

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisResource`
    Return type: | `ClientRawResponse` if raw=true

  `import_method`(resource_group_name, name, files, format=None, custom_headers=None, raw=False, **operation_config)

    Import data into redis cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - files (list of str) – files to import
    - format (str) – File format.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response

    Return type: | `AzureOperationPoller` instance that returns None
    Return type: | `ClientRawResponse` if raw=true

  `list`(custom_headers=None, raw=False, **operation_config)

    Gets all redis caches in the specified subscription.

    Parameters:

    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisResourcePaged`

  `list_by_resource_group`(resource_group_name, custom_headers=None, raw=False, **operation_config)

    Gets all redis caches in a resource group.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisResourcePaged`

  `list_keys`(resource_group_name, name, custom_headers=None, raw=False, **operation_config)

    Retrieve a redis cache’s access keys. This operation requires write permission to the cache resource.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisListKeysResult`
    Return type: | `ClientRawResponse` if raw=true

  `regenerate_key`(resource_group_name, name, key_type, custom_headers=None, raw=False, **operation_config)

    Regenerate redis cache’s access keys. This operation requires write permission to the cache resource.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - key_type (str or `RedisKeyType`) – Which redis access key to reset. Possible values include: ‘Primary’, ‘Secondary’
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisListKeysResult`
    Return type: | `ClientRawResponse` if raw=true

class `azure.mgmt.redis.operations.``PatchSchedulesOperations`(client, config, serializer, deserializer)

  Bases: `object`

  PatchSchedulesOperations operations.

  Parameters:

  - client – Client for service requests.
  - config – Configuration of service client.
  - serializer – An object model serializer.
  - deserializer – An objec model deserializer.

  `create_or_update`(resource_group_name, name, schedule_entries, custom_headers=None, raw=False, **operation_config)

    Create or replace the patching schedule for redis cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - schedule_entries (list of `ScheduleEntry`) – List of patch schedules for redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisPatchSchedulesResponse`
    Return type: | `ClientRawResponse` if raw=true

  `delete`(resource_group_name, name, custom_headers=None, raw=False, **operation_config)

    Deletes the patching schedule for redis cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | None
    Return type: | `ClientRawResponse` if raw=true

  `get`(resource_group_name, name, custom_headers=None, raw=False, **operation_config)

    Gets the patching schedule for redis cache.

    Parameters:

    - resource_group_name (str) – The name of the resource group.
    - name (str) – The name of the redis cache.
    - custom_headers (dict) – headers that will be added to the request
    - raw (bool) – returns the direct response alongside the deserialized response
    - operation_config – Operation configuration overrides.

    Return type: | `RedisPatchSchedulesResponse`
    Return type: | `ClientRawResponse` if raw=true