diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/CHANGELOG.md b/sdk/redisenterprise/azure-mgmt-redisenterprise/CHANGELOG.md index 36be9a8509f8..4b6bcf3bd958 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/CHANGELOG.md +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/CHANGELOG.md @@ -1,5 +1,19 @@ # Release History +## 1.0.0 (2021-02-22) + +**Features** + + - Model Database has a new parameter persistence + - Model DatabaseUpdate has a new parameter persistence + - Added operation PrivateLinkResourcesOperations.list_by_cluster + - Added operation group OperationsStatusOperations + +**Breaking changes** + + - Removed operation PrivateLinkResourcesOperations.list_by_redis_enterprise_cache + - Removed operation group GetOperations + ## 1.0.0b1 (2021-02-02) * Initial Release diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/README.md b/sdk/redisenterprise/azure-mgmt-redisenterprise/README.md index 81a83d455bab..59e4345dce0a 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/README.md +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/README.md @@ -25,13 +25,3 @@ section of the project. ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-redisenterprise%2FREADME.png) -# Usage - - -To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) - - - -For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) -Code samples for this package can be found at [Redisenterprise Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. -Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/__init__.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/__init__.py index a8ccb87d57bc..739e16fde4d5 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/__init__.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._redis_enterprise import RedisEnterprise +from ._redis_enterprise_management_client import RedisEnterpriseManagementClient from ._version import VERSION __version__ = VERSION -__all__ = ['RedisEnterprise'] +__all__ = ['RedisEnterpriseManagementClient'] try: from ._patch import patch_sdk # type: ignore diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_configuration.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_configuration.py index 3eafca59ec04..284a0182c779 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_configuration.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_configuration.py @@ -21,15 +21,15 @@ from azure.core.credentials import TokenCredential -class RedisEnterpriseConfiguration(Configuration): - """Configuration for RedisEnterprise. +class RedisEnterpriseManagementClientConfiguration(Configuration): + """Configuration for RedisEnterpriseManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -44,11 +44,11 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(RedisEnterpriseConfiguration, self).__init__(**kwargs) + super(RedisEnterpriseManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-10-01-preview" + self.api_version = "2021-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-redisenterprise/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_metadata.json b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_metadata.json index 6df430837421..b84f64a1a557 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_metadata.json +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_metadata.json @@ -1,9 +1,9 @@ { - "chosen_version": "2020-10-01-preview", - "total_api_version_list": ["2020-10-01-preview"], + "chosen_version": "2021-03-01", + "total_api_version_list": ["2021-03-01"], "client": { - "name": "RedisEnterprise", - "filename": "_redis_enterprise", + "name": "RedisEnterpriseManagementClient", + "filename": "_redis_enterprise_management_client", "description": "REST API for managing Redis Enterprise resources in Azure.", "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, @@ -21,7 +21,7 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } @@ -35,7 +35,7 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } @@ -53,7 +53,7 @@ }, "operation_groups": { "operations": "Operations", - "get": "GetOperations", + "operations_status": "OperationsStatusOperations", "redis_enterprise": "RedisEnterpriseOperations", "databases": "DatabasesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise_management_client.py similarity index 86% rename from sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise.py rename to sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise_management_client.py index 9dc5dd69ae2b..828102d0b626 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise_management_client.py @@ -17,9 +17,9 @@ from azure.core.credentials import TokenCredential -from ._configuration import RedisEnterpriseConfiguration +from ._configuration import RedisEnterpriseManagementClientConfiguration from .operations import Operations -from .operations import GetOperations +from .operations import OperationsStatusOperations from .operations import RedisEnterpriseOperations from .operations import DatabasesOperations from .operations import PrivateEndpointConnectionsOperations @@ -27,13 +27,13 @@ from . import models -class RedisEnterprise(object): +class RedisEnterpriseManagementClient(object): """REST API for managing Redis Enterprise resources in Azure. :ivar operations: Operations operations :vartype operations: azure.mgmt.redisenterprise.operations.Operations - :ivar get: GetOperations operations - :vartype get: azure.mgmt.redisenterprise.operations.GetOperations + :ivar operations_status: OperationsStatusOperations operations + :vartype operations_status: azure.mgmt.redisenterprise.operations.OperationsStatusOperations :ivar redis_enterprise: RedisEnterpriseOperations operations :vartype redis_enterprise: azure.mgmt.redisenterprise.operations.RedisEnterpriseOperations :ivar databases: DatabasesOperations operations @@ -44,7 +44,7 @@ class RedisEnterprise(object): :vartype private_link_resources: azure.mgmt.redisenterprise.operations.PrivateLinkResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -60,7 +60,7 @@ def __init__( # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' - self._config = RedisEnterpriseConfiguration(credential, subscription_id, **kwargs) + self._config = RedisEnterpriseManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -69,7 +69,7 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.get = GetOperations( + self.operations_status = OperationsStatusOperations( self._client, self._config, self._serialize, self._deserialize) self.redis_enterprise = RedisEnterpriseOperations( self._client, self._config, self._serialize, self._deserialize) @@ -85,7 +85,7 @@ def close(self): self._client.close() def __enter__(self): - # type: () -> RedisEnterprise + # type: () -> RedisEnterpriseManagementClient self._client.__enter__() return self diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_version.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_version.py index e5754a47ce68..c47f66669f1b 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_version.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0" diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/__init__.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/__init__.py index a68803b2e658..e8b4634f34bc 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/__init__.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._redis_enterprise import RedisEnterprise -__all__ = ['RedisEnterprise'] +from ._redis_enterprise_management_client import RedisEnterpriseManagementClient +__all__ = ['RedisEnterpriseManagementClient'] diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_configuration.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_configuration.py index f64a66488754..ce5c61e781ff 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_configuration.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_configuration.py @@ -19,15 +19,15 @@ from azure.core.credentials_async import AsyncTokenCredential -class RedisEnterpriseConfiguration(Configuration): - """Configuration for RedisEnterprise. +class RedisEnterpriseManagementClientConfiguration(Configuration): + """Configuration for RedisEnterpriseManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -41,11 +41,11 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(RedisEnterpriseConfiguration, self).__init__(**kwargs) + super(RedisEnterpriseManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-10-01-preview" + self.api_version = "2021-03-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-redisenterprise/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise_management_client.py similarity index 85% rename from sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise.py rename to sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise_management_client.py index 0d9c708136d2..566d26899f5d 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/_redis_enterprise_management_client.py @@ -15,9 +15,9 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import RedisEnterpriseConfiguration +from ._configuration import RedisEnterpriseManagementClientConfiguration from .operations import Operations -from .operations import GetOperations +from .operations import OperationsStatusOperations from .operations import RedisEnterpriseOperations from .operations import DatabasesOperations from .operations import PrivateEndpointConnectionsOperations @@ -25,13 +25,13 @@ from .. import models -class RedisEnterprise(object): +class RedisEnterpriseManagementClient(object): """REST API for managing Redis Enterprise resources in Azure. :ivar operations: Operations operations :vartype operations: azure.mgmt.redisenterprise.aio.operations.Operations - :ivar get: GetOperations operations - :vartype get: azure.mgmt.redisenterprise.aio.operations.GetOperations + :ivar operations_status: OperationsStatusOperations operations + :vartype operations_status: azure.mgmt.redisenterprise.aio.operations.OperationsStatusOperations :ivar redis_enterprise: RedisEnterpriseOperations operations :vartype redis_enterprise: azure.mgmt.redisenterprise.aio.operations.RedisEnterpriseOperations :ivar databases: DatabasesOperations operations @@ -42,7 +42,7 @@ class RedisEnterprise(object): :vartype private_link_resources: azure.mgmt.redisenterprise.aio.operations.PrivateLinkResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: Gets subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -57,7 +57,7 @@ def __init__( ) -> None: if not base_url: base_url = 'https://management.azure.com' - self._config = RedisEnterpriseConfiguration(credential, subscription_id, **kwargs) + self._config = RedisEnterpriseManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -66,7 +66,7 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.get = GetOperations( + self.operations_status = OperationsStatusOperations( self._client, self._config, self._serialize, self._deserialize) self.redis_enterprise = RedisEnterpriseOperations( self._client, self._config, self._serialize, self._deserialize) @@ -80,7 +80,7 @@ def __init__( async def close(self) -> None: await self._client.close() - async def __aenter__(self) -> "RedisEnterprise": + async def __aenter__(self) -> "RedisEnterpriseManagementClient": await self._client.__aenter__() return self diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/__init__.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/__init__.py index 6359ab0b248b..1847039b4da0 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/__init__.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/__init__.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from ._operations import Operations -from ._get_operations import GetOperations +from ._operations_status_operations import OperationsStatusOperations from ._redis_enterprise_operations import RedisEnterpriseOperations from ._databases_operations import DatabasesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -15,7 +15,7 @@ __all__ = [ 'Operations', - 'GetOperations', + 'OperationsStatusOperations', 'RedisEnterpriseOperations', 'DatabasesOperations', 'PrivateEndpointConnectionsOperations', diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_databases_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_databases_operations.py index 5b57c5db4fb2..515e9c1fc31d 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_databases_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_databases_operations.py @@ -51,7 +51,7 @@ def list_by_cluster( ) -> AsyncIterable["_models.DatabaseList"]: """Gets all databases in the specified RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -65,7 +65,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -77,8 +77,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -131,17 +131,17 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -188,7 +188,7 @@ async def begin_create( ) -> AsyncLROPoller["_models.Database"]: """Creates a database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -234,10 +234,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) @@ -267,17 +267,17 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -322,7 +322,7 @@ async def begin_update( ) -> AsyncLROPoller["_models.Database"]: """Updates a database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -368,10 +368,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -397,7 +397,7 @@ async def get( ) -> "_models.Database": """Gets information about a database in a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -413,16 +413,16 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -463,16 +463,16 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -507,7 +507,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes a single database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -547,10 +547,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -576,7 +576,7 @@ async def list_keys( ) -> "_models.AccessKeys": """Retrieves the access keys for the RedisEnterprise database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -592,16 +592,16 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.list_keys.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -643,17 +643,17 @@ async def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._regenerate_key_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -698,7 +698,7 @@ async def begin_regenerate_key( ) -> AsyncLROPoller["_models.AccessKeys"]: """Regenerates the RedisEnterprise database's access keys. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -744,10 +744,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -777,17 +777,17 @@ async def _import_method_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._import_method_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -827,7 +827,7 @@ async def begin_import_method( ) -> AsyncLROPoller[None]: """Imports a database file to target database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -870,10 +870,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -903,17 +903,17 @@ async def _export_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._export_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -953,7 +953,7 @@ async def begin_export( ) -> AsyncLROPoller[None]: """Exports a database file from target database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -996,10 +996,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations.py index e3f122e02261..eec175a8f556 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_get_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations_status_operations.py similarity index 90% rename from sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_get_operations.py rename to sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations_status_operations.py index f4bfce0d1030..6f8aabce6ded 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_get_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_operations_status_operations.py @@ -18,8 +18,8 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class GetOperations: - """GetOperations async operations. +class OperationsStatusOperations: + """OperationsStatusOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -40,7 +40,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def operation_status( + async def get( self, location: str, operation_id: str, @@ -62,15 +62,15 @@ async def operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL - url = self.operation_status.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,4 +97,4 @@ async def operation_status( return cls(pipeline_response, deserialized, {}) return deserialized - operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus/{operationId}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus/{operationId}'} # type: ignore diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_endpoint_connections_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_endpoint_connections_operations.py index 2d48b182996c..b1209ecda542 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_endpoint_connections_operations.py @@ -51,7 +51,7 @@ def list( ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Lists all the private endpoint connections associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -77,9 +77,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -127,7 +127,7 @@ async def get( ) -> "_models.PrivateEndpointConnection": """Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -144,16 +144,16 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -195,16 +195,16 @@ async def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._put_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -249,7 +249,7 @@ async def begin_put( """Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -296,9 +296,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -325,7 +325,7 @@ async def delete( ) -> None: """Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -342,15 +342,15 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_link_resources_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_link_resources_operations.py index 523265d3abdd..9becf9140820 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_link_resources_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_private_link_resources_operations.py @@ -41,7 +41,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - def list_by_redis_enterprise_cache( + def list_by_cluster( self, resource_group_name: str, cluster_name: str, @@ -49,7 +49,7 @@ def list_by_redis_enterprise_cache( ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources that need to be created for a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -63,7 +63,7 @@ def list_by_redis_enterprise_cache( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -73,11 +73,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_redis_enterprise_cache.metadata['url'] # type: ignore + url = self.list_by_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -114,4 +114,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_redis_enterprise_cache.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateLinkResources'} # type: ignore + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateLinkResources'} # type: ignore diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_redis_enterprise_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_redis_enterprise_operations.py index d4c298921f1b..40e57a5cc7c5 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_redis_enterprise_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/aio/operations/_redis_enterprise_operations.py @@ -55,16 +55,16 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -110,7 +110,7 @@ async def begin_create( ) -> AsyncLROPoller["_models.Cluster"]: """Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -153,9 +153,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) @@ -184,16 +184,16 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -237,7 +237,7 @@ async def begin_update( ) -> AsyncLROPoller["_models.Cluster"]: """Updates an existing RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -280,9 +280,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -310,15 +310,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -352,7 +352,7 @@ async def begin_delete( ) -> AsyncLROPoller[None]: """Deletes a RedisEnterprise cache cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -389,9 +389,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -416,7 +416,7 @@ async def get( ) -> "_models.Cluster": """Gets information about a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -430,15 +430,15 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -474,7 +474,7 @@ def list_by_resource_group( ) -> AsyncIterable["_models.ClusterList"]: """Lists all RedisEnterprise clusters in a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) @@ -486,7 +486,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -498,8 +498,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -554,7 +554,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -566,7 +566,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/__init__.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/__init__.py index bfc4725af869..d523be3efffa 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/__init__.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/__init__.py @@ -24,6 +24,7 @@ from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult from ._models_py3 import OperationStatus + from ._models_py3 import Persistence from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionListResult @@ -53,6 +54,7 @@ from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore from ._models import OperationStatus # type: ignore + from ._models import Persistence # type: ignore from ._models import PrivateEndpoint # type: ignore from ._models import PrivateEndpointConnection # type: ignore from ._models import PrivateEndpointConnectionListResult # type: ignore @@ -65,9 +67,10 @@ from ._models import Sku # type: ignore from ._models import TrackedResource # type: ignore -from ._redis_enterprise_enums import ( +from ._redis_enterprise_management_client_enums import ( AccessKeyType, ActionType, + AofFrequency, ClusteringPolicy, EvictionPolicy, Origin, @@ -75,8 +78,10 @@ PrivateEndpointServiceConnectionStatus, Protocol, ProvisioningState, + RdbFrequency, ResourceState, SkuName, + TlsVersion, ) __all__ = [ @@ -97,6 +102,7 @@ 'OperationDisplay', 'OperationListResult', 'OperationStatus', + 'Persistence', 'PrivateEndpoint', 'PrivateEndpointConnection', 'PrivateEndpointConnectionListResult', @@ -110,6 +116,7 @@ 'TrackedResource', 'AccessKeyType', 'ActionType', + 'AofFrequency', 'ClusteringPolicy', 'EvictionPolicy', 'Origin', @@ -117,6 +124,8 @@ 'PrivateEndpointServiceConnectionStatus', 'Protocol', 'ProvisioningState', + 'RdbFrequency', 'ResourceState', 'SkuName', + 'TlsVersion', ] diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models.py index 98481ce9c29a..43947f741b6f 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models.py @@ -143,10 +143,11 @@ class Cluster(TrackedResource): :type location: str :param sku: Required. The SKU to create, which affects price, performance, and features. :type sku: ~azure.mgmt.redisenterprise.models.Sku - :param zones: The zones where this cluster will be deployed. + :param zones: The Availability Zones where this cluster will be deployed. :type zones: list[str] :param minimum_tls_version: The minimum TLS version for the cluster to support, e.g. '1.2'. - :type minimum_tls_version: str + Possible values include: "1.0", "1.1", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.redisenterprise.models.TlsVersion :ivar host_name: DNS name of the cluster endpoint. :vartype host_name: str :ivar provisioning_state: Current provisioning status of the cluster. Possible values include: @@ -247,7 +248,8 @@ class ClusterUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param minimum_tls_version: The minimum TLS version for the cluster to support, e.g. '1.2'. - :type minimum_tls_version: str + Possible values include: "1.0", "1.1", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.redisenterprise.models.TlsVersion :ivar host_name: DNS name of the cluster endpoint. :vartype host_name: str :ivar provisioning_state: Current provisioning status of the cluster. Possible values include: @@ -333,6 +335,8 @@ class Database(Resource): include: "AllKeysLFU", "AllKeysLRU", "AllKeysRandom", "VolatileLRU", "VolatileLFU", "VolatileTTL", "VolatileRandom", "NoEviction". :type eviction_policy: str or ~azure.mgmt.redisenterprise.models.EvictionPolicy + :param persistence: Persistence settings. + :type persistence: ~azure.mgmt.redisenterprise.models.Persistence :param modules: Optional set of redis modules to enable in this database - modules can only be added at creation time. :type modules: list[~azure.mgmt.redisenterprise.models.Module] @@ -356,6 +360,7 @@ class Database(Resource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'clustering_policy': {'key': 'properties.clusteringPolicy', 'type': 'str'}, 'eviction_policy': {'key': 'properties.evictionPolicy', 'type': 'str'}, + 'persistence': {'key': 'properties.persistence', 'type': 'Persistence'}, 'modules': {'key': 'properties.modules', 'type': '[Module]'}, } @@ -370,6 +375,7 @@ def __init__( self.resource_state = None self.clustering_policy = kwargs.get('clustering_policy', None) self.eviction_policy = kwargs.get('eviction_policy', None) + self.persistence = kwargs.get('persistence', None) self.modules = kwargs.get('modules', None) @@ -428,6 +434,8 @@ class DatabaseUpdate(msrest.serialization.Model): include: "AllKeysLFU", "AllKeysLRU", "AllKeysRandom", "VolatileLRU", "VolatileLFU", "VolatileTTL", "VolatileRandom", "NoEviction". :type eviction_policy: str or ~azure.mgmt.redisenterprise.models.EvictionPolicy + :param persistence: Persistence settings. + :type persistence: ~azure.mgmt.redisenterprise.models.Persistence :param modules: Optional set of redis modules to enable in this database - modules can only be added at creation time. :type modules: list[~azure.mgmt.redisenterprise.models.Module] @@ -445,6 +453,7 @@ class DatabaseUpdate(msrest.serialization.Model): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'clustering_policy': {'key': 'properties.clusteringPolicy', 'type': 'str'}, 'eviction_policy': {'key': 'properties.evictionPolicy', 'type': 'str'}, + 'persistence': {'key': 'properties.persistence', 'type': 'Persistence'}, 'modules': {'key': 'properties.modules', 'type': '[Module]'}, } @@ -459,6 +468,7 @@ def __init__( self.resource_state = None self.clustering_policy = kwargs.get('clustering_policy', None) self.eviction_policy = kwargs.get('eviction_policy', None) + self.persistence = kwargs.get('persistence', None) self.modules = kwargs.get('modules', None) @@ -561,7 +571,7 @@ class ExportClusterParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sas_uri: Required. SAS Uri for the target directory to export to. + :param sas_uri: Required. SAS URI for the target directory to export to. :type sas_uri: str """ @@ -586,7 +596,7 @@ class ImportClusterParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sas_uri: Required. SAS Uri for the target blob to import from. + :param sas_uri: Required. SAS URI for the target blob to import from. :type sas_uri: str """ @@ -805,6 +815,39 @@ def __init__( self.error = kwargs.get('error', None) +class Persistence(msrest.serialization.Model): + """Persistence-related configuration for the RedisEnterprise database. + + :param aof_enabled: Sets whether AOF is enabled. + :type aof_enabled: bool + :param rdb_enabled: Sets whether RDB is enabled. + :type rdb_enabled: bool + :param aof_frequency: Sets the frequency at which data is written to disk. Possible values + include: "1s", "always". + :type aof_frequency: str or ~azure.mgmt.redisenterprise.models.AofFrequency + :param rdb_frequency: Sets the frequency at which a snapshot of the database is created. + Possible values include: "1h", "6h", "12h". + :type rdb_frequency: str or ~azure.mgmt.redisenterprise.models.RdbFrequency + """ + + _attribute_map = { + 'aof_enabled': {'key': 'aofEnabled', 'type': 'bool'}, + 'rdb_enabled': {'key': 'rdbEnabled', 'type': 'bool'}, + 'aof_frequency': {'key': 'aofFrequency', 'type': 'str'}, + 'rdb_frequency': {'key': 'rdbFrequency', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Persistence, self).__init__(**kwargs) + self.aof_enabled = kwargs.get('aof_enabled', None) + self.rdb_enabled = kwargs.get('rdb_enabled', None) + self.aof_frequency = kwargs.get('aof_frequency', None) + self.rdb_frequency = kwargs.get('rdb_frequency', None) + + class PrivateEndpoint(msrest.serialization.Model): """The Private Endpoint resource. diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models_py3.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models_py3.py index 1485c83e149b..701f2e49726e 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models_py3.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_models_py3.py @@ -11,7 +11,7 @@ from azure.core.exceptions import HttpResponseError import msrest.serialization -from ._redis_enterprise_enums import * +from ._redis_enterprise_management_client_enums import * class AccessKeys(msrest.serialization.Model): @@ -150,10 +150,11 @@ class Cluster(TrackedResource): :type location: str :param sku: Required. The SKU to create, which affects price, performance, and features. :type sku: ~azure.mgmt.redisenterprise.models.Sku - :param zones: The zones where this cluster will be deployed. + :param zones: The Availability Zones where this cluster will be deployed. :type zones: list[str] :param minimum_tls_version: The minimum TLS version for the cluster to support, e.g. '1.2'. - :type minimum_tls_version: str + Possible values include: "1.0", "1.1", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.redisenterprise.models.TlsVersion :ivar host_name: DNS name of the cluster endpoint. :vartype host_name: str :ivar provisioning_state: Current provisioning status of the cluster. Possible values include: @@ -207,7 +208,7 @@ def __init__( sku: "Sku", tags: Optional[Dict[str, str]] = None, zones: Optional[List[str]] = None, - minimum_tls_version: Optional[str] = None, + minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, **kwargs ): super(Cluster, self).__init__(tags=tags, location=location, **kwargs) @@ -262,7 +263,8 @@ class ClusterUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param minimum_tls_version: The minimum TLS version for the cluster to support, e.g. '1.2'. - :type minimum_tls_version: str + Possible values include: "1.0", "1.1", "1.2". + :type minimum_tls_version: str or ~azure.mgmt.redisenterprise.models.TlsVersion :ivar host_name: DNS name of the cluster endpoint. :vartype host_name: str :ivar provisioning_state: Current provisioning status of the cluster. Possible values include: @@ -304,7 +306,7 @@ def __init__( *, sku: Optional["Sku"] = None, tags: Optional[Dict[str, str]] = None, - minimum_tls_version: Optional[str] = None, + minimum_tls_version: Optional[Union[str, "TlsVersion"]] = None, **kwargs ): super(ClusterUpdate, self).__init__(**kwargs) @@ -352,6 +354,8 @@ class Database(Resource): include: "AllKeysLFU", "AllKeysLRU", "AllKeysRandom", "VolatileLRU", "VolatileLFU", "VolatileTTL", "VolatileRandom", "NoEviction". :type eviction_policy: str or ~azure.mgmt.redisenterprise.models.EvictionPolicy + :param persistence: Persistence settings. + :type persistence: ~azure.mgmt.redisenterprise.models.Persistence :param modules: Optional set of redis modules to enable in this database - modules can only be added at creation time. :type modules: list[~azure.mgmt.redisenterprise.models.Module] @@ -375,6 +379,7 @@ class Database(Resource): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'clustering_policy': {'key': 'properties.clusteringPolicy', 'type': 'str'}, 'eviction_policy': {'key': 'properties.evictionPolicy', 'type': 'str'}, + 'persistence': {'key': 'properties.persistence', 'type': 'Persistence'}, 'modules': {'key': 'properties.modules', 'type': '[Module]'}, } @@ -385,6 +390,7 @@ def __init__( port: Optional[int] = None, clustering_policy: Optional[Union[str, "ClusteringPolicy"]] = None, eviction_policy: Optional[Union[str, "EvictionPolicy"]] = None, + persistence: Optional["Persistence"] = None, modules: Optional[List["Module"]] = None, **kwargs ): @@ -395,6 +401,7 @@ def __init__( self.resource_state = None self.clustering_policy = clustering_policy self.eviction_policy = eviction_policy + self.persistence = persistence self.modules = modules @@ -455,6 +462,8 @@ class DatabaseUpdate(msrest.serialization.Model): include: "AllKeysLFU", "AllKeysLRU", "AllKeysRandom", "VolatileLRU", "VolatileLFU", "VolatileTTL", "VolatileRandom", "NoEviction". :type eviction_policy: str or ~azure.mgmt.redisenterprise.models.EvictionPolicy + :param persistence: Persistence settings. + :type persistence: ~azure.mgmt.redisenterprise.models.Persistence :param modules: Optional set of redis modules to enable in this database - modules can only be added at creation time. :type modules: list[~azure.mgmt.redisenterprise.models.Module] @@ -472,6 +481,7 @@ class DatabaseUpdate(msrest.serialization.Model): 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, 'clustering_policy': {'key': 'properties.clusteringPolicy', 'type': 'str'}, 'eviction_policy': {'key': 'properties.evictionPolicy', 'type': 'str'}, + 'persistence': {'key': 'properties.persistence', 'type': 'Persistence'}, 'modules': {'key': 'properties.modules', 'type': '[Module]'}, } @@ -482,6 +492,7 @@ def __init__( port: Optional[int] = None, clustering_policy: Optional[Union[str, "ClusteringPolicy"]] = None, eviction_policy: Optional[Union[str, "EvictionPolicy"]] = None, + persistence: Optional["Persistence"] = None, modules: Optional[List["Module"]] = None, **kwargs ): @@ -492,6 +503,7 @@ def __init__( self.resource_state = None self.clustering_policy = clustering_policy self.eviction_policy = eviction_policy + self.persistence = persistence self.modules = modules @@ -596,7 +608,7 @@ class ExportClusterParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sas_uri: Required. SAS Uri for the target directory to export to. + :param sas_uri: Required. SAS URI for the target directory to export to. :type sas_uri: str """ @@ -623,7 +635,7 @@ class ImportClusterParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sas_uri: Required. SAS Uri for the target blob to import from. + :param sas_uri: Required. SAS URI for the target blob to import from. :type sas_uri: str """ @@ -856,6 +868,44 @@ def __init__( self.error = error +class Persistence(msrest.serialization.Model): + """Persistence-related configuration for the RedisEnterprise database. + + :param aof_enabled: Sets whether AOF is enabled. + :type aof_enabled: bool + :param rdb_enabled: Sets whether RDB is enabled. + :type rdb_enabled: bool + :param aof_frequency: Sets the frequency at which data is written to disk. Possible values + include: "1s", "always". + :type aof_frequency: str or ~azure.mgmt.redisenterprise.models.AofFrequency + :param rdb_frequency: Sets the frequency at which a snapshot of the database is created. + Possible values include: "1h", "6h", "12h". + :type rdb_frequency: str or ~azure.mgmt.redisenterprise.models.RdbFrequency + """ + + _attribute_map = { + 'aof_enabled': {'key': 'aofEnabled', 'type': 'bool'}, + 'rdb_enabled': {'key': 'rdbEnabled', 'type': 'bool'}, + 'aof_frequency': {'key': 'aofFrequency', 'type': 'str'}, + 'rdb_frequency': {'key': 'rdbFrequency', 'type': 'str'}, + } + + def __init__( + self, + *, + aof_enabled: Optional[bool] = None, + rdb_enabled: Optional[bool] = None, + aof_frequency: Optional[Union[str, "AofFrequency"]] = None, + rdb_frequency: Optional[Union[str, "RdbFrequency"]] = None, + **kwargs + ): + super(Persistence, self).__init__(**kwargs) + self.aof_enabled = aof_enabled + self.rdb_enabled = rdb_enabled + self.aof_frequency = aof_frequency + self.rdb_frequency = rdb_frequency + + class PrivateEndpoint(msrest.serialization.Model): """The Private Endpoint resource. diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_enums.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_management_client_enums.py similarity index 88% rename from sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_enums.py rename to sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_management_client_enums.py index 184ea2fe8490..c19fa2c79c20 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_enums.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/models/_redis_enterprise_management_client_enums.py @@ -39,6 +39,13 @@ class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INTERNAL = "Internal" +class AofFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Sets the frequency at which data is written to disk. + """ + + ONE_S = "1s" + ALWAYS = "always" + class ClusteringPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Clustering policy - default is OSSCluster. Specified at create time. """ @@ -104,6 +111,14 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UPDATING = "Updating" DELETING = "Deleting" +class RdbFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Sets the frequency at which a snapshot of the database is created. + """ + + ONE_H = "1h" + SIX_H = "6h" + TWELVE_H = "12h" + class ResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Current resource status """ @@ -133,3 +148,11 @@ class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENTERPRISE_FLASH_F300 = "EnterpriseFlash_F300" ENTERPRISE_FLASH_F700 = "EnterpriseFlash_F700" ENTERPRISE_FLASH_F1500 = "EnterpriseFlash_F1500" + +class TlsVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The minimum TLS version for the cluster to support, e.g. '1.2' + """ + + ONE0 = "1.0" + ONE1 = "1.1" + ONE2 = "1.2" diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/__init__.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/__init__.py index 6359ab0b248b..1847039b4da0 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/__init__.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/__init__.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from ._operations import Operations -from ._get_operations import GetOperations +from ._operations_status_operations import OperationsStatusOperations from ._redis_enterprise_operations import RedisEnterpriseOperations from ._databases_operations import DatabasesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations @@ -15,7 +15,7 @@ __all__ = [ 'Operations', - 'GetOperations', + 'OperationsStatusOperations', 'RedisEnterpriseOperations', 'DatabasesOperations', 'PrivateEndpointConnectionsOperations', diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_databases_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_databases_operations.py index b37429aa24a2..bf33f651bc39 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_databases_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_databases_operations.py @@ -56,7 +56,7 @@ def list_by_cluster( # type: (...) -> Iterable["_models.DatabaseList"] """Gets all databases in the specified RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -70,7 +70,7 @@ def list_by_cluster( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -82,8 +82,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -137,17 +137,17 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -195,7 +195,7 @@ def begin_create( # type: (...) -> LROPoller["_models.Database"] """Creates a database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -241,10 +241,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) @@ -275,17 +275,17 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -331,7 +331,7 @@ def begin_update( # type: (...) -> LROPoller["_models.Database"] """Updates a database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -377,10 +377,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -407,7 +407,7 @@ def get( # type: (...) -> "_models.Database" """Gets information about a database in a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -423,16 +423,16 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -474,16 +474,16 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -519,7 +519,7 @@ def begin_delete( # type: (...) -> LROPoller[None] """Deletes a single database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -559,10 +559,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -589,7 +589,7 @@ def list_keys( # type: (...) -> "_models.AccessKeys" """Retrieves the access keys for the RedisEnterprise database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -605,16 +605,16 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.list_keys.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -657,17 +657,17 @@ def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._regenerate_key_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -713,7 +713,7 @@ def begin_regenerate_key( # type: (...) -> LROPoller["_models.AccessKeys"] """Regenerates the RedisEnterprise database's access keys. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -759,10 +759,10 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -793,17 +793,17 @@ def _import_method_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._import_method_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -844,7 +844,7 @@ def begin_import_method( # type: (...) -> LROPoller[None] """Imports a database file to target database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -887,10 +887,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -921,17 +921,17 @@ def _export_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._export_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -972,7 +972,7 @@ def begin_export( # type: (...) -> LROPoller[None] """Exports a database file from target database. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -1015,10 +1015,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'databaseName': self._serialize.url("database_name", database_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations.py index 163e915938b9..197836d9632c 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_get_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations_status_operations.py similarity index 90% rename from sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_get_operations.py rename to sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations_status_operations.py index 092052cee73e..882c769f4466 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_get_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_operations_status_operations.py @@ -22,8 +22,8 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class GetOperations(object): - """GetOperations operations. +class OperationsStatusOperations(object): + """OperationsStatusOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def operation_status( + def get( self, location, # type: str operation_id, # type: str @@ -67,15 +67,15 @@ def operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL - url = self.operation_status.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), 'operationId': self._serialize.url("operation_id", operation_id, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,4 +102,4 @@ def operation_status( return cls(pipeline_response, deserialized, {}) return deserialized - operation_status.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus/{operationId}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Cache/locations/{location}/operationsStatus/{operationId}'} # type: ignore diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_endpoint_connections_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_endpoint_connections_operations.py index c8848dd491f3..affa5bafbe47 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_endpoint_connections_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_endpoint_connections_operations.py @@ -56,7 +56,7 @@ def list( # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] """Lists all the private endpoint connections associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -82,9 +82,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -133,7 +133,7 @@ def get( # type: (...) -> "_models.PrivateEndpointConnection" """Gets the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -150,16 +150,16 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -202,16 +202,16 @@ def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._put_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -257,7 +257,7 @@ def begin_put( """Updates the state of the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -304,9 +304,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } @@ -334,7 +334,7 @@ def delete( # type: (...) -> None """Deletes the specified private endpoint connection associated with the RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -351,15 +351,15 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_link_resources_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_link_resources_operations.py index 2588de081fd4..05da2115fb95 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_link_resources_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list_by_redis_enterprise_cache( + def list_by_cluster( self, resource_group_name, # type: str cluster_name, # type: str @@ -54,7 +54,7 @@ def list_by_redis_enterprise_cache( # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] """Gets the private link resources that need to be created for a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -68,7 +68,7 @@ def list_by_redis_enterprise_cache( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -78,11 +78,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_redis_enterprise_cache.metadata['url'] # type: ignore + url = self.list_by_cluster.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -119,4 +119,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_redis_enterprise_cache.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateLinkResources'} # type: ignore + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/redisEnterprise/{clusterName}/privateLinkResources'} # type: ignore diff --git a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_redis_enterprise_operations.py b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_redis_enterprise_operations.py index f7a93a663ae2..94337771762b 100644 --- a/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_redis_enterprise_operations.py +++ b/sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/operations/_redis_enterprise_operations.py @@ -60,16 +60,16 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -116,7 +116,7 @@ def begin_create( # type: (...) -> LROPoller["_models.Cluster"] """Creates or updates an existing (overwrite/recreate, with potential downtime) cache cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -159,9 +159,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) @@ -191,16 +191,16 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -245,7 +245,7 @@ def begin_update( # type: (...) -> LROPoller["_models.Cluster"] """Updates an existing RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -288,9 +288,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -319,15 +319,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -362,7 +362,7 @@ def begin_delete( # type: (...) -> LROPoller[None] """Deletes a RedisEnterprise cache cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -399,9 +399,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -427,7 +427,7 @@ def get( # type: (...) -> "_models.Cluster" """Gets information about a RedisEnterprise cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: The name of the RedisEnterprise cluster. :type cluster_name: str @@ -441,15 +441,15 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -486,7 +486,7 @@ def list_by_resource_group( # type: (...) -> Iterable["_models.ClusterList"] """Lists all RedisEnterprise clusters in a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ClusterList or the result of cls(response) @@ -498,7 +498,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -510,8 +510,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -567,7 +567,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-01-preview" + api_version = "2021-03-01" accept = "application/json" def prepare_request(next_link=None): @@ -579,7 +579,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters