Skip to content

Commit 16de815

Browse files
[AutoRelease] t2-redisenterprise-2025-04-23-71837(can only be merged by SDK owner) (#40670)
* code and test * Update CHANGELOG.md --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 8b9851a commit 16de815

File tree

57 files changed

+379
-406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+379
-406
lines changed

sdk/redisenterprise/azure-mgmt-redisenterprise/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 3.1.0b4 (2025-04-23)
4+
5+
### Breaking Changes
6+
7+
- Model `SkuDetails` renamed its instance variable `customer_facing_size_in_gb` to `size_in_gb`
8+
39
## 3.1.0b3 (2025-04-20)
410

511
### Features Added

sdk/redisenterprise/azure-mgmt-redisenterprise/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Microsoft Azure SDK for Python
22

33
This is the Microsoft Azure Redis Enterprise Management Client Library.
4-
This package has been tested with Python 3.8+.
4+
This package has been tested with Python 3.9+.
55
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
66

77
## _Disclaimer_
@@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
1212

1313
### Prerequisites
1414

15-
- Python 3.8+ is required to use this package.
15+
- Python 3.9+ is required to use this package.
1616
- [Azure subscription](https://azure.microsoft.com/free/)
1717

1818
### Install the package
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "cb262725d128f6dfec4622cca03bc9e04e2d0f1f",
2+
"commit": "8ab23bfef36dbedfe554f215d0771a4ef7d56d11",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.27.4",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/redisenterprise/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/redisenterprise/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.33.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/redisenterprise/resource-manager/readme.md"
1111
}

sdk/redisenterprise/azure-mgmt-redisenterprise/azure/mgmt/redisenterprise/_redis_enterprise_management_client.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
# --------------------------------------------------------------------------
88

99
from copy import deepcopy
10-
from typing import Any, TYPE_CHECKING
10+
from typing import Any, Optional, TYPE_CHECKING, cast
1111
from typing_extensions import Self
1212

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import RedisEnterpriseManagementClientConfiguration
@@ -56,7 +58,7 @@ class RedisEnterpriseManagementClient: # pylint: disable=too-many-instance-attr
5658
:type credential: ~azure.core.credentials.TokenCredential
5759
:param subscription_id: The ID of the target subscription. Required.
5860
:type subscription_id: str
59-
:param base_url: Service URL. Default value is "https://management.azure.com".
61+
:param base_url: Service URL. Default value is None.
6062
:type base_url: str
6163
:keyword api_version: Api Version. Default value is "2025-05-01-preview". Note that overriding
6264
this default value may result in unsupported behavior.
@@ -66,15 +68,17 @@ class RedisEnterpriseManagementClient: # pylint: disable=too-many-instance-attr
6668
"""
6769

6870
def __init__(
69-
self,
70-
credential: "TokenCredential",
71-
subscription_id: str,
72-
base_url: str = "https://management.azure.com",
73-
**kwargs: Any
71+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
7472
) -> None:
73+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
74+
_endpoints = get_arm_endpoints(_cloud)
75+
if not base_url:
76+
base_url = _endpoints["resource_manager"]
77+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
7578
self._config = RedisEnterpriseManagementClientConfiguration(
76-
credential=credential, subscription_id=subscription_id, **kwargs
79+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
7780
)
81+
7882
_policies = kwargs.pop("policies", None)
7983
if _policies is None:
8084
_policies = [
@@ -93,7 +97,7 @@ def __init__(
9397
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
9498
self._config.http_logging_policy,
9599
]
96-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
100+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
97101

98102
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
99103
self._serialize = Serializer(client_models)

0 commit comments

Comments
 (0)