azure.mgmt.redis.operations module

class azure.mgmt.redis.operations.Operations(client, config, serializer, deserializer)[source]

Bases: object

Operations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2016-04-01”.

list(custom_headers=None, raw=False, **operation_config)[source]

Lists all of the available REST API operations of the Microsoft.Cache provider.

Parameters:
Return type:

OperationPaged

Raises:

CloudError

class azure.mgmt.redis.operations.RedisOperations(client, config, serializer, deserializer)[source]

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.
Variables:

api_version – Client Api Version. Constant value: “2016-04-01”.

create(resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config)[source]

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

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • name (str) – The name of the Redis cache.
  • parameters (RedisCreateParameters) – Parameters supplied to the Create Redis 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 RedisResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a 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
Return type:

AzureOperationPoller instance that returns None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

export_data(resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Export data from the redis cache to blobs in a container.

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

Raises:

CloudError

force_reboot(resource_group_name, name, reboot_type, shard_id=None, custom_headers=None, raw=False, **operation_config)[source]

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) – If clustering is enabled, the ID of the shard to be rebooted.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RedisForceRebootResponse

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, name, custom_headers=None, raw=False, **operation_config)[source]

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_configOperation configuration overrides.
Return type:

RedisResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

import_data(resource_group_name, name, files, format=None, custom_headers=None, raw=False, **operation_config)[source]

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

Raises:

CloudError

list(custom_headers=None, raw=False, **operation_config)[source]

Gets all Redis caches in the specified subscription.

Parameters:
Return type:

RedisResourcePaged

Raises:

CloudError

list_by_resource_group(resource_group_name, custom_headers=None, raw=False, **operation_config)[source]

Lists 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_configOperation configuration overrides.
Return type:

RedisResourcePaged

Raises:

CloudError

list_keys(resource_group_name, name, custom_headers=None, raw=False, **operation_config)[source]

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_configOperation configuration overrides.
Return type:

RedisAccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

regenerate_key(resource_group_name, name, key_type, custom_headers=None, raw=False, **operation_config)[source]

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) – The Redis access key to regenerate. 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_configOperation configuration overrides.
Return type:

RedisAccessKeys

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

update(resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config)[source]

Update an existing Redis cache.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • name (str) – The name of the Redis cache.
  • parameters (RedisUpdateParameters) – Parameters supplied to the Update Redis operation.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RedisResource

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.redis.operations.FirewallRulesOperations(client, config, serializer, deserializer)[source]

Bases: object

FirewallRulesOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2016-04-01”.

list(resource_group_name, cache_name, custom_headers=None, raw=False, **operation_config)[source]

Gets all firewall rules in the specified redis cache.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • cache_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_configOperation configuration overrides.
Return type:

RedisFirewallRulePaged

Raises:

CloudError

class azure.mgmt.redis.operations.RedisFirewallRuleOperations(client, config, serializer, deserializer)[source]

Bases: object

RedisFirewallRuleOperations operations.

Parameters:
  • client – Client for service requests.
  • config – Configuration of service client.
  • serializer – An object model serializer.
  • deserializer – An objec model deserializer.
Variables:

api_version – Client Api Version. Constant value: “2016-04-01”.

create_or_update(resource_group_name, cache_name, rule_name, start_ip, end_ip, custom_headers=None, raw=False, **operation_config)[source]

Create or update a redis cache firewall rule.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • cache_name (str) – The name of the Redis cache.
  • rule_name (str) – The name of the firewall rule.
  • start_ip (str) – lowest IP address included in the range
  • end_ip (str) – highest IP address included in the range
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RedisFirewallRule

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, cache_name, rule_name, custom_headers=None, raw=False, **operation_config)[source]

Deletes a single firewall rule in a specified redis cache.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • cache_name (str) – The name of the Redis cache.
  • rule_name (str) – The name of the firewall rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, cache_name, rule_name, custom_headers=None, raw=False, **operation_config)[source]

Gets a single firewall rule in a specified redis cache.

Parameters:
  • resource_group_name (str) – The name of the resource group.
  • cache_name (str) – The name of the Redis cache.
  • rule_name (str) – The name of the firewall rule.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RedisFirewallRule

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

class azure.mgmt.redis.operations.PatchSchedulesOperations(client, config, serializer, deserializer)[source]

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.
Variables:

api_version – Client Api Version. Constant value: “2016-04-01”.

create_or_update(resource_group_name, name, schedule_entries, custom_headers=None, raw=False, **operation_config)[source]

Create or replace the patching schedule for Redis cache (requires Premium SKU).

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 a Redis cache.
  • custom_headers (dict) – headers that will be added to the request
  • raw (bool) – returns the direct response alongside the deserialized response
  • operation_configOperation configuration overrides.
Return type:

RedisPatchSchedule

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

delete(resource_group_name, name, custom_headers=None, raw=False, **operation_config)[source]

Deletes the patching schedule of a redis cache (requires Premium SKU).

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_configOperation configuration overrides.
Return type:

None

Return type:

ClientRawResponse if raw=true

Raises:

CloudError

get(resource_group_name, name, custom_headers=None, raw=False, **operation_config)[source]

Gets the patching schedule of a redis cache (requires Premium SKU).

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_configOperation configuration overrides.
Return type:

RedisPatchSchedule

Return type:

ClientRawResponse if raw=true

Raises:

CloudError