Skip to content

Commit e2c64f8

Browse files
azure-sdkmsyyc
andauthored
[AutoRelease] Update code (can only be merged by SDK owner) (#42066)
* code and test * update version and changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
1 parent 8481625 commit e2c64f8

Some content is hidden

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

53 files changed

+485
-2932
lines changed

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

Lines changed: 3 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,11 @@
11
# Release History
22

3-
## 25.0.0 (2025-06-20)
4-
5-
### Features Added
6-
7-
- Client `ApplicationClient` added operation group `applications`
8-
- Client `ApplicationClient` added operation group `application_definitions`
9-
- Client `ApplicationClient` added operation group `jit_requests`
10-
- Client `FeatureClient` added operation group `features`
11-
- Client `FeatureClient` added operation group `subscription_feature_registrations`
12-
- Client `SubscriptionClient` added operation group `operations`
13-
- Client `SubscriptionClient` added operation group `subscriptions`
14-
- Client `SubscriptionClient` added operation group `tenants`
15-
- Client `PolicyClient` added operation group `data_policy_manifests`
16-
- Client `PolicyClient` added operation group `policy_exemptions`
17-
- Client `PolicyClient` added operation group `variables`
18-
- Client `PolicyClient` added operation group `variable_values`
19-
- Added model `Alias`
20-
- Added model `AliasPath`
21-
- Added enum `AliasPathAttributes`
22-
- Added model `AliasPathMetadata`
23-
- Added enum `AliasPathTokenType`
24-
- Added model `AliasPattern`
25-
- Added enum `AliasPatternType`
26-
- Added enum `AliasType`
27-
- Added enum `AssignmentScopeValidation`
28-
- Added model `DataEffect`
29-
- Added model `DataManifestCustomResourceFunctionDefinition`
30-
- Added model `DataPolicyManifest`
31-
- Added model `DataPolicyManifestListResult`
32-
- Added enum `ExemptionCategory`
33-
- Added model `PolicyExemption`
34-
- Added model `PolicyExemptionListResult`
35-
- Added model `PolicyExemptionUpdate`
36-
- Added model `PolicyVariableColumn`
37-
- Added model `PolicyVariableValueColumnValue`
38-
- Added model `ResourceTypeAliases`
39-
- Added model `Variable`
40-
- Added model `VariableListResult`
41-
- Added model `VariableValue`
42-
- Added model `VariableValueListResult`
43-
- Added model `DataPolicyManifestsOperations`
44-
- Added model `PolicyExemptionsOperations`
45-
- Added model `VariableValuesOperations`
46-
- Added model `VariablesOperations`
3+
## 25.0.0b1 (2025-07-16)
474

485
### Breaking Changes
496

50-
- Client `ApplicationClient` deleted or renamed instance variable `api_version`
51-
- Method `ApplicationClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
52-
- Method `ApplicationClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
53-
- Deleted or renamed client method `ApplicationClient.models`
54-
- Client `FeatureClient` deleted or renamed instance variable `api_version`
55-
- Method `FeatureClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
56-
- Method `FeatureClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
57-
- Deleted or renamed client method `FeatureClient.models`
58-
- Method `ManagementLinkClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
59-
- Method `ManagementLinkClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
60-
- Deleted or renamed client method `ManagementLinkClient.models`
61-
- Method `ManagementLockClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
62-
- Method `ManagementLockClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
63-
- Deleted or renamed client method `ManagementLockClient.models`
64-
- Method `PolicyClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
65-
- Method `PolicyClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
66-
- Deleted or renamed client method `PolicyClient.models`
67-
- Method `ResourceManagementClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
68-
- Method `ResourceManagementClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
69-
- Deleted or renamed client method `ResourceManagementClient.models`
70-
- Client `SubscriptionClient` deleted or renamed instance variable `api_version`
71-
- Method `SubscriptionClient.__init__` deleted or renamed its parameter `api_version` of kind `positional_or_keyword`
72-
- Method `SubscriptionClient.__init__` deleted or renamed its parameter `profile` of kind `positional_or_keyword`
73-
- Deleted or renamed client method `SubscriptionClient.models`
74-
- Deleted or renamed client operation group `ResourceManagementClient.deployments`
75-
- Deleted or renamed client operation group `ResourceManagementClient.deployment_operations`
76-
- Deleted or renamed model `BasicDependency`
77-
- Deleted or renamed model `ChangeType`
78-
- Deleted or renamed model `DebugSetting`
79-
- Deleted or renamed model `Dependency`
80-
- Deleted or renamed model `Deployment`
81-
- Deleted or renamed model `DeploymentDiagnosticsDefinition`
82-
- Deleted or renamed model `DeploymentExportResult`
83-
- Deleted or renamed model `DeploymentExtended`
84-
- Deleted or renamed model `DeploymentExtendedFilter`
85-
- Deleted or renamed model `DeploymentExtensionConfigItem`
86-
- Deleted or renamed model `DeploymentExtensionDefinition`
87-
- Deleted or renamed model `DeploymentExternalInput`
88-
- Deleted or renamed model `DeploymentExternalInputDefinition`
89-
- Deleted or renamed model `DeploymentIdentity`
90-
- Deleted or renamed model `DeploymentIdentityType`
91-
- Deleted or renamed model `DeploymentMode`
92-
- Deleted or renamed model `DeploymentOperation`
93-
- Deleted or renamed model `DeploymentOperationProperties`
94-
- Deleted or renamed model `DeploymentParameter`
95-
- Deleted or renamed model `DeploymentProperties`
96-
- Deleted or renamed model `DeploymentPropertiesExtended`
97-
- Deleted or renamed model `DeploymentValidateResult`
98-
- Deleted or renamed model `DeploymentWhatIf`
99-
- Deleted or renamed model `DeploymentWhatIfProperties`
100-
- Deleted or renamed model `DeploymentWhatIfSettings`
101-
- Deleted or renamed model `ExpressionEvaluationOptions`
102-
- Deleted or renamed model `ExpressionEvaluationOptionsScopeType`
103-
- Deleted or renamed model `ExtensionConfigPropertyType`
104-
- Deleted or renamed model `HttpMessage`
105-
- Deleted or renamed model `KeyVaultParameterReference`
106-
- Deleted or renamed model `KeyVaultReference`
107-
- Deleted or renamed model `Level`
108-
- Deleted or renamed model `OnErrorDeployment`
109-
- Deleted or renamed model `OnErrorDeploymentExtended`
110-
- Deleted or renamed model `OnErrorDeploymentType`
111-
- Deleted or renamed model `ParametersLink`
112-
- Deleted or renamed model `PropertyChangeType`
113-
- Deleted or renamed model `ProvisioningOperation`
114-
- Deleted or renamed model `ProvisioningState`
115-
- Deleted or renamed model `ResourceReference`
116-
- Deleted or renamed model `ScopedDeployment`
117-
- Deleted or renamed model `ScopedDeploymentWhatIf`
118-
- Deleted or renamed model `StatusMessage`
119-
- Deleted or renamed model `TargetResource`
120-
- Deleted or renamed model `TemplateHashResult`
121-
- Deleted or renamed model `TemplateLink`
122-
- Deleted or renamed model `UserAssignedIdentity`
123-
- Deleted or renamed model `ValidationLevel`
124-
- Deleted or renamed model `WhatIfChange`
125-
- Deleted or renamed model `WhatIfOperationResult`
126-
- Deleted or renamed model `WhatIfPropertyChange`
127-
- Deleted or renamed model `WhatIfResultFormat`
128-
- Deleted or renamed model `DeploymentOperationsOperations`
129-
- Deleted or renamed model `DeploymentsOperations`
7+
- This package now only targets the latest Api-Version available on Azure and removes APIs of other Api-Version. After this change, the package can have much smaller size. If your application requires a specific and non-latest Api-Version, it's recommended to pin this package to the previous released version; If your application always only use latest Api-Version, please ignore this change.
8+
- Operation Group `Deployments` and `DeploymentOperations` of `ResourceManagementClient` are moved to `DeploymentsMgmtClient` of independent package `azure-mgmt-resource-deployments`. If you called `ResourceManagementClient(...).deployments.xx(...)` before, just need change to `DeploymentsMgmtClient(...).deployments.xx(...)`. And same for `DeploymentOperations`.
1309

13110
## 24.0.0 (2025-06-16)
13211

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"commit": "f20334f6cfbd2c0fa1c9a0df94da2f2f939fd06a",
2+
"commit": "97f789aeb52adfc1e20c386005839f5276874d7d",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [

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 = "25.0.0"
8+
VERSION = "25.0.0b1"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/changes/_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 = "25.0.0"
8+
VERSION = "25.0.0b1"

sdk/resources/azure-mgmt-resource/azure/mgmt/resource/databoundaries/__init__.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,28 @@
55
# Code generated by Microsoft (R) AutoRest Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
8+
# pylint: disable=wrong-import-position
89

9-
from ._data_boundary_mgmt_client import DataBoundaryMgmtClient
10-
__all__ = ['DataBoundaryMgmtClient']
10+
from typing import TYPE_CHECKING
1111

12-
try:
13-
from ._patch import patch_sdk # type: ignore
14-
patch_sdk()
15-
except ImportError:
16-
pass
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
1714

15+
from ._data_boundary import DataBoundary # type: ignore
1816
from ._version import VERSION
1917

2018
__version__ = VERSION
19+
20+
try:
21+
from ._patch import __all__ as _patch_all
22+
from ._patch import *
23+
except ImportError:
24+
_patch_all = []
25+
from ._patch import patch_sdk as _patch_sdk
26+
27+
__all__ = [
28+
"DataBoundary",
29+
]
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
31+
32+
_patch_sdk()
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# coding=utf-8
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
4-
# Licensed under the MIT License. See License.txt in the project root for
5-
# license information.
6-
#
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
75
# Code generated by Microsoft (R) AutoRest Code Generator.
8-
# Changes may cause incorrect behavior and will be lost if the code is
9-
# regenerated.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
107
# --------------------------------------------------------------------------
8+
119
from typing import Any, TYPE_CHECKING
1210

1311
from azure.core.pipeline import policies
@@ -16,45 +14,46 @@
1614
from ._version import VERSION
1715

1816
if TYPE_CHECKING:
19-
# pylint: disable=unused-import,ungrouped-imports
2017
from azure.core.credentials import TokenCredential
2118

22-
class DataBoundaryMgmtClientConfiguration:
23-
"""Configuration for DataBoundaryMgmtClient.
19+
20+
class DataBoundaryConfiguration: # pylint: disable=too-many-instance-attributes
21+
"""Configuration for DataBoundary.
2422
2523
Note that all parameters used to create this instance are saved as instance
2624
attributes.
2725
2826
:param credential: Credential needed for the client to connect to Azure. Required.
2927
:type credential: ~azure.core.credentials.TokenCredential
28+
:keyword api_version: Api Version. Default value is "2024-08-01". Note that overriding this
29+
default value may result in unsupported behavior.
30+
:paramtype api_version: str
3031
"""
3132

32-
def __init__(
33-
self,
34-
credential: "TokenCredential",
35-
**kwargs: Any
36-
):
33+
def __init__(self, credential: "TokenCredential", **kwargs: Any) -> None:
34+
api_version: str = kwargs.pop("api_version", "2024-08-01")
35+
3736
if credential is None:
3837
raise ValueError("Parameter 'credential' must not be None.")
3938

4039
self.credential = credential
41-
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
42-
kwargs.setdefault('sdk_moniker', 'azure-mgmt-resource/{}'.format(VERSION))
40+
self.api_version = api_version
41+
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
42+
kwargs.setdefault("sdk_moniker", "mgmt-resource/{}".format(VERSION))
4343
self.polling_interval = kwargs.get("polling_interval", 30)
4444
self._configure(**kwargs)
4545

46-
def _configure(
47-
self,
48-
**kwargs: Any
49-
):
50-
self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs)
51-
self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs)
52-
self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs)
53-
self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs)
54-
self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs)
55-
self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs)
56-
self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs)
57-
self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs)
58-
self.authentication_policy = kwargs.get('authentication_policy')
46+
def _configure(self, **kwargs: Any) -> None:
47+
self.user_agent_policy = kwargs.get("user_agent_policy") or policies.UserAgentPolicy(**kwargs)
48+
self.headers_policy = kwargs.get("headers_policy") or policies.HeadersPolicy(**kwargs)
49+
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
50+
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
51+
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
52+
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
53+
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
54+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
55+
self.authentication_policy = kwargs.get("authentication_policy")
5956
if self.credential and not self.authentication_policy:
60-
self.authentication_policy = ARMChallengeAuthenticationPolicy(self.credential, *self.credential_scopes, **kwargs)
57+
self.authentication_policy = ARMChallengeAuthenticationPolicy(
58+
self.credential, *self.credential_scopes, **kwargs
59+
)
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
from azure.mgmt.core.tools import get_arm_endpoints
1919

2020
from . import models as _models
21-
from ._configuration import DataBoundaryMgmtClientConfiguration
21+
from ._configuration import DataBoundaryConfiguration
2222
from ._utils.serialization import Deserializer, Serializer
2323
from .operations import DataBoundariesOperations
2424

2525
if TYPE_CHECKING:
2626
from azure.core.credentials import TokenCredential
2727

2828

29-
class DataBoundaryMgmtClient:
29+
class DataBoundary:
3030
"""Provides APIs for data boundary operations.
3131
3232
:ivar data_boundaries: DataBoundariesOperations operations
3333
:vartype data_boundaries:
34-
azure.mgmt.resource.databoundaries.v2024_08_01.operations.DataBoundariesOperations
34+
azure.mgmt.resource.databoundaries.operations.DataBoundariesOperations
3535
:param credential: Credential needed for the client to connect to Azure. Required.
3636
:type credential: ~azure.core.credentials.TokenCredential
3737
:param base_url: Service URL. Default value is None.
@@ -47,9 +47,7 @@ def __init__(self, credential: "TokenCredential", base_url: Optional[str] = None
4747
if not base_url:
4848
base_url = _endpoints["resource_manager"]
4949
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
50-
self._config = DataBoundaryMgmtClientConfiguration(
51-
credential=credential, credential_scopes=credential_scopes, **kwargs
52-
)
50+
self._config = DataBoundaryConfiguration(credential=credential, credential_scopes=credential_scopes, **kwargs)
5351

5452
_policies = kwargs.pop("policies", None)
5553
if _policies is None:
@@ -75,9 +73,7 @@ def __init__(self, credential: "TokenCredential", base_url: Optional[str] = None
7573
self._serialize = Serializer(client_models)
7674
self._deserialize = Deserializer(client_models)
7775
self._serialize.client_side_validation = False
78-
self.data_boundaries = DataBoundariesOperations(
79-
self._client, self._config, self._serialize, self._deserialize, "2024-08-01"
80-
)
76+
self.data_boundaries = DataBoundariesOperations(self._client, self._config, self._serialize, self._deserialize)
8177

8278
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
8379
"""Runs the network request through the client's chained policies.

0 commit comments

Comments
 (0)