From 888e7ebf177f758485919ca8b2d7e0435bcc6c51 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 18 Feb 2022 07:30:22 +0000 Subject: [PATCH] CodeGen from PR 17750 in Azure/azure-rest-api-specs Merge 6d0a85453dbe016d0a59e5ba25c97a9d16adf5a8 into c731fa175f77b7b53ef0579eb877c61b5d0467d6 --- sdk/redis/azure-mgmt-redis/_meta.json | 4 +- .../azure/mgmt/redis/_configuration.py | 13 +- .../mgmt/redis/_redis_management_client.py | 24 +- .../azure/mgmt/redis/_version.py | 2 +- .../azure/mgmt/redis/models/__init__.py | 150 +- .../azure/mgmt/redis/models/_models.py | 2625 ----------------- .../azure/mgmt/redis/models/_models_py3.py | 10 + .../operations/_firewall_rules_operations.py | 112 +- .../operations/_linked_server_operations.py | 125 +- .../mgmt/redis/operations/_operations.py | 22 +- .../operations/_patch_schedules_operations.py | 112 +- ...private_endpoint_connections_operations.py | 125 +- .../_private_link_resources_operations.py | 32 +- .../redis/operations/_redis_operations.py | 350 +-- 14 files changed, 492 insertions(+), 3214 deletions(-) delete mode 100644 sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py diff --git a/sdk/redis/azure-mgmt-redis/_meta.json b/sdk/redis/azure-mgmt-redis/_meta.json index ad62c935fcbd..f0d45496daff 100644 --- a/sdk/redis/azure-mgmt-redis/_meta.json +++ b/sdk/redis/azure-mgmt-redis/_meta.json @@ -4,8 +4,8 @@ "@autorest/python@5.12.0", "@autorest/modelerfour@4.19.3" ], - "commit": "b28cdff098a89aab796e38c78b6b71a897fbae47", + "commit": "4d741e220aa2fa6d963b281f691554cc6922983c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/redis/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", + "autorest_command": "autorest specification/redis/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --python3-only --track2 --use=@autorest/python@5.12.0 --use=@autorest/modelerfour@4.19.3 --version=3.7.2", "readme": "specification/redis/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py index a7f2b3c59028..059922fa85f6 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import TYPE_CHECKING +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,8 +16,6 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any - from azure.core.credentials import TokenCredential @@ -35,11 +33,10 @@ class RedisManagementClientConfiguration(Configuration): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: super(RedisManagementClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py index 502d57a11570..8458bc0f31ce 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_redis_management_client.py @@ -7,8 +7,9 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING +from azure.core.rest import HttpRequest, HttpResponse from azure.mgmt.core import ARMPipelineClient from msrest import Deserializer, Serializer @@ -18,12 +19,9 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - from azure.core.credentials import TokenCredential - from azure.core.rest import HttpRequest, HttpResponse -class RedisManagementClient(object): +class RedisManagementClient: """REST API for Azure Redis Cache Service. :ivar operations: Operations operations @@ -54,12 +52,11 @@ class RedisManagementClient(object): def __init__( self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url="https://management.azure.com", # type: str - **kwargs # type: Any - ): - # type: (...) -> None + credential: "TokenCredential", + subscription_id: str, + base_url: str = "https://management.azure.com", + **kwargs: Any + ) -> None: self._config = RedisManagementClientConfiguration(credential=credential, subscription_id=subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) @@ -79,9 +76,8 @@ def __init__( def _send_request( self, request, # type: HttpRequest - **kwargs # type: Any - ): - # type: (...) -> HttpResponse + **kwargs: Any + ) -> HttpResponse: """Runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py index e4382a083348..dc6920075e88 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "13.1.0" +VERSION = "12.0.0b1" diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py index f0e8f2ee0056..e298a1ce0e42 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/__init__.py @@ -6,106 +6,56 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -try: - from ._models_py3 import CheckNameAvailabilityParameters - from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDetail - from ._models_py3 import ErrorResponse - from ._models_py3 import ExportRDBParameters - from ._models_py3 import ImportRDBParameters - from ._models_py3 import ManagedServiceIdentity - from ._models_py3 import NotificationListResponse - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import PrivateEndpoint - from ._models_py3 import PrivateEndpointConnection - from ._models_py3 import PrivateEndpointConnectionListResult - from ._models_py3 import PrivateLinkResource - from ._models_py3 import PrivateLinkResourceListResult - from ._models_py3 import PrivateLinkServiceConnectionState - from ._models_py3 import ProxyResource - from ._models_py3 import RedisAccessKeys - from ._models_py3 import RedisCommonProperties - from ._models_py3 import RedisCommonPropertiesRedisConfiguration - from ._models_py3 import RedisCreateParameters - from ._models_py3 import RedisCreateProperties - from ._models_py3 import RedisFirewallRule - from ._models_py3 import RedisFirewallRuleCreateParameters - from ._models_py3 import RedisFirewallRuleListResult - from ._models_py3 import RedisForceRebootResponse - from ._models_py3 import RedisInstanceDetails - from ._models_py3 import RedisLinkedServer - from ._models_py3 import RedisLinkedServerCreateParameters - from ._models_py3 import RedisLinkedServerCreateProperties - from ._models_py3 import RedisLinkedServerProperties - from ._models_py3 import RedisLinkedServerWithProperties - from ._models_py3 import RedisLinkedServerWithPropertiesList - from ._models_py3 import RedisListResult - from ._models_py3 import RedisPatchSchedule - from ._models_py3 import RedisPatchScheduleListResult - from ._models_py3 import RedisProperties - from ._models_py3 import RedisRebootParameters - from ._models_py3 import RedisRegenerateKeyParameters - from ._models_py3 import RedisResource - from ._models_py3 import RedisUpdateParameters - from ._models_py3 import RedisUpdateProperties - from ._models_py3 import Resource - from ._models_py3 import ScheduleEntry - from ._models_py3 import Sku - from ._models_py3 import TrackedResource - from ._models_py3 import UpgradeNotification - from ._models_py3 import UserAssignedIdentity -except (SyntaxError, ImportError): - from ._models import CheckNameAvailabilityParameters # type: ignore - from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDetail # type: ignore - from ._models import ErrorResponse # type: ignore - from ._models import ExportRDBParameters # type: ignore - from ._models import ImportRDBParameters # type: ignore - from ._models import ManagedServiceIdentity # type: ignore - from ._models import NotificationListResponse # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import PrivateEndpoint # type: ignore - from ._models import PrivateEndpointConnection # type: ignore - from ._models import PrivateEndpointConnectionListResult # type: ignore - from ._models import PrivateLinkResource # type: ignore - from ._models import PrivateLinkResourceListResult # type: ignore - from ._models import PrivateLinkServiceConnectionState # type: ignore - from ._models import ProxyResource # type: ignore - from ._models import RedisAccessKeys # type: ignore - from ._models import RedisCommonProperties # type: ignore - from ._models import RedisCommonPropertiesRedisConfiguration # type: ignore - from ._models import RedisCreateParameters # type: ignore - from ._models import RedisCreateProperties # type: ignore - from ._models import RedisFirewallRule # type: ignore - from ._models import RedisFirewallRuleCreateParameters # type: ignore - from ._models import RedisFirewallRuleListResult # type: ignore - from ._models import RedisForceRebootResponse # type: ignore - from ._models import RedisInstanceDetails # type: ignore - from ._models import RedisLinkedServer # type: ignore - from ._models import RedisLinkedServerCreateParameters # type: ignore - from ._models import RedisLinkedServerCreateProperties # type: ignore - from ._models import RedisLinkedServerProperties # type: ignore - from ._models import RedisLinkedServerWithProperties # type: ignore - from ._models import RedisLinkedServerWithPropertiesList # type: ignore - from ._models import RedisListResult # type: ignore - from ._models import RedisPatchSchedule # type: ignore - from ._models import RedisPatchScheduleListResult # type: ignore - from ._models import RedisProperties # type: ignore - from ._models import RedisRebootParameters # type: ignore - from ._models import RedisRegenerateKeyParameters # type: ignore - from ._models import RedisResource # type: ignore - from ._models import RedisUpdateParameters # type: ignore - from ._models import RedisUpdateProperties # type: ignore - from ._models import Resource # type: ignore - from ._models import ScheduleEntry # type: ignore - from ._models import Sku # type: ignore - from ._models import TrackedResource # type: ignore - from ._models import UpgradeNotification # type: ignore - from ._models import UserAssignedIdentity # type: ignore +from ._models_py3 import CheckNameAvailabilityParameters +from ._models_py3 import ErrorAdditionalInfo +from ._models_py3 import ErrorDetail +from ._models_py3 import ErrorResponse +from ._models_py3 import ExportRDBParameters +from ._models_py3 import ImportRDBParameters +from ._models_py3 import ManagedServiceIdentity +from ._models_py3 import NotificationListResponse +from ._models_py3 import Operation +from ._models_py3 import OperationDisplay +from ._models_py3 import OperationListResult +from ._models_py3 import PrivateEndpoint +from ._models_py3 import PrivateEndpointConnection +from ._models_py3 import PrivateEndpointConnectionListResult +from ._models_py3 import PrivateLinkResource +from ._models_py3 import PrivateLinkResourceListResult +from ._models_py3 import PrivateLinkServiceConnectionState +from ._models_py3 import ProxyResource +from ._models_py3 import RedisAccessKeys +from ._models_py3 import RedisCommonProperties +from ._models_py3 import RedisCommonPropertiesRedisConfiguration +from ._models_py3 import RedisCreateParameters +from ._models_py3 import RedisCreateProperties +from ._models_py3 import RedisFirewallRule +from ._models_py3 import RedisFirewallRuleCreateParameters +from ._models_py3 import RedisFirewallRuleListResult +from ._models_py3 import RedisForceRebootResponse +from ._models_py3 import RedisInstanceDetails +from ._models_py3 import RedisLinkedServer +from ._models_py3 import RedisLinkedServerCreateParameters +from ._models_py3 import RedisLinkedServerCreateProperties +from ._models_py3 import RedisLinkedServerProperties +from ._models_py3 import RedisLinkedServerWithProperties +from ._models_py3 import RedisLinkedServerWithPropertiesList +from ._models_py3 import RedisListResult +from ._models_py3 import RedisPatchSchedule +from ._models_py3 import RedisPatchScheduleListResult +from ._models_py3 import RedisProperties +from ._models_py3 import RedisRebootParameters +from ._models_py3 import RedisRegenerateKeyParameters +from ._models_py3 import RedisResource +from ._models_py3 import RedisUpdateParameters +from ._models_py3 import RedisUpdateProperties +from ._models_py3 import Resource +from ._models_py3 import ScheduleEntry +from ._models_py3 import Sku +from ._models_py3 import TrackedResource +from ._models_py3 import UpgradeNotification +from ._models_py3 import UserAssignedIdentity + from ._redis_management_client_enums import ( DayOfWeek, diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py deleted file mode 100644 index ef495d334f91..000000000000 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models.py +++ /dev/null @@ -1,2625 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class CheckNameAvailabilityParameters(msrest.serialization.Model): - """Parameters body to pass for resource name availability check. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. Resource name. - :vartype name: str - :ivar type: Required. Resource type. The only legal value of this property for checking redis - cache name availability is 'Microsoft.Cache/redis'. - :vartype type: str - """ - - _validation = { - 'name': {'required': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. Resource name. - :paramtype name: str - :keyword type: Required. Resource type. The only legal value of this property for checking - redis cache name availability is 'Microsoft.Cache/redis'. - :paramtype type: str - """ - super(CheckNameAvailabilityParameters, self).__init__(**kwargs) - self.name = kwargs['name'] - self.type = kwargs['type'] - - -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: any - """ - - _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None - - -class ErrorDetail(msrest.serialization.Model): - """The error detail. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~azure.mgmt.redis.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~azure.mgmt.redis.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - - :ivar error: The error object. - :vartype error: ~azure.mgmt.redis.models.ErrorDetail - """ - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword error: The error object. - :paramtype error: ~azure.mgmt.redis.models.ErrorDetail - """ - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) - - -class ExportRDBParameters(msrest.serialization.Model): - """Parameters for Redis export operation. - - All required parameters must be populated in order to send to Azure. - - :ivar format: File format. - :vartype format: str - :ivar prefix: Required. Prefix to use for exported files. - :vartype prefix: str - :ivar container: Required. Container name to export to. - :vartype container: str - """ - - _validation = { - 'prefix': {'required': True}, - 'container': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'prefix': {'key': 'prefix', 'type': 'str'}, - 'container': {'key': 'container', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword format: File format. - :paramtype format: str - :keyword prefix: Required. Prefix to use for exported files. - :paramtype prefix: str - :keyword container: Required. Container name to export to. - :paramtype container: str - """ - super(ExportRDBParameters, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.prefix = kwargs['prefix'] - self.container = kwargs['container'] - - -class ImportRDBParameters(msrest.serialization.Model): - """Parameters for Redis import operation. - - All required parameters must be populated in order to send to Azure. - - :ivar format: File format. - :vartype format: str - :ivar files: Required. files to import. - :vartype files: list[str] - """ - - _validation = { - 'files': {'required': True}, - } - - _attribute_map = { - 'format': {'key': 'format', 'type': 'str'}, - 'files': {'key': 'files', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword format: File format. - :paramtype format: str - :keyword files: Required. files to import. - :paramtype files: list[str] - """ - super(ImportRDBParameters, self).__init__(**kwargs) - self.format = kwargs.get('format', None) - self.files = kwargs['files'] - - -class ManagedServiceIdentity(msrest.serialization.Model): - """Managed service identity (system assigned and/or user assigned identities). - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar principal_id: The service principal ID of the system assigned identity. This property - will only be provided for a system assigned identity. - :vartype principal_id: str - :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be - provided for a system assigned identity. - :vartype tenant_id: str - :ivar type: Required. Type of managed service identity (where both SystemAssigned and - UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", - "UserAssigned", "SystemAssigned, UserAssigned". - :vartype type: str or ~azure.mgmt.redis.models.ManagedServiceIdentityType - :ivar user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :vartype user_assigned_identities: dict[str, ~azure.mgmt.redis.models.UserAssignedIdentity] - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'tenant_id': {'readonly': True}, - 'type': {'required': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'tenant_id': {'key': 'tenantId', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword type: Required. Type of managed service identity (where both SystemAssigned and - UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", - "UserAssigned", "SystemAssigned, UserAssigned". - :paramtype type: str or ~azure.mgmt.redis.models.ManagedServiceIdentityType - :keyword user_assigned_identities: The set of user assigned identities associated with the - resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. - The dictionary values can be empty objects ({}) in requests. - :paramtype user_assigned_identities: dict[str, ~azure.mgmt.redis.models.UserAssignedIdentity] - """ - super(ManagedServiceIdentity, self).__init__(**kwargs) - self.principal_id = None - self.tenant_id = None - self.type = kwargs['type'] - self.user_assigned_identities = kwargs.get('user_assigned_identities', None) - - -class NotificationListResponse(msrest.serialization.Model): - """The response of listUpgradeNotifications. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of all notifications. - :vartype value: list[~azure.mgmt.redis.models.UpgradeNotification] - :ivar next_link: Link for next set of notifications. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[UpgradeNotification]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: List of all notifications. - :paramtype value: list[~azure.mgmt.redis.models.UpgradeNotification] - """ - super(NotificationListResponse, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class Operation(msrest.serialization.Model): - """REST API operation. - - :ivar name: Operation name: {provider}/{resource}/{operation}. - :vartype name: str - :ivar display: The object that describes the operation. - :vartype display: ~azure.mgmt.redis.models.OperationDisplay - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Operation name: {provider}/{resource}/{operation}. - :paramtype name: str - :keyword display: The object that describes the operation. - :paramtype display: ~azure.mgmt.redis.models.OperationDisplay - """ - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - - -class OperationDisplay(msrest.serialization.Model): - """The object that describes the operation. - - :ivar provider: Friendly name of the resource provider. - :vartype provider: str - :ivar operation: Operation type: read, write, delete, listKeys/action, etc. - :vartype operation: str - :ivar resource: Resource type on which the operation is performed. - :vartype resource: str - :ivar description: Friendly name of the operation. - :vartype description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword provider: Friendly name of the resource provider. - :paramtype provider: str - :keyword operation: Operation type: read, write, delete, listKeys/action, etc. - :paramtype operation: str - :keyword resource: Resource type on which the operation is performed. - :paramtype resource: str - :keyword description: Friendly name of the operation. - :paramtype description: str - """ - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.operation = kwargs.get('operation', None) - self.resource = kwargs.get('resource', None) - self.description = kwargs.get('description', None) - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list REST API operations. It contains a list of operations and a URL nextLink to get the next set of results. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of operations supported by the resource provider. - :vartype value: list[~azure.mgmt.redis.models.Operation] - :ivar next_link: URL to get the next set of operation list results if there are any. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: List of operations supported by the resource provider. - :paramtype value: list[~azure.mgmt.redis.models.Operation] - """ - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class PrivateEndpoint(msrest.serialization.Model): - """The Private Endpoint resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The ARM identifier for Private Endpoint. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(PrivateEndpoint, self).__init__(**kwargs) - self.id = None - - -class Resource(msrest.serialization.Model): - """Common fields that are returned in the response for all Azure Resource Manager resources. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - - -class PrivateEndpointConnection(Resource): - """The Private Endpoint Connection resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar private_endpoint: The resource of private end point. - :vartype private_endpoint: ~azure.mgmt.redis.models.PrivateEndpoint - :ivar private_link_service_connection_state: A collection of information about the state of the - connection between service consumer and provider. - :vartype private_link_service_connection_state: - ~azure.mgmt.redis.models.PrivateLinkServiceConnectionState - :ivar provisioning_state: The provisioning state of the private endpoint connection resource. - Possible values include: "Succeeded", "Creating", "Deleting", "Failed". - :vartype provisioning_state: str or - ~azure.mgmt.redis.models.PrivateEndpointConnectionProvisioningState - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, - 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword private_endpoint: The resource of private end point. - :paramtype private_endpoint: ~azure.mgmt.redis.models.PrivateEndpoint - :keyword private_link_service_connection_state: A collection of information about the state of - the connection between service consumer and provider. - :paramtype private_link_service_connection_state: - ~azure.mgmt.redis.models.PrivateLinkServiceConnectionState - """ - super(PrivateEndpointConnection, self).__init__(**kwargs) - self.private_endpoint = kwargs.get('private_endpoint', None) - self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) - self.provisioning_state = None - - -class PrivateEndpointConnectionListResult(msrest.serialization.Model): - """List of private endpoint connection associated with the specified storage account. - - :ivar value: Array of private endpoint connections. - :vartype value: list[~azure.mgmt.redis.models.PrivateEndpointConnection] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Array of private endpoint connections. - :paramtype value: list[~azure.mgmt.redis.models.PrivateEndpointConnection] - """ - super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkResource(Resource): - """A private link resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar group_id: The private link resource group id. - :vartype group_id: str - :ivar required_members: The private link resource required member names. - :vartype required_members: list[str] - :ivar required_zone_names: The private link resource Private link DNS zone name. - :vartype required_zone_names: list[str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'group_id': {'readonly': True}, - 'required_members': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'group_id': {'key': 'properties.groupId', 'type': 'str'}, - 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, - 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword required_zone_names: The private link resource Private link DNS zone name. - :paramtype required_zone_names: list[str] - """ - super(PrivateLinkResource, self).__init__(**kwargs) - self.group_id = None - self.required_members = None - self.required_zone_names = kwargs.get('required_zone_names', None) - - -class PrivateLinkResourceListResult(msrest.serialization.Model): - """A list of private link resources. - - :ivar value: Array of private link resources. - :vartype value: list[~azure.mgmt.redis.models.PrivateLinkResource] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Array of private link resources. - :paramtype value: list[~azure.mgmt.redis.models.PrivateLinkResource] - """ - super(PrivateLinkResourceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PrivateLinkServiceConnectionState(msrest.serialization.Model): - """A collection of information about the state of the connection between service consumer and provider. - - :ivar status: Indicates whether the connection has been Approved/Rejected/Removed by the owner - of the service. Possible values include: "Pending", "Approved", "Rejected". - :vartype status: str or ~azure.mgmt.redis.models.PrivateEndpointServiceConnectionStatus - :ivar description: The reason for approval/rejection of the connection. - :vartype description: str - :ivar actions_required: A message indicating if changes on the service provider require any - updates on the consumer. - :vartype actions_required: str - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword status: Indicates whether the connection has been Approved/Rejected/Removed by the - owner of the service. Possible values include: "Pending", "Approved", "Rejected". - :paramtype status: str or ~azure.mgmt.redis.models.PrivateEndpointServiceConnectionStatus - :keyword description: The reason for approval/rejection of the connection. - :paramtype description: str - :keyword actions_required: A message indicating if changes on the service provider require any - updates on the consumer. - :paramtype actions_required: str - """ - super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.description = kwargs.get('description', None) - self.actions_required = kwargs.get('actions_required', None) - - -class ProxyResource(Resource): - """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(ProxyResource, self).__init__(**kwargs) - - -class RedisAccessKeys(msrest.serialization.Model): - """Redis cache access keys. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_key: The current primary key that clients can use to authenticate with Redis - cache. - :vartype primary_key: str - :ivar secondary_key: The current secondary key that clients can use to authenticate with Redis - cache. - :vartype secondary_key: str - """ - - _validation = { - 'primary_key': {'readonly': True}, - 'secondary_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_key': {'key': 'primaryKey', 'type': 'str'}, - 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RedisAccessKeys, self).__init__(**kwargs) - self.primary_key = None - self.secondary_key = None - - -class RedisCommonProperties(msrest.serialization.Model): - """Create/Update/Get common properties of the redis cache. - - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - """ - - _attribute_map = { - 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - """ - super(RedisCommonProperties, self).__init__(**kwargs) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.redis_version = kwargs.get('redis_version', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', False) - self.replicas_per_master = kwargs.get('replicas_per_master', None) - self.replicas_per_primary = kwargs.get('replicas_per_primary', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', "Enabled") - - -class RedisCommonPropertiesRedisConfiguration(msrest.serialization.Model): - """All Redis Settings. Few possible keys: rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value etc. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar rdb_backup_enabled: Specifies whether the rdb backup is enabled. - :vartype rdb_backup_enabled: str - :ivar rdb_backup_frequency: Specifies the frequency for creating rdb backup. - :vartype rdb_backup_frequency: str - :ivar rdb_backup_max_snapshot_count: Specifies the maximum number of snapshots for rdb backup. - :vartype rdb_backup_max_snapshot_count: str - :ivar rdb_storage_connection_string: The storage account connection string for storing rdb - file. - :vartype rdb_storage_connection_string: str - :ivar aof_storage_connection_string0: First storage account connection string. - :vartype aof_storage_connection_string0: str - :ivar aof_storage_connection_string1: Second storage account connection string. - :vartype aof_storage_connection_string1: str - :ivar maxfragmentationmemory_reserved: Value in megabytes reserved for fragmentation per shard. - :vartype maxfragmentationmemory_reserved: str - :ivar maxmemory_policy: The eviction strategy used when your data won't fit within its memory - limit. - :vartype maxmemory_policy: str - :ivar maxmemory_reserved: Value in megabytes reserved for non-cache usage per shard e.g. - failover. - :vartype maxmemory_reserved: str - :ivar maxmemory_delta: Value in megabytes reserved for non-cache usage per shard e.g. failover. - :vartype maxmemory_delta: str - :ivar maxclients: The max clients config. - :vartype maxclients: str - :ivar preferred_data_archive_auth_method: Preferred auth method to communicate to storage - account used for data archive, specify SAS or ManagedIdentity, default value is SAS. - :vartype preferred_data_archive_auth_method: str - :ivar preferred_data_persistence_auth_method: Preferred auth method to communicate to storage - account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. - :vartype preferred_data_persistence_auth_method: str - """ - - _validation = { - 'maxclients': {'readonly': True}, - 'preferred_data_archive_auth_method': {'readonly': True}, - 'preferred_data_persistence_auth_method': {'readonly': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'rdb_backup_enabled': {'key': 'rdb-backup-enabled', 'type': 'str'}, - 'rdb_backup_frequency': {'key': 'rdb-backup-frequency', 'type': 'str'}, - 'rdb_backup_max_snapshot_count': {'key': 'rdb-backup-max-snapshot-count', 'type': 'str'}, - 'rdb_storage_connection_string': {'key': 'rdb-storage-connection-string', 'type': 'str'}, - 'aof_storage_connection_string0': {'key': 'aof-storage-connection-string-0', 'type': 'str'}, - 'aof_storage_connection_string1': {'key': 'aof-storage-connection-string-1', 'type': 'str'}, - 'maxfragmentationmemory_reserved': {'key': 'maxfragmentationmemory-reserved', 'type': 'str'}, - 'maxmemory_policy': {'key': 'maxmemory-policy', 'type': 'str'}, - 'maxmemory_reserved': {'key': 'maxmemory-reserved', 'type': 'str'}, - 'maxmemory_delta': {'key': 'maxmemory-delta', 'type': 'str'}, - 'maxclients': {'key': 'maxclients', 'type': 'str'}, - 'preferred_data_archive_auth_method': {'key': 'preferred-data-archive-auth-method', 'type': 'str'}, - 'preferred_data_persistence_auth_method': {'key': 'preferred-data-persistence-auth-method', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword rdb_backup_enabled: Specifies whether the rdb backup is enabled. - :paramtype rdb_backup_enabled: str - :keyword rdb_backup_frequency: Specifies the frequency for creating rdb backup. - :paramtype rdb_backup_frequency: str - :keyword rdb_backup_max_snapshot_count: Specifies the maximum number of snapshots for rdb - backup. - :paramtype rdb_backup_max_snapshot_count: str - :keyword rdb_storage_connection_string: The storage account connection string for storing rdb - file. - :paramtype rdb_storage_connection_string: str - :keyword aof_storage_connection_string0: First storage account connection string. - :paramtype aof_storage_connection_string0: str - :keyword aof_storage_connection_string1: Second storage account connection string. - :paramtype aof_storage_connection_string1: str - :keyword maxfragmentationmemory_reserved: Value in megabytes reserved for fragmentation per - shard. - :paramtype maxfragmentationmemory_reserved: str - :keyword maxmemory_policy: The eviction strategy used when your data won't fit within its - memory limit. - :paramtype maxmemory_policy: str - :keyword maxmemory_reserved: Value in megabytes reserved for non-cache usage per shard e.g. - failover. - :paramtype maxmemory_reserved: str - :keyword maxmemory_delta: Value in megabytes reserved for non-cache usage per shard e.g. - failover. - :paramtype maxmemory_delta: str - """ - super(RedisCommonPropertiesRedisConfiguration, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.rdb_backup_enabled = kwargs.get('rdb_backup_enabled', None) - self.rdb_backup_frequency = kwargs.get('rdb_backup_frequency', None) - self.rdb_backup_max_snapshot_count = kwargs.get('rdb_backup_max_snapshot_count', None) - self.rdb_storage_connection_string = kwargs.get('rdb_storage_connection_string', None) - self.aof_storage_connection_string0 = kwargs.get('aof_storage_connection_string0', None) - self.aof_storage_connection_string1 = kwargs.get('aof_storage_connection_string1', None) - self.maxfragmentationmemory_reserved = kwargs.get('maxfragmentationmemory_reserved', None) - self.maxmemory_policy = kwargs.get('maxmemory_policy', None) - self.maxmemory_reserved = kwargs.get('maxmemory_reserved', None) - self.maxmemory_delta = kwargs.get('maxmemory_delta', None) - self.maxclients = None - self.preferred_data_archive_auth_method = None - self.preferred_data_persistence_auth_method = None - - -class RedisCreateParameters(msrest.serialization.Model): - """Parameters supplied to the Create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :ivar zones: A list of availability zones denoting where the resource needs to come from. - :vartype zones: list[str] - :ivar location: Required. The geo-location where the resource lives. - :vartype location: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: Required. The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :vartype subnet_id: str - :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache - inside an existing Azure Virtual Network; auto assigned by default. - :vartype static_ip: str - """ - - _validation = { - 'location': {'required': True}, - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - } - - _attribute_map = { - 'zones': {'key': 'zones', 'type': '[str]'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword zones: A list of availability zones denoting where the resource needs to come from. - :paramtype zones: list[str] - :keyword location: Required. The geo-location where the resource lives. - :paramtype location: str - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: Required. The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :paramtype subnet_id: str - :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis - cache inside an existing Azure Virtual Network; auto assigned by default. - :paramtype static_ip: str - """ - super(RedisCreateParameters, self).__init__(**kwargs) - self.zones = kwargs.get('zones', None) - self.location = kwargs['location'] - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.redis_version = kwargs.get('redis_version', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', False) - self.replicas_per_master = kwargs.get('replicas_per_master', None) - self.replicas_per_primary = kwargs.get('replicas_per_primary', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', "Enabled") - self.sku = kwargs['sku'] - self.subnet_id = kwargs.get('subnet_id', None) - self.static_ip = kwargs.get('static_ip', None) - - -class RedisCreateProperties(RedisCommonProperties): - """Properties supplied to Create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: Required. The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :vartype subnet_id: str - :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache - inside an existing Azure Virtual Network; auto assigned by default. - :vartype static_ip: str - """ - - _validation = { - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - } - - _attribute_map = { - 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'static_ip': {'key': 'staticIP', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: Required. The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :paramtype subnet_id: str - :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis - cache inside an existing Azure Virtual Network; auto assigned by default. - :paramtype static_ip: str - """ - super(RedisCreateProperties, self).__init__(**kwargs) - self.sku = kwargs['sku'] - self.subnet_id = kwargs.get('subnet_id', None) - self.static_ip = kwargs.get('static_ip', None) - - -class RedisFirewallRule(ProxyResource): - """A firewall rule on a redis cache has a name, and describes a contiguous range of IP addresses permitted to connect. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar start_ip: Required. lowest IP address included in the range. - :vartype start_ip: str - :ivar end_ip: Required. highest IP address included in the range. - :vartype end_ip: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_ip: Required. lowest IP address included in the range. - :paramtype start_ip: str - :keyword end_ip: Required. highest IP address included in the range. - :paramtype end_ip: str - """ - super(RedisFirewallRule, self).__init__(**kwargs) - self.start_ip = kwargs['start_ip'] - self.end_ip = kwargs['end_ip'] - - -class RedisFirewallRuleCreateParameters(RedisFirewallRule): - """Parameters required for creating a firewall rule on redis cache. (Note, you can just use the FirewallRule type instead now.). - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar start_ip: Required. lowest IP address included in the range. - :vartype start_ip: str - :ivar end_ip: Required. highest IP address included in the range. - :vartype end_ip: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'start_ip': {'required': True}, - 'end_ip': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'start_ip': {'key': 'properties.startIP', 'type': 'str'}, - 'end_ip': {'key': 'properties.endIP', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword start_ip: Required. lowest IP address included in the range. - :paramtype start_ip: str - :keyword end_ip: Required. highest IP address included in the range. - :paramtype end_ip: str - """ - super(RedisFirewallRuleCreateParameters, self).__init__(**kwargs) - - -class RedisFirewallRuleListResult(msrest.serialization.Model): - """The response of list firewall rules Redis operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Results of the list firewall rules operation. - :vartype value: list[~azure.mgmt.redis.models.RedisFirewallRule] - :ivar next_link: Link for next page of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RedisFirewallRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Results of the list firewall rules operation. - :paramtype value: list[~azure.mgmt.redis.models.RedisFirewallRule] - """ - super(RedisFirewallRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class RedisForceRebootResponse(msrest.serialization.Model): - """Response to force reboot for Redis cache. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar message: Status message. - :vartype message: str - """ - - _validation = { - 'message': {'readonly': True}, - } - - _attribute_map = { - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RedisForceRebootResponse, self).__init__(**kwargs) - self.message = None - - -class RedisInstanceDetails(msrest.serialization.Model): - """Details of single instance of redis. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar ssl_port: Redis instance SSL port. - :vartype ssl_port: int - :ivar non_ssl_port: If enableNonSslPort is true, provides Redis instance Non-SSL port. - :vartype non_ssl_port: int - :ivar zone: If the Cache uses availability zones, specifies availability zone where this - instance is located. - :vartype zone: str - :ivar shard_id: If clustering is enabled, the Shard ID of Redis Instance. - :vartype shard_id: int - :ivar is_master: Specifies whether the instance is a primary node. - :vartype is_master: bool - :ivar is_primary: Specifies whether the instance is a primary node. - :vartype is_primary: bool - """ - - _validation = { - 'ssl_port': {'readonly': True}, - 'non_ssl_port': {'readonly': True}, - 'zone': {'readonly': True}, - 'shard_id': {'readonly': True}, - 'is_master': {'readonly': True}, - 'is_primary': {'readonly': True}, - } - - _attribute_map = { - 'ssl_port': {'key': 'sslPort', 'type': 'int'}, - 'non_ssl_port': {'key': 'nonSslPort', 'type': 'int'}, - 'zone': {'key': 'zone', 'type': 'str'}, - 'shard_id': {'key': 'shardId', 'type': 'int'}, - 'is_master': {'key': 'isMaster', 'type': 'bool'}, - 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RedisInstanceDetails, self).__init__(**kwargs) - self.ssl_port = None - self.non_ssl_port = None - self.zone = None - self.shard_id = None - self.is_master = None - self.is_primary = None - - -class RedisLinkedServer(msrest.serialization.Model): - """Linked server Id. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Linked server Id. - :vartype id: str - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(RedisLinkedServer, self).__init__(**kwargs) - self.id = None - - -class RedisLinkedServerCreateParameters(msrest.serialization.Model): - """Parameter required for creating a linked server to redis cache. - - All required parameters must be populated in order to send to Azure. - - :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :vartype linked_redis_cache_id: str - :ivar linked_redis_cache_location: Required. Location of the linked redis cache. - :vartype linked_redis_cache_location: str - :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - - _validation = { - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - } - - _attribute_map = { - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :paramtype linked_redis_cache_id: str - :keyword linked_redis_cache_location: Required. Location of the linked redis cache. - :paramtype linked_redis_cache_location: str - :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - super(RedisLinkedServerCreateParameters, self).__init__(**kwargs) - self.linked_redis_cache_id = kwargs['linked_redis_cache_id'] - self.linked_redis_cache_location = kwargs['linked_redis_cache_location'] - self.server_role = kwargs['server_role'] - - -class RedisLinkedServerCreateProperties(msrest.serialization.Model): - """Create properties for a linked server. - - All required parameters must be populated in order to send to Azure. - - :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :vartype linked_redis_cache_id: str - :ivar linked_redis_cache_location: Required. Location of the linked redis cache. - :vartype linked_redis_cache_location: str - :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - - _validation = { - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - } - - _attribute_map = { - 'linked_redis_cache_id': {'key': 'linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'serverRole', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :paramtype linked_redis_cache_id: str - :keyword linked_redis_cache_location: Required. Location of the linked redis cache. - :paramtype linked_redis_cache_location: str - :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - super(RedisLinkedServerCreateProperties, self).__init__(**kwargs) - self.linked_redis_cache_id = kwargs['linked_redis_cache_id'] - self.linked_redis_cache_location = kwargs['linked_redis_cache_location'] - self.server_role = kwargs['server_role'] - - -class RedisLinkedServerProperties(RedisLinkedServerCreateProperties): - """Properties of a linked server to be returned in get/put response. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :vartype linked_redis_cache_id: str - :ivar linked_redis_cache_location: Required. Location of the linked redis cache. - :vartype linked_redis_cache_location: str - :ivar server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - :ivar provisioning_state: Terminal state of the link between primary and secondary redis cache. - :vartype provisioning_state: str - """ - - _validation = { - 'linked_redis_cache_id': {'required': True}, - 'linked_redis_cache_location': {'required': True}, - 'server_role': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'linked_redis_cache_id': {'key': 'linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'serverRole', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword linked_redis_cache_id: Required. Fully qualified resourceId of the linked redis cache. - :paramtype linked_redis_cache_id: str - :keyword linked_redis_cache_location: Required. Location of the linked redis cache. - :paramtype linked_redis_cache_location: str - :keyword server_role: Required. Role of the linked server. Possible values include: "Primary", - "Secondary". - :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - super(RedisLinkedServerProperties, self).__init__(**kwargs) - self.provisioning_state = None - - -class RedisLinkedServerWithProperties(ProxyResource): - """Response to put/get linked server (with properties) for Redis cache. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar linked_redis_cache_id: Fully qualified resourceId of the linked redis cache. - :vartype linked_redis_cache_id: str - :ivar linked_redis_cache_location: Location of the linked redis cache. - :vartype linked_redis_cache_location: str - :ivar server_role: Role of the linked server. Possible values include: "Primary", "Secondary". - :vartype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - :ivar provisioning_state: Terminal state of the link between primary and secondary redis cache. - :vartype provisioning_state: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'linked_redis_cache_id': {'key': 'properties.linkedRedisCacheId', 'type': 'str'}, - 'linked_redis_cache_location': {'key': 'properties.linkedRedisCacheLocation', 'type': 'str'}, - 'server_role': {'key': 'properties.serverRole', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword linked_redis_cache_id: Fully qualified resourceId of the linked redis cache. - :paramtype linked_redis_cache_id: str - :keyword linked_redis_cache_location: Location of the linked redis cache. - :paramtype linked_redis_cache_location: str - :keyword server_role: Role of the linked server. Possible values include: "Primary", - "Secondary". - :paramtype server_role: str or ~azure.mgmt.redis.models.ReplicationRole - """ - super(RedisLinkedServerWithProperties, self).__init__(**kwargs) - self.linked_redis_cache_id = kwargs.get('linked_redis_cache_id', None) - self.linked_redis_cache_location = kwargs.get('linked_redis_cache_location', None) - self.server_role = kwargs.get('server_role', None) - self.provisioning_state = None - - -class RedisLinkedServerWithPropertiesList(msrest.serialization.Model): - """List of linked servers (with properties) of a Redis cache. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of linked servers (with properties) of a Redis cache. - :vartype value: list[~azure.mgmt.redis.models.RedisLinkedServerWithProperties] - :ivar next_link: Link for next set. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RedisLinkedServerWithProperties]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: List of linked servers (with properties) of a Redis cache. - :paramtype value: list[~azure.mgmt.redis.models.RedisLinkedServerWithProperties] - """ - super(RedisLinkedServerWithPropertiesList, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class RedisListResult(msrest.serialization.Model): - """The response of list Redis operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Redis cache instances. - :vartype value: list[~azure.mgmt.redis.models.RedisResource] - :ivar next_link: Link for next page of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RedisResource]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: List of Redis cache instances. - :paramtype value: list[~azure.mgmt.redis.models.RedisResource] - """ - super(RedisListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class RedisPatchSchedule(ProxyResource): - """Response to put/get patch schedules for Redis cache. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar schedule_entries: Required. List of patch schedules for a Redis cache. - :vartype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'schedule_entries': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword schedule_entries: Required. List of patch schedules for a Redis cache. - :paramtype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] - """ - super(RedisPatchSchedule, self).__init__(**kwargs) - self.schedule_entries = kwargs['schedule_entries'] - - -class RedisPatchScheduleListResult(msrest.serialization.Model): - """The response of list patch schedules Redis operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Results of the list patch schedules operation. - :vartype value: list[~azure.mgmt.redis.models.RedisPatchSchedule] - :ivar next_link: Link for next page of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RedisPatchSchedule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword value: Results of the list patch schedules operation. - :paramtype value: list[~azure.mgmt.redis.models.RedisPatchSchedule] - """ - super(RedisPatchScheduleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class RedisProperties(RedisCreateProperties): - """Properties of the redis cache. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: Required. The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :vartype subnet_id: str - :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache - inside an existing Azure Virtual Network; auto assigned by default. - :vartype static_ip: str - :ivar provisioning_state: Redis instance provisioning status. Possible values include: - "Creating", "Deleting", "Disabled", "Failed", "Linking", "Provisioning", - "RecoveringScaleFailure", "Scaling", "Succeeded", "Unlinking", "Unprovisioning", "Updating". - :vartype provisioning_state: str or ~azure.mgmt.redis.models.ProvisioningState - :ivar host_name: Redis host name. - :vartype host_name: str - :ivar port: Redis non-SSL port. - :vartype port: int - :ivar ssl_port: Redis SSL port. - :vartype ssl_port: int - :ivar access_keys: The keys of the Redis cache - not set if this object is not the response to - Create or Update redis cache. - :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys - :ivar linked_servers: List of the linked servers associated with the cache. - :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] - :ivar instances: List of the Redis instances associated with the cache. - :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] - :ivar private_endpoint_connections: List of private endpoint connection associated with the - specified redis cache. - :vartype private_endpoint_connections: list[~azure.mgmt.redis.models.PrivateEndpointConnection] - """ - - _validation = { - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'provisioning_state': {'readonly': True}, - 'host_name': {'readonly': True}, - 'port': {'readonly': True}, - 'ssl_port': {'readonly': True}, - 'access_keys': {'readonly': True}, - 'linked_servers': {'readonly': True}, - 'instances': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'subnetId', 'type': 'str'}, - 'static_ip': {'key': 'staticIP', 'type': 'str'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'host_name': {'key': 'hostName', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - 'ssl_port': {'key': 'sslPort', 'type': 'int'}, - 'access_keys': {'key': 'accessKeys', 'type': 'RedisAccessKeys'}, - 'linked_servers': {'key': 'linkedServers', 'type': '[RedisLinkedServer]'}, - 'instances': {'key': 'instances', 'type': '[RedisInstanceDetails]'}, - 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: Required. The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :paramtype subnet_id: str - :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis - cache inside an existing Azure Virtual Network; auto assigned by default. - :paramtype static_ip: str - """ - super(RedisProperties, self).__init__(**kwargs) - self.provisioning_state = None - self.host_name = None - self.port = None - self.ssl_port = None - self.access_keys = None - self.linked_servers = None - self.instances = None - self.private_endpoint_connections = None - - -class RedisRebootParameters(msrest.serialization.Model): - """Specifies which Redis node(s) to reboot. - - :ivar reboot_type: Which Redis node(s) to reboot. Depending on this value data loss is - possible. Possible values include: "PrimaryNode", "SecondaryNode", "AllNodes". - :vartype reboot_type: str or ~azure.mgmt.redis.models.RebootType - :ivar shard_id: If clustering is enabled, the ID of the shard to be rebooted. - :vartype shard_id: int - :ivar ports: A list of redis instances to reboot, specified by per-instance SSL ports or - non-SSL ports. - :vartype ports: list[int] - """ - - _attribute_map = { - 'reboot_type': {'key': 'rebootType', 'type': 'str'}, - 'shard_id': {'key': 'shardId', 'type': 'int'}, - 'ports': {'key': 'ports', 'type': '[int]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword reboot_type: Which Redis node(s) to reboot. Depending on this value data loss is - possible. Possible values include: "PrimaryNode", "SecondaryNode", "AllNodes". - :paramtype reboot_type: str or ~azure.mgmt.redis.models.RebootType - :keyword shard_id: If clustering is enabled, the ID of the shard to be rebooted. - :paramtype shard_id: int - :keyword ports: A list of redis instances to reboot, specified by per-instance SSL ports or - non-SSL ports. - :paramtype ports: list[int] - """ - super(RedisRebootParameters, self).__init__(**kwargs) - self.reboot_type = kwargs.get('reboot_type', None) - self.shard_id = kwargs.get('shard_id', None) - self.ports = kwargs.get('ports', None) - - -class RedisRegenerateKeyParameters(msrest.serialization.Model): - """Specifies which Redis access keys to reset. - - All required parameters must be populated in order to send to Azure. - - :ivar key_type: Required. The Redis access key to regenerate. Possible values include: - "Primary", "Secondary". - :vartype key_type: str or ~azure.mgmt.redis.models.RedisKeyType - """ - - _validation = { - 'key_type': {'required': True}, - } - - _attribute_map = { - 'key_type': {'key': 'keyType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword key_type: Required. The Redis access key to regenerate. Possible values include: - "Primary", "Secondary". - :paramtype key_type: str or ~azure.mgmt.redis.models.RedisKeyType - """ - super(RedisRegenerateKeyParameters, self).__init__(**kwargs) - self.key_type = kwargs['key_type'] - - -class TrackedResource(Resource): - """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar location: Required. The geo-location where the resource lives. - :vartype location: str - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword location: Required. The geo-location where the resource lives. - :paramtype location: str - """ - super(TrackedResource, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs['location'] - - -class RedisResource(TrackedResource): - """A single Redis item in List or Get Operation. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - :vartype id: str - :ivar name: The name of the resource. - :vartype name: str - :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - "Microsoft.Storage/storageAccounts". - :vartype type: str - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar location: Required. The geo-location where the resource lives. - :vartype location: str - :ivar zones: A list of availability zones denoting where the resource needs to come from. - :vartype zones: list[str] - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: Required. The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - :ivar subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :vartype subnet_id: str - :ivar static_ip: Static IP address. Optionally, may be specified when deploying a Redis cache - inside an existing Azure Virtual Network; auto assigned by default. - :vartype static_ip: str - :ivar provisioning_state: Redis instance provisioning status. Possible values include: - "Creating", "Deleting", "Disabled", "Failed", "Linking", "Provisioning", - "RecoveringScaleFailure", "Scaling", "Succeeded", "Unlinking", "Unprovisioning", "Updating". - :vartype provisioning_state: str or ~azure.mgmt.redis.models.ProvisioningState - :ivar host_name: Redis host name. - :vartype host_name: str - :ivar port: Redis non-SSL port. - :vartype port: int - :ivar ssl_port: Redis SSL port. - :vartype ssl_port: int - :ivar access_keys: The keys of the Redis cache - not set if this object is not the response to - Create or Update redis cache. - :vartype access_keys: ~azure.mgmt.redis.models.RedisAccessKeys - :ivar linked_servers: List of the linked servers associated with the cache. - :vartype linked_servers: list[~azure.mgmt.redis.models.RedisLinkedServer] - :ivar instances: List of the Redis instances associated with the cache. - :vartype instances: list[~azure.mgmt.redis.models.RedisInstanceDetails] - :ivar private_endpoint_connections: List of private endpoint connection associated with the - specified redis cache. - :vartype private_endpoint_connections: list[~azure.mgmt.redis.models.PrivateEndpointConnection] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'sku': {'required': True}, - 'subnet_id': {'pattern': r'^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'}, - 'static_ip': {'pattern': r'^\d+\.\d+\.\d+\.\d+$'}, - 'provisioning_state': {'readonly': True}, - 'host_name': {'readonly': True}, - 'port': {'readonly': True}, - 'ssl_port': {'readonly': True}, - 'access_keys': {'readonly': True}, - 'linked_servers': {'readonly': True}, - 'instances': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, - 'static_ip': {'key': 'properties.staticIP', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'ssl_port': {'key': 'properties.sslPort', 'type': 'int'}, - 'access_keys': {'key': 'properties.accessKeys', 'type': 'RedisAccessKeys'}, - 'linked_servers': {'key': 'properties.linkedServers', 'type': '[RedisLinkedServer]'}, - 'instances': {'key': 'properties.instances', 'type': '[RedisInstanceDetails]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword location: Required. The geo-location where the resource lives. - :paramtype location: str - :keyword zones: A list of availability zones denoting where the resource needs to come from. - :paramtype zones: list[str] - :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: Required. The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - :keyword subnet_id: The full resource ID of a subnet in a virtual network to deploy the Redis - cache in. Example format: - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1. - :paramtype subnet_id: str - :keyword static_ip: Static IP address. Optionally, may be specified when deploying a Redis - cache inside an existing Azure Virtual Network; auto assigned by default. - :paramtype static_ip: str - """ - super(RedisResource, self).__init__(**kwargs) - self.zones = kwargs.get('zones', None) - self.identity = kwargs.get('identity', None) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.redis_version = kwargs.get('redis_version', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', False) - self.replicas_per_master = kwargs.get('replicas_per_master', None) - self.replicas_per_primary = kwargs.get('replicas_per_primary', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', "Enabled") - self.sku = kwargs['sku'] - self.subnet_id = kwargs.get('subnet_id', None) - self.static_ip = kwargs.get('static_ip', None) - self.provisioning_state = None - self.host_name = None - self.port = None - self.ssl_port = None - self.access_keys = None - self.linked_servers = None - self.instances = None - self.private_endpoint_connections = None - - -class RedisUpdateParameters(msrest.serialization.Model): - """Parameters supplied to the Update Redis operation. - - :ivar tags: A set of tags. Resource tags. - :vartype tags: dict[str, str] - :ivar identity: The identity of the resource. - :vartype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'redis_configuration': {'key': 'properties.redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'properties.redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'properties.enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'properties.replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'properties.replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'properties.tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'properties.shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'properties.minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'Sku'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword tags: A set of tags. Resource tags. - :paramtype tags: dict[str, str] - :keyword identity: The identity of the resource. - :paramtype identity: ~azure.mgmt.redis.models.ManagedServiceIdentity - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - """ - super(RedisUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.identity = kwargs.get('identity', None) - self.redis_configuration = kwargs.get('redis_configuration', None) - self.redis_version = kwargs.get('redis_version', None) - self.enable_non_ssl_port = kwargs.get('enable_non_ssl_port', False) - self.replicas_per_master = kwargs.get('replicas_per_master', None) - self.replicas_per_primary = kwargs.get('replicas_per_primary', None) - self.tenant_settings = kwargs.get('tenant_settings', None) - self.shard_count = kwargs.get('shard_count', None) - self.minimum_tls_version = kwargs.get('minimum_tls_version', None) - self.public_network_access = kwargs.get('public_network_access', "Enabled") - self.sku = kwargs.get('sku', None) - - -class RedisUpdateProperties(RedisCommonProperties): - """Patchable properties of the redis cache. - - :ivar redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :vartype redis_configuration: ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :ivar redis_version: Redis version. Only major version will be used in PUT/PATCH request with - current valid values: (4, 6). - :vartype redis_version: str - :ivar enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is enabled. - :vartype enable_non_ssl_port: bool - :ivar replicas_per_master: The number of replicas to be created per primary. - :vartype replicas_per_master: int - :ivar replicas_per_primary: The number of replicas to be created per primary. - :vartype replicas_per_primary: int - :ivar tenant_settings: A dictionary of tenant settings. - :vartype tenant_settings: dict[str, str] - :ivar shard_count: The number of shards to be created on a Premium Cluster Cache. - :vartype shard_count: int - :ivar minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :vartype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :ivar public_network_access: Whether or not public endpoint access is allowed for this cache. - Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private - endpoints are the exclusive access method. Default value is 'Enabled'. Possible values include: - "Enabled", "Disabled". Default value: "Enabled". - :vartype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :ivar sku: The SKU of the Redis cache to deploy. - :vartype sku: ~azure.mgmt.redis.models.Sku - """ - - _attribute_map = { - 'redis_configuration': {'key': 'redisConfiguration', 'type': 'RedisCommonPropertiesRedisConfiguration'}, - 'redis_version': {'key': 'redisVersion', 'type': 'str'}, - 'enable_non_ssl_port': {'key': 'enableNonSslPort', 'type': 'bool'}, - 'replicas_per_master': {'key': 'replicasPerMaster', 'type': 'int'}, - 'replicas_per_primary': {'key': 'replicasPerPrimary', 'type': 'int'}, - 'tenant_settings': {'key': 'tenantSettings', 'type': '{str}'}, - 'shard_count': {'key': 'shardCount', 'type': 'int'}, - 'minimum_tls_version': {'key': 'minimumTlsVersion', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword redis_configuration: All Redis Settings. Few possible keys: - rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value - etc. - :paramtype redis_configuration: - ~azure.mgmt.redis.models.RedisCommonPropertiesRedisConfiguration - :keyword redis_version: Redis version. Only major version will be used in PUT/PATCH request - with current valid values: (4, 6). - :paramtype redis_version: str - :keyword enable_non_ssl_port: Specifies whether the non-ssl Redis server port (6379) is - enabled. - :paramtype enable_non_ssl_port: bool - :keyword replicas_per_master: The number of replicas to be created per primary. - :paramtype replicas_per_master: int - :keyword replicas_per_primary: The number of replicas to be created per primary. - :paramtype replicas_per_primary: int - :keyword tenant_settings: A dictionary of tenant settings. - :paramtype tenant_settings: dict[str, str] - :keyword shard_count: The number of shards to be created on a Premium Cluster Cache. - :paramtype shard_count: int - :keyword minimum_tls_version: Optional: requires clients to use a specified TLS version (or - higher) to connect (e,g, '1.0', '1.1', '1.2'). Possible values include: "1.0", "1.1", "1.2". - :paramtype minimum_tls_version: str or ~azure.mgmt.redis.models.TlsVersion - :keyword public_network_access: Whether or not public endpoint access is allowed for this - cache. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', - private endpoints are the exclusive access method. Default value is 'Enabled'. Possible values - include: "Enabled", "Disabled". Default value: "Enabled". - :paramtype public_network_access: str or ~azure.mgmt.redis.models.PublicNetworkAccess - :keyword sku: The SKU of the Redis cache to deploy. - :paramtype sku: ~azure.mgmt.redis.models.Sku - """ - super(RedisUpdateProperties, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - - -class ScheduleEntry(msrest.serialization.Model): - """Patch schedule entry for a Premium Redis Cache. - - All required parameters must be populated in order to send to Azure. - - :ivar day_of_week: Required. Day of the week when a cache can be patched. Possible values - include: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", - "Everyday", "Weekend". - :vartype day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek - :ivar start_hour_utc: Required. Start hour after which cache patching can start. - :vartype start_hour_utc: int - :ivar maintenance_window: ISO8601 timespan specifying how much time cache patching can take. - :vartype maintenance_window: ~datetime.timedelta - """ - - _validation = { - 'day_of_week': {'required': True}, - 'start_hour_utc': {'required': True}, - } - - _attribute_map = { - 'day_of_week': {'key': 'dayOfWeek', 'type': 'str'}, - 'start_hour_utc': {'key': 'startHourUtc', 'type': 'int'}, - 'maintenance_window': {'key': 'maintenanceWindow', 'type': 'duration'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword day_of_week: Required. Day of the week when a cache can be patched. Possible values - include: "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday", - "Everyday", "Weekend". - :paramtype day_of_week: str or ~azure.mgmt.redis.models.DayOfWeek - :keyword start_hour_utc: Required. Start hour after which cache patching can start. - :paramtype start_hour_utc: int - :keyword maintenance_window: ISO8601 timespan specifying how much time cache patching can take. - :paramtype maintenance_window: ~datetime.timedelta - """ - super(ScheduleEntry, self).__init__(**kwargs) - self.day_of_week = kwargs['day_of_week'] - self.start_hour_utc = kwargs['start_hour_utc'] - self.maintenance_window = kwargs.get('maintenance_window', None) - - -class Sku(msrest.serialization.Model): - """SKU parameters supplied to the create Redis operation. - - All required parameters must be populated in order to send to Azure. - - :ivar name: Required. The type of Redis cache to deploy. Valid values: (Basic, Standard, - Premium). Possible values include: "Basic", "Standard", "Premium". - :vartype name: str or ~azure.mgmt.redis.models.SkuName - :ivar family: Required. The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P = - Premium). Possible values include: "C", "P". - :vartype family: str or ~azure.mgmt.redis.models.SkuFamily - :ivar capacity: Required. The size of the Redis cache to deploy. Valid values: for C - (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). - :vartype capacity: int - """ - - _validation = { - 'name': {'required': True}, - 'family': {'required': True}, - 'capacity': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword name: Required. The type of Redis cache to deploy. Valid values: (Basic, Standard, - Premium). Possible values include: "Basic", "Standard", "Premium". - :paramtype name: str or ~azure.mgmt.redis.models.SkuName - :keyword family: Required. The SKU family to use. Valid values: (C, P). (C = Basic/Standard, P - = Premium). Possible values include: "C", "P". - :paramtype family: str or ~azure.mgmt.redis.models.SkuFamily - :keyword capacity: Required. The size of the Redis cache to deploy. Valid values: for C - (Basic/Standard) family (0, 1, 2, 3, 4, 5, 6), for P (Premium) family (1, 2, 3, 4). - :paramtype capacity: int - """ - super(Sku, self).__init__(**kwargs) - self.name = kwargs['name'] - self.family = kwargs['family'] - self.capacity = kwargs['capacity'] - - -class UpgradeNotification(msrest.serialization.Model): - """Properties of upgrade notification. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of upgrade notification. - :vartype name: str - :ivar timestamp: Timestamp when upgrade notification occurred. - :vartype timestamp: ~datetime.datetime - :ivar upsell_notification: Details about this upgrade notification. - :vartype upsell_notification: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'timestamp': {'readonly': True}, - 'upsell_notification': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, - 'upsell_notification': {'key': 'upsellNotification', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(UpgradeNotification, self).__init__(**kwargs) - self.name = None - self.timestamp = None - self.upsell_notification = None - - -class UserAssignedIdentity(msrest.serialization.Model): - """User assigned identity properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar principal_id: The principal ID of the assigned identity. - :vartype principal_id: str - :ivar client_id: The client ID of the assigned identity. - :vartype client_id: str - """ - - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - """ - super(UserAssignedIdentity, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py index 3c7e80b9d40a..59f6d74616f9 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/models/_models_py3.py @@ -935,12 +935,15 @@ class RedisCommonPropertiesRedisConfiguration(msrest.serialization.Model): :ivar preferred_data_persistence_auth_method: Preferred auth method to communicate to storage account used for data persistence, specify SAS or ManagedIdentity, default value is SAS. :vartype preferred_data_persistence_auth_method: str + :ivar zonal_configuration: Zonal Configuration. + :vartype zonal_configuration: str """ _validation = { 'maxclients': {'readonly': True}, 'preferred_data_archive_auth_method': {'readonly': True}, 'preferred_data_persistence_auth_method': {'readonly': True}, + 'zonal_configuration': {'readonly': True}, } _attribute_map = { @@ -958,6 +961,7 @@ class RedisCommonPropertiesRedisConfiguration(msrest.serialization.Model): 'maxclients': {'key': 'maxclients', 'type': 'str'}, 'preferred_data_archive_auth_method': {'key': 'preferred-data-archive-auth-method', 'type': 'str'}, 'preferred_data_persistence_auth_method': {'key': 'preferred-data-persistence-auth-method', 'type': 'str'}, + 'zonal_configuration': {'key': 'zonal-configuration', 'type': 'str'}, } def __init__( @@ -1022,6 +1026,7 @@ def __init__( self.maxclients = None self.preferred_data_archive_auth_method = None self.preferred_data_persistence_auth_method = None + self.zonal_configuration = None class RedisCreateParameters(msrest.serialization.Model): @@ -1858,6 +1863,8 @@ class RedisPatchSchedule(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str :ivar schedule_entries: Required. List of patch schedules for a Redis cache. :vartype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] """ @@ -1866,6 +1873,7 @@ class RedisPatchSchedule(ProxyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'location': {'readonly': True}, 'schedule_entries': {'required': True}, } @@ -1873,6 +1881,7 @@ class RedisPatchSchedule(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, 'schedule_entries': {'key': 'properties.scheduleEntries', 'type': '[ScheduleEntry]'}, } @@ -1887,6 +1896,7 @@ def __init__( :paramtype schedule_entries: list[~azure.mgmt.redis.models.ScheduleEntry] """ super(RedisPatchSchedule, self).__init__(**kwargs) + self.location = None self.schedule_entries = schedule_entries diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py index 8c26e464fe14..0bfefce9fce2 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_firewall_rules_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,24 +20,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - subscription_id, # type: str - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + cache_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -68,13 +63,15 @@ def build_list_request( def build_create_or_update_request( - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + rule_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -105,18 +102,19 @@ def build_create_or_update_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_get_request( - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -148,13 +146,12 @@ def build_get_request( def build_delete_request( - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + rule_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -184,7 +181,6 @@ def build_delete_request( **kwargs ) -# fmt: on class FirewallRulesOperations(object): """FirewallRulesOperations operations. @@ -210,11 +206,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RedisFirewallRuleListResult"] + resource_group_name: str, + cache_name: str, + **kwargs: Any + ) -> Iterable["_models.RedisFirewallRuleListResult"]: """Gets all firewall rules in the specified redis cache. :param resource_group_name: The name of the resource group. @@ -286,13 +281,12 @@ def get_next(next_link=None): @distributed_trace def create_or_update( self, - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - parameters, # type: "_models.RedisFirewallRule" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisFirewallRule" + resource_group_name: str, + cache_name: str, + rule_name: str, + parameters: "_models.RedisFirewallRule", + **kwargs: Any + ) -> "_models.RedisFirewallRule": """Create or update a redis cache firewall rule. :param resource_group_name: The name of the resource group. @@ -355,12 +349,11 @@ def create_or_update( @distributed_trace def get( self, - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisFirewallRule" + resource_group_name: str, + cache_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.RedisFirewallRule": """Gets a single firewall rule in a specified redis cache. :param resource_group_name: The name of the resource group. @@ -412,12 +405,11 @@ def get( @distributed_trace def delete( self, - resource_group_name, # type: str - cache_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + cache_name: str, + rule_name: str, + **kwargs: Any + ) -> None: """Deletes a single firewall rule in a specified redis cache. :param resource_group_name: The name of the resource group. diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py index 8dfcf6e59425..5c9ab25c3aec 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_linked_server_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,25 +22,23 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_create_request_initial( - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + linked_server_name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -71,18 +69,19 @@ def build_create_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request( - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + linked_server_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -114,13 +113,12 @@ def build_delete_request( def build_get_request( - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + linked_server_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -152,12 +150,11 @@ def build_get_request( def build_list_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,7 +183,6 @@ def build_list_request( **kwargs ) -# fmt: on class LinkedServerOperations(object): """LinkedServerOperations operations. @@ -211,13 +207,12 @@ def __init__(self, client, config, serializer, deserializer): def _create_initial( self, - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - parameters, # type: "_models.RedisLinkedServerCreateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisLinkedServerWithProperties" + resource_group_name: str, + name: str, + linked_server_name: str, + parameters: "_models.RedisLinkedServerCreateParameters", + **kwargs: Any + ) -> "_models.RedisLinkedServerWithProperties": cls = kwargs.pop('cls', None) # type: ClsType["_models.RedisLinkedServerWithProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -264,13 +259,12 @@ def _create_initial( @distributed_trace def begin_create( self, - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - parameters, # type: "_models.RedisLinkedServerCreateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RedisLinkedServerWithProperties"] + resource_group_name: str, + name: str, + linked_server_name: str, + parameters: "_models.RedisLinkedServerCreateParameters", + **kwargs: Any + ) -> LROPoller["_models.RedisLinkedServerWithProperties"]: """Adds a linked server to the Redis cache (requires Premium SKU). :param resource_group_name: The name of the resource group. @@ -341,12 +335,11 @@ def get_long_running_output(pipeline_response): @distributed_trace def delete( self, - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + name: str, + linked_server_name: str, + **kwargs: Any + ) -> None: """Deletes the linked server from a redis cache (requires Premium SKU). :param resource_group_name: The name of the resource group. @@ -395,12 +388,11 @@ def delete( @distributed_trace def get( self, - resource_group_name, # type: str - name, # type: str - linked_server_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisLinkedServerWithProperties" + resource_group_name: str, + name: str, + linked_server_name: str, + **kwargs: Any + ) -> "_models.RedisLinkedServerWithProperties": """Gets the detailed information about a linked server of a redis cache (requires Premium SKU). :param resource_group_name: The name of the resource group. @@ -452,11 +444,10 @@ def get( @distributed_trace def list( self, - resource_group_name, # type: str - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RedisLinkedServerWithPropertiesList"] + resource_group_name: str, + name: str, + **kwargs: Any + ) -> Iterable["_models.RedisLinkedServerWithPropertiesList"]: """Gets the list of linked servers associated with this redis cache (requires Premium SKU). :param resource_group_name: The name of the resource group. diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py index 215ceed25cac..8bbe33f66043 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,21 +20,15 @@ from .. import models as _models from .._vendor import _convert_request - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -56,7 +50,6 @@ def build_list_request( **kwargs ) -# fmt: on class Operations(object): """Operations operations. @@ -82,9 +75,8 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.OperationListResult"] + **kwargs: Any + ) -> Iterable["_models.OperationListResult"]: """Lists all of the available REST API operations of the Microsoft.Cache provider. :keyword callable cls: A custom type or function that will be passed the direct response diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py index b821ff1ee40f..7b0e52250720 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_patch_schedules_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,24 +20,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_by_redis_resource_request( - subscription_id, # type: str - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + resource_group_name: str, + cache_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -68,13 +63,15 @@ def build_list_by_redis_resource_request( def build_create_or_update_request( - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -105,18 +102,19 @@ def build_create_or_update_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request( - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -148,13 +146,12 @@ def build_delete_request( def build_get_request( - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -184,7 +181,6 @@ def build_get_request( **kwargs ) -# fmt: on class PatchSchedulesOperations(object): """PatchSchedulesOperations operations. @@ -210,11 +206,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_by_redis_resource( self, - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RedisPatchScheduleListResult"] + resource_group_name: str, + cache_name: str, + **kwargs: Any + ) -> Iterable["_models.RedisPatchScheduleListResult"]: """Gets all patch schedules in the specified redis cache (there is only one). :param resource_group_name: The name of the resource group. @@ -286,13 +281,12 @@ def get_next(next_link=None): @distributed_trace def create_or_update( self, - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - parameters, # type: "_models.RedisPatchSchedule" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisPatchSchedule" + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + parameters: "_models.RedisPatchSchedule", + **kwargs: Any + ) -> "_models.RedisPatchSchedule": """Create or replace the patching schedule for Redis cache. :param resource_group_name: The name of the resource group. @@ -355,12 +349,11 @@ def create_or_update( @distributed_trace def delete( self, - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + **kwargs: Any + ) -> None: """Deletes the patching schedule of a redis cache. :param resource_group_name: The name of the resource group. @@ -408,12 +401,11 @@ def delete( @distributed_trace def get( self, - resource_group_name, # type: str - name, # type: str - default, # type: Union[str, "_models.DefaultName"] - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisPatchSchedule" + resource_group_name: str, + name: str, + default: Union[str, "_models.DefaultName"], + **kwargs: Any + ) -> "_models.RedisPatchSchedule": """Gets the patching schedule of a redis cache. :param resource_group_name: The name of the resource group. diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py index c6bedb4dc06d..afe0526c56ef 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_endpoint_connections_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,24 +22,19 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_request( - resource_group_name, # type: str - cache_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -70,13 +65,12 @@ def build_list_request( def build_get_request( - resource_group_name, # type: str - cache_name, # type: str - private_endpoint_connection_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + private_endpoint_connection_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -108,13 +102,15 @@ def build_get_request( def build_put_request_initial( - resource_group_name, # type: str - cache_name, # type: str - subscription_id, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + subscription_id: str, + private_endpoint_connection_name: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -145,18 +141,19 @@ def build_put_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request( - resource_group_name, # type: str - cache_name, # type: str - subscription_id, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + subscription_id: str, + private_endpoint_connection_name: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -186,7 +183,6 @@ def build_delete_request( **kwargs ) -# fmt: on class PrivateEndpointConnectionsOperations(object): """PrivateEndpointConnectionsOperations operations. @@ -212,11 +208,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list( self, - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + resource_group_name: str, + cache_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateEndpointConnectionListResult"]: """List all the private endpoint connections associated with the redis cache. :param resource_group_name: The name of the resource group. @@ -289,12 +284,11 @@ def get_next(next_link=None): @distributed_trace def get( self, - resource_group_name, # type: str - cache_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnection" + resource_group_name: str, + cache_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": """Gets the specified private endpoint connection associated with the redis cache. :param resource_group_name: The name of the resource group. @@ -346,13 +340,12 @@ def get( def _put_initial( self, - resource_group_name, # type: str - cache_name, # type: str - private_endpoint_connection_name, # type: str - properties, # type: "_models.PrivateEndpointConnection" - **kwargs # type: Any - ): - # type: (...) -> "_models.PrivateEndpointConnection" + resource_group_name: str, + cache_name: str, + private_endpoint_connection_name: str, + properties: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -395,13 +388,12 @@ def _put_initial( @distributed_trace def begin_put( self, - resource_group_name, # type: str - cache_name, # type: str - private_endpoint_connection_name, # type: str - properties, # type: "_models.PrivateEndpointConnection" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + resource_group_name: str, + cache_name: str, + private_endpoint_connection_name: str, + properties: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> LROPoller["_models.PrivateEndpointConnection"]: """Update the state of specified private endpoint connection associated with the redis cache. :param resource_group_name: The name of the resource group. @@ -472,12 +464,11 @@ def get_long_running_output(pipeline_response): @distributed_trace def delete( self, - resource_group_name, # type: str - cache_name, # type: str - private_endpoint_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + cache_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: """Deletes the specified private endpoint connection associated with the redis cache. :param resource_group_name: The name of the resource group. diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py index 8c430f672619..8b8dcec075cd 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_private_link_resources_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -20,24 +20,18 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_list_by_redis_cache_request( - resource_group_name, # type: str - cache_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + cache_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -66,7 +60,6 @@ def build_list_by_redis_cache_request( **kwargs ) -# fmt: on class PrivateLinkResourcesOperations(object): """PrivateLinkResourcesOperations operations. @@ -92,11 +85,10 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def list_by_redis_cache( self, - resource_group_name, # type: str - cache_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + resource_group_name: str, + cache_name: str, + **kwargs: Any + ) -> Iterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources that need to be created for a redis cache. :param resource_group_name: The name of the resource group. diff --git a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py index f040ad148a15..13cccf68f243 100644 --- a/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py +++ b/sdk/redis/azure-mgmt-redis/azure/mgmt/redis/operations/_redis_operations.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import functools -from typing import TYPE_CHECKING +from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -22,22 +22,20 @@ from .. import models as _models from .._vendor import _convert_request, _format_url_section - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False -# fmt: off def build_check_name_availability_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -65,19 +63,20 @@ def build_check_name_availability_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_list_upgrade_notifications_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - history = kwargs.pop('history') # type: float - + resource_group_name: str, + name: str, + subscription_id: str, + *, + history: float, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -109,12 +108,14 @@ def build_list_upgrade_notifications_request( def build_create_request_initial( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -144,17 +145,21 @@ def build_create_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_update_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -184,17 +189,18 @@ def build_update_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_delete_request_initial( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -225,12 +231,11 @@ def build_delete_request_initial( def build_get_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -261,11 +266,10 @@ def build_get_request( def build_list_by_resource_group_request( - resource_group_name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -295,10 +299,9 @@ def build_list_by_resource_group_request( def build_list_by_subscription_request( - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -327,12 +330,11 @@ def build_list_by_subscription_request( def build_list_keys_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + **kwargs: Any +) -> HttpRequest: api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -363,12 +365,14 @@ def build_list_keys_request( def build_regenerate_key_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -398,17 +402,21 @@ def build_regenerate_key_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_force_reboot_request( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -438,17 +446,21 @@ def build_force_reboot_request( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_import_data_request_initial( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -478,17 +490,21 @@ def build_import_data_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) def build_export_data_request_initial( - resource_group_name, # type: str - name, # type: str - subscription_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest + resource_group_name: str, + name: str, + subscription_id: str, + *, + json: JSONType = None, + content: Any = None, + **kwargs: Any +) -> HttpRequest: content_type = kwargs.pop('content_type', None) # type: Optional[str] api_version = "2021-06-01" @@ -518,10 +534,11 @@ def build_export_data_request_initial( url=url, params=query_parameters, headers=header_parameters, + json=json, + content=content, **kwargs ) -# fmt: on class RedisOperations(object): """RedisOperations operations. @@ -547,10 +564,9 @@ def __init__(self, client, config, serializer, deserializer): @distributed_trace def check_name_availability( self, - parameters, # type: "_models.CheckNameAvailabilityParameters" - **kwargs # type: Any - ): - # type: (...) -> None + parameters: "_models.CheckNameAvailabilityParameters", + **kwargs: Any + ) -> None: """Checks that the redis cache name is valid and is not already in use. :param parameters: Parameters supplied to the CheckNameAvailability Redis operation. The only @@ -597,12 +613,11 @@ def check_name_availability( @distributed_trace def list_upgrade_notifications( self, - resource_group_name, # type: str - name, # type: str - history, # type: float - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NotificationListResponse"] + resource_group_name: str, + name: str, + history: float, + **kwargs: Any + ) -> Iterable["_models.NotificationListResponse"]: """Gets any upgrade notifications for a Redis cache. :param resource_group_name: The name of the resource group. @@ -677,12 +692,11 @@ def get_next(next_link=None): def _create_initial( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.RedisCreateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisResource" + resource_group_name: str, + name: str, + parameters: "_models.RedisCreateParameters", + **kwargs: Any + ) -> "_models.RedisResource": cls = kwargs.pop('cls', None) # type: ClsType["_models.RedisResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -728,12 +742,11 @@ def _create_initial( @distributed_trace def begin_create( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.RedisCreateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RedisResource"] + resource_group_name: str, + name: str, + parameters: "_models.RedisCreateParameters", + **kwargs: Any + ) -> LROPoller["_models.RedisResource"]: """Create or replace (overwrite/recreate, with potential downtime) an existing Redis cache. :param resource_group_name: The name of the resource group. @@ -800,12 +813,11 @@ def get_long_running_output(pipeline_response): @distributed_trace def update( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.RedisUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisResource" + resource_group_name: str, + name: str, + parameters: "_models.RedisUpdateParameters", + **kwargs: Any + ) -> "_models.RedisResource": """Update an existing Redis cache. :param resource_group_name: The name of the resource group. @@ -860,11 +872,10 @@ def update( def _delete_initial( self, - resource_group_name, # type: str - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + name: str, + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -897,11 +908,10 @@ def _delete_initial( @distributed_trace def begin_delete( self, - resource_group_name, # type: str - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + name: str, + **kwargs: Any + ) -> LROPoller[None]: """Deletes a Redis cache. :param resource_group_name: The name of the resource group. @@ -959,11 +969,10 @@ def get_long_running_output(pipeline_response): @distributed_trace def get( self, - resource_group_name, # type: str - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisResource" + resource_group_name: str, + name: str, + **kwargs: Any + ) -> "_models.RedisResource": """Gets a Redis cache (resource description). :param resource_group_name: The name of the resource group. @@ -1012,10 +1021,9 @@ def get( @distributed_trace def list_by_resource_group( self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RedisListResult"] + resource_group_name: str, + **kwargs: Any + ) -> Iterable["_models.RedisListResult"]: """Lists all Redis caches in a resource group. :param resource_group_name: The name of the resource group. @@ -1082,9 +1090,8 @@ def get_next(next_link=None): @distributed_trace def list_by_subscription( self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RedisListResult"] + **kwargs: Any + ) -> Iterable["_models.RedisListResult"]: """Gets all Redis caches in the specified subscription. :keyword callable cls: A custom type or function that will be passed the direct response @@ -1147,11 +1154,10 @@ def get_next(next_link=None): @distributed_trace def list_keys( self, - resource_group_name, # type: str - name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisAccessKeys" + resource_group_name: str, + name: str, + **kwargs: Any + ) -> "_models.RedisAccessKeys": """Retrieve a Redis cache's access keys. This operation requires write permission to the cache resource. @@ -1201,12 +1207,11 @@ def list_keys( @distributed_trace def regenerate_key( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.RedisRegenerateKeyParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisAccessKeys" + resource_group_name: str, + name: str, + parameters: "_models.RedisRegenerateKeyParameters", + **kwargs: Any + ) -> "_models.RedisAccessKeys": """Regenerate Redis cache's access keys. This operation requires write permission to the cache resource. @@ -1263,12 +1268,11 @@ def regenerate_key( @distributed_trace def force_reboot( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.RedisRebootParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.RedisForceRebootResponse" + resource_group_name: str, + name: str, + parameters: "_models.RedisRebootParameters", + **kwargs: Any + ) -> "_models.RedisForceRebootResponse": """Reboot specified Redis node(s). This operation requires write permission to the cache resource. There can be potential data loss. @@ -1324,12 +1328,11 @@ def force_reboot( def _import_data_initial( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.ImportRDBParameters" - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + name: str, + parameters: "_models.ImportRDBParameters", + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1367,12 +1370,11 @@ def _import_data_initial( @distributed_trace def begin_import_data( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.ImportRDBParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + name: str, + parameters: "_models.ImportRDBParameters", + **kwargs: Any + ) -> LROPoller[None]: """Import data into Redis cache. :param resource_group_name: The name of the resource group. @@ -1434,12 +1436,11 @@ def get_long_running_output(pipeline_response): def _export_data_initial( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.ExportRDBParameters" - **kwargs # type: Any - ): - # type: (...) -> None + resource_group_name: str, + name: str, + parameters: "_models.ExportRDBParameters", + **kwargs: Any + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -1477,12 +1478,11 @@ def _export_data_initial( @distributed_trace def begin_export_data( self, - resource_group_name, # type: str - name, # type: str - parameters, # type: "_models.ExportRDBParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] + resource_group_name: str, + name: str, + parameters: "_models.ExportRDBParameters", + **kwargs: Any + ) -> LROPoller[None]: """Export data from the redis cache to blobs in a container. :param resource_group_name: The name of the resource group.