Skip to content

Commit 8948737

Browse files
[AutoRelease] t2-web-2025-11-14-81125(can only be merged by SDK owner) (Azure#44029)
* code and test * update changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent eeb7559 commit 8948737

File tree

449 files changed

+12442
-10696
lines changed

Some content is hidden

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

449 files changed

+12442
-10696
lines changed

sdk/appservice/azure-mgmt-web/CHANGELOG.md

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

3+
## 10.1.0 (2025-11-17)
4+
5+
### Features Added
6+
7+
- Added operation AppServicePlansOperations.get_server_farm_instance_details
8+
- Added operation AppServicePlansOperations.get_server_farm_rdp_password
9+
- Added operation AppServicePlansOperations.recycle_managed_instance_worker
10+
- Model AppServicePlan has a new parameter identity
11+
- Model AppServicePlan has a new parameter install_scripts
12+
- Model AppServicePlan has a new parameter is_custom_mode
13+
- Model AppServicePlan has a new parameter network
14+
- Model AppServicePlan has a new parameter plan_default_identity
15+
- Model AppServicePlan has a new parameter rdp_enabled
16+
- Model AppServicePlan has a new parameter registry_adapters
17+
- Model AppServicePlan has a new parameter storage_mounts
18+
- Model AppServicePlanPatchResource has a new parameter identity
19+
- Model SitePatchResource has a new parameter public_network_access
20+
321
## 10.0.0 (2025-08-21)
422

523
### Breaking Changes
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
recursive-include tests *.py *.json
2-
recursive-include samples *.py *.md
31
include *.md
4-
include azure/__init__.py
5-
include azure/mgmt/__init__.py
62
include LICENSE
73
include azure/mgmt/web/py.typed
4+
recursive-include tests *.py
5+
recursive-include samples *.py *.md
6+
include azure/__init__.py
7+
include azure/mgmt/__init__.py
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "b64fe48e383ae6d6841fad0538f05dc82130ebb0",
2+
"commit": "b50fa8e117938fd72cbb3e66bb49324661dd1dcc",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.38.2",
6+
"@autorest/python@6.42.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/web/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --keep-setup-py=True --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2024-11 --use=@autorest/python@6.38.2 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/web/resource-manager/readme.md"
9+
"autorest_command": "autorest specification/web/resource-manager/Microsoft.Web/AppService/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2025-03-python --use=@autorest/python@6.42.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
10+
"readme": "specification/web/resource-manager/Microsoft.Web/AppService/readme.md"
1111
}

sdk/appservice/azure-mgmt-web/apiview-properties.json

Lines changed: 120 additions & 101 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
1+
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_configuration.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
from typing import Any, TYPE_CHECKING
9+
from typing import Any, Optional, TYPE_CHECKING
1010

1111
from azure.core.pipeline import policies
1212
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1313

1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17+
from azure.core import AzureClouds
1718
from azure.core.credentials import TokenCredential
1819

1920

@@ -28,22 +29,26 @@ class WebSiteManagementClientConfiguration: # pylint: disable=too-many-instance
2829
:param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g.
2930
00000000-0000-0000-0000-000000000000). Required.
3031
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
32-
default value may result in unsupported behavior.
33-
:paramtype api_version: str
32+
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
33+
None.
34+
:type cloud_setting: ~azure.core.AzureClouds
3435
"""
3536

36-
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-11-01")
38-
37+
def __init__(
38+
self,
39+
credential: "TokenCredential",
40+
subscription_id: str,
41+
cloud_setting: Optional["AzureClouds"] = None,
42+
**kwargs: Any
43+
) -> None:
3944
if credential is None:
4045
raise ValueError("Parameter 'credential' must not be None.")
4146
if subscription_id is None:
4247
raise ValueError("Parameter 'subscription_id' must not be None.")
4348

4449
self.credential = credential
4550
self.subscription_id = subscription_id
46-
self.api_version = api_version
51+
self.cloud_setting = cloud_setting
4752
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
4853
kwargs.setdefault("sdk_moniker", "mgmt-web/{}".format(VERSION))
4954
self.polling_interval = kwargs.get("polling_interval", 30)

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_utils/serialization.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import sys
2222
import codecs
2323
from typing import (
24-
Dict,
2524
Any,
2625
cast,
2726
Optional,
@@ -31,7 +30,6 @@
3130
Mapping,
3231
Callable,
3332
MutableMapping,
34-
List,
3533
)
3634

3735
try:
@@ -229,12 +227,12 @@ class Model:
229227
serialization and deserialization.
230228
"""
231229

232-
_subtype_map: Dict[str, Dict[str, Any]] = {}
233-
_attribute_map: Dict[str, Dict[str, Any]] = {}
234-
_validation: Dict[str, Dict[str, Any]] = {}
230+
_subtype_map: dict[str, dict[str, Any]] = {}
231+
_attribute_map: dict[str, dict[str, Any]] = {}
232+
_validation: dict[str, dict[str, Any]] = {}
235233

