Skip to content

Commit 41b7f17

Browse files
[AutoRelease] t2-resource-2025-05-20-85922(can only be merged by SDK owner) (#41211)
* code and test * recover init --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <v-chenjiang@microsoft.com>
1 parent e09ac31 commit 41b7f17

File tree

922 files changed

+158817
-11786
lines changed

Some content is hidden

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

922 files changed

+158817
-11786
lines changed

sdk/resources/azure-mgmt-resource/CHANGELOG.md

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

3+
## 23.4.0 (2025-05-19)
4+
5+
### Features Added
6+
7+
- Model DeploymentProperties has a new parameter extension_configs
8+
- Model DeploymentPropertiesExtended has a new parameter extensions
9+
- Model DeploymentWhatIfProperties has a new parameter extension_configs
10+
- Model ResourceReference has a new parameter api_version
11+
- Model ResourceReference has a new parameter extension
12+
- Model ResourceReference has a new parameter identifiers
13+
- Model ResourceReference has a new parameter resource_type
14+
- Model TargetResource has a new parameter api_version
15+
- Model TargetResource has a new parameter extension
16+
- Model TargetResource has a new parameter identifiers
17+
- Model TargetResource has a new parameter symbolic_name
18+
319
## 23.3.0 (2025-02-24)
420

521
### Features Added

sdk/resources/azure-mgmt-resource/MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include _meta.json
21
recursive-include tests *.py *.json
32
recursive-include samples *.py *.md
43
include *.md

sdk/resources/azure-mgmt-resource/README.md

Lines changed: 3 additions & 3 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 Resource 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
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.

sdk/resources/azure-mgmt-resource/_meta.json

Lines changed: 0 additions & 67 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"commit": "03a6598cdc38924f9eaaeb03f8ef151f5aeff449",
3+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4+
"autorest": "3.10.2",
5+
"use": [
6+
"@autorest/python@6.35.0",
7+
"@autorest/modelerfour@4.27.0"
8+
],
9+
"autorest_command": "autorest specification/resources/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.35.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10+
"readme": "specification/resources/resource-manager/readme.md"
11+
}

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# license information.
66
# --------------------------------------------------------------------------
77

8-
VERSION = "23.3.0"
8+
VERSION = "23.4.0"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_changes_client.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
# regenerated.
1010
# --------------------------------------------------------------------------
1111

12-
from typing import Any, Optional, TYPE_CHECKING
12+
from typing import Any, Optional, TYPE_CHECKING, cast
1313
from typing_extensions import Self
1414

1515
from azure.core.pipeline import policies
16+
from azure.core.settings import settings
1617
from azure.mgmt.core import ARMPipelineClient
1718
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
19+
from azure.mgmt.core.tools import get_arm_endpoints
1820
from azure.profiles import KnownProfiles, ProfileDefinition
1921
from azure.profiles.multiapiclient import MultiApiClientMixin
2022

@@ -27,7 +29,7 @@
2729

2830
class _SDKClient(object):
2931
def __init__(self, *args, **kwargs):
30-
"""This is a fake class to support current implemetation of MultiApiClientMixin."
32+
"""This is a fake class to support current implementation of MultiApiClientMixin."
3133
Will be removed in final version of multiapi azure-core based client
3234
"""
3335
pass
@@ -69,13 +71,18 @@ def __init__(
6971
credential: "TokenCredential",
7072
subscription_id: str,
7173
api_version: Optional[str]=None,
72-
base_url: str = "https://management.azure.com",
74+
base_url: Optional[str] = None,
7375
profile: KnownProfiles=KnownProfiles.default,
7476
**kwargs: Any
7577
):
7678
if api_version:
7779
kwargs.setdefault('api_version', api_version)
78-
self._config = ChangesClientConfiguration(credential, subscription_id, **kwargs)
80+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
81+
_endpoints = get_arm_endpoints(_cloud)
82+
if not base_url:
83+
base_url = _endpoints["resource_manager"]
84+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
85+
self._config = ChangesClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs)
7986
_policies = kwargs.pop("policies", None)
8087
if _policies is None:
8188
_policies = [
@@ -94,7 +101,7 @@ def __init__(
94101
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
95102
self._config.http_logging_policy,
96103
]
97-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
104+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
98105
super(ChangesClient, self).__init__(
99106
api_version=api_version,
100107
profile=profile

0 commit comments

Comments
 (0)