236234
def __init__(self, **kwargs: Any) -> None:
237-
self.additional_properties: Optional[Dict[str, Any]] = {}
235+
self.additional_properties: Optional[dict[str, Any]] = {}
238236
for k in kwargs: # pylint: disable=consider-using-dict-items
239237
if k not in self._attribute_map:
240238
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
@@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
311309
def as_dict(
312310
self,
313311
keep_readonly: bool = True,
314-
key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
312+
key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
315313
**kwargs: Any
316314
) -> JSON:
317315
"""Return a dict that can be serialized using json.dump.
@@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
380378
def from_dict(
381379
cls,
382380
data: Any,
383-
key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
381+
key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
384382
content_type: Optional[str] = None,
385383
) -> Self:
386384
"""Parse a dict using given key extractor return a model.
@@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects):
414412
return {}
415413
result = dict(cls._subtype_map[key])
416414
for valuetype in cls._subtype_map[key].values():
417-
result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
415+
result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
418416
return result
419417

420418
@classmethod
@@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
528526
"[]": self.serialize_iter,
529527
"{}": self.serialize_dict,
530528
}
531-
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
529+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
532530
self.key_transformer = full_restapi_key_transformer
533531
self.client_side_validation = True
534532

@@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to
579577

580578
if attr_name == "additional_properties" and attr_desc["key"] == "":
581579
if target_obj.additional_properties is not None:
582-
serialized.update(target_obj.additional_properties)
580+
serialized |= target_obj.additional_properties
583581
continue
584582
try:
585583

@@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs):
789787

790788
# If dependencies is empty, try with current data class
791789
# It has to be a subclass of Enum anyway
792-
enum_type = self.dependencies.get(data_type, data.__class__)
790+
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
793791
if issubclass(enum_type, Enum):
794792
return Serializer.serialize_enum(data, enum_obj=enum_type)
795793

@@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen
11841182

11851183
while "." in key:
11861184
# Need the cast, as for some reasons "split" is typed as list[str | Any]
1187-
dict_keys = cast(List[str], _FLATTEN.split(key))
1185+
dict_keys = cast(list[str], _FLATTEN.split(key))
11881186
if len(dict_keys) == 1:
11891187
key = _decode_attribute_map_key(dict_keys[0])
11901188
break
@@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
13861384
"duration": (isodate.Duration, datetime.timedelta),
13871385
"iso-8601": (datetime.datetime),
13881386
}
1389-
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
1387+
self.dependencies: dict[str, type] = dict(classes) if classes else {}
13901388
self.key_extractors = [rest_key_extractor, xml_key_extractor]
13911389
# Additional properties only works if the "rest_key_extractor" is used to
13921390
# extract the keys. Making it to work whatever the key extractor is too much

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_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 = "10.0.0"
8+
VERSION = "10.1.0"

sdk/appservice/azure-mgmt-web/azure/mgmt/web/_web_site_management_client.py

Lines changed: 53 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,15 @@
5454
)
5555

5656
if TYPE_CHECKING:
57+
from azure.core import AzureClouds
5758
from azure.core.credentials import TokenCredential
5859

5960

60-
class WebSiteManagementClient(_WebSiteManagementClientOperationsMixin): # pylint: disable=too-many-instance-attributes
61-
"""WebSite Management Client.
61+
class WebSiteManagementClient(
62+
_WebSiteManagementClientOperationsMixin
63+
): # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
64+
"""AppService Management Client.
6265
63-
:ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations
64-
:vartype app_service_certificate_orders:
65-
azure.mgmt.web.operations.AppServiceCertificateOrdersOperations
66-
:ivar certificate_orders_diagnostics: CertificateOrdersDiagnosticsOperations operations
67-
:vartype certificate_orders_diagnostics:
68-
azure.mgmt.web.operations.CertificateOrdersDiagnosticsOperations
69-
:ivar certificate_registration_provider: CertificateRegistrationProviderOperations operations
70-
:vartype certificate_registration_provider:
71-
azure.mgmt.web.operations.CertificateRegistrationProviderOperations
72-
:ivar domain_registration_provider: DomainRegistrationProviderOperations operations
73-
:vartype domain_registration_provider:
74-
azure.mgmt.web.operations.DomainRegistrationProviderOperations
75-
:ivar domains: DomainsOperations operations
76-
:vartype domains: azure.mgmt.web.operations.DomainsOperations
77-
:ivar top_level_domains: TopLevelDomainsOperations operations
78-
:vartype top_level_domains: azure.mgmt.web.operations.TopLevelDomainsOperations
7966
:ivar app_service_environments: AppServiceEnvironmentsOperations operations
8067
:vartype app_service_environments: azure.mgmt.web.operations.AppServiceEnvironmentsOperations
8168
:ivar app_service_plans: AppServicePlansOperations operations
@@ -128,30 +115,56 @@ class WebSiteManagementClient(_WebSiteManagementClientOperationsMixin): # pylin
128115
azure.mgmt.web.operations.WorkflowTriggerHistoriesOperations
129116
:ivar workflow_versions: WorkflowVersionsOperations operations
130117
:vartype workflow_versions: azure.mgmt.web.operations.WorkflowVersionsOperations
118+
:ivar app_service_certificate_orders: AppServiceCertificateOrdersOperations operations
119+
:vartype app_service_certificate_orders:
120+
azure.mgmt.web.operations.AppServiceCertificateOrdersOperations
121+
:ivar certificate_orders_diagnostics: CertificateOrdersDiagnosticsOperations operations
122+
:vartype certificate_orders_diagnostics:
123+
azure.mgmt.web.operations.CertificateOrdersDiagnosticsOperations
124+
:ivar certificate_registration_provider: CertificateRegistrationProviderOperations operations
125+
:vartype certificate_registration_provider:
126+
azure.mgmt.web.operations.CertificateRegistrationProviderOperations
127+
:ivar domain_registration_provider: DomainRegistrationProviderOperations operations
128+
:vartype domain_registration_provider:
129+
azure.mgmt.web.operations.DomainRegistrationProviderOperations
130+
:ivar domains: DomainsOperations operations
131+
:vartype domains: azure.mgmt.web.operations.DomainsOperations
132+
:ivar top_level_domains: TopLevelDomainsOperations operations
133+
:vartype top_level_domains: azure.mgmt.web.operations.TopLevelDomainsOperations
131134
:param credential: Credential needed for the client to connect to Azure. Required.
132135
:type credential: ~azure.core.credentials.TokenCredential
133136
:param subscription_id: Your Azure subscription ID. This is a GUID-formatted string (e.g.
134137
00000000-0000-0000-0000-000000000000). Required.
135138
:type subscription_id: str
136139
:param base_url: Service URL. Default value is None.
137140
:type base_url: str
138-
:keyword api_version: Api Version. Default value is "2024-11-01". Note that overriding this
139-
default value may result in unsupported behavior.
140-
:paramtype api_version: str
141+
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
142+
None.
143+
:paramtype cloud_setting: ~azure.core.AzureClouds
141144
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
142145
Retry-After header is present.
143146
"""
144147

145148
def __init__(
146-
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
149+
self,
150+
credential: "TokenCredential",
151+
subscription_id: str,
152+
base_url: Optional[str] = None,
153+
*,
154+
cloud_setting: Optional["AzureClouds"] = None,
155+
**kwargs: Any
147156
) -> None:
148-
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
157+
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
149158
_endpoints = get_arm_endpoints(_cloud)
150159
if not base_url:
151160
base_url = _endpoints["resource_manager"]
152161
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
153162
self._config = WebSiteManagementClientConfiguration(
154-
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
163+
credential=credential,
164+
subscription_id=subscription_id,
165+
cloud_setting=cloud_setting,
166+
credential_scopes=credential_scopes,
167+
**kwargs
155168
)
156169

157170
_policies = kwargs.pop("policies", None)
@@ -178,22 +191,6 @@ def __init__(
178191
self._serialize = Serializer(client_models)
179192
self._deserialize = Deserializer(client_models)
180193
self._serialize.client_side_validation = False
181-
self.app_service_certificate_orders = AppServiceCertificateOrdersOperations(
182-
self._client, self._config, self._serialize, self._deserialize
183-
)
184-
self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations(
185-
self._client, self._config, self._serialize, self._deserialize
186-
)
187-
self.certificate_registration_provider = CertificateRegistrationProviderOperations(
188-
self._client, self._config, self._serialize, self._deserialize
189-
)
190-
self.domain_registration_provider = DomainRegistrationProviderOperations(
191-
self._client, self._config, self._serialize, self._deserialize
192-
)
193-
self.domains = DomainsOperations(self._client, self._config, self._serialize, self._deserialize)
194-
self.top_level_domains = TopLevelDomainsOperations(
195-
self._client, self._config, self._serialize, self._deserialize
196-
)
197194
self.app_service_environments = AppServiceEnvironmentsOperations(
198195
self._client, self._config, self._serialize, self._deserialize
199196
)
@@ -243,6 +240,22 @@ def __init__(
243240
self.workflow_versions = WorkflowVersionsOperations(
244241
self._client, self._config, self._serialize, self._deserialize
245242
)
243+
self.app_service_certificate_orders = AppServiceCertificateOrdersOperations(
244+
self._client, self._config, self._serialize, self._deserialize
245+
)
246+
self.certificate_orders_diagnostics = CertificateOrdersDiagnosticsOperations(
247+
self._client, self._config, self._serialize, self._deserialize
248+
)
249+
self.certificate_registration_provider = CertificateRegistrationProviderOperations(
250+
self._client, self._config, self._serialize, self._deserialize
251+
)
252+
self.domain_registration_provider = DomainRegistrationProviderOperations(
253+
self._client, self._config, self._serialize, self._deserialize
254+
)
255+
self.domains = DomainsOperations(self._client, self._config, self._serialize, self._deserialize)
256+
self.top_level_domains = TopLevelDomainsOperations(
257+
self._client, self._config, self._serialize, self._deserialize
258+
)
246259

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

0 commit comments

Comments
 (0)