Skip to content

Commit 39eae1a

Browse files
author
SDKAuto
committed
CodeGen from PR 34136 in Azure/azure-rest-api-specs
Merge d9ca5bf7d507d55dde1b7dace65c83dc401d34c6 into ea7af0b0330c8730da25a7136a5dc28ebffce60b
1 parent 1d19d94 commit 39eae1a

File tree

171 files changed

+6049
-1543
lines changed

Some content is hidden

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

171 files changed

+6049
-1543
lines changed

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

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

3+
## 8.0.0b1 (2025-04-22)
4+
5+
### Features Added
6+
7+
- Model `MicrosoftSupport` added property `service_classifications_no_subscription`
8+
- Model `MicrosoftSupport` added property `service_classifications`
9+
- Model `MicrosoftSupport` added property `problem_classifications_no_subscription`
10+
- Model `MicrosoftSupport` added property `look_up_resource_id`
11+
- Model `ProblemClassification` added property `metadata`
12+
- Model `ProblemClassification` added property `parent_problem_classification`
13+
- Model `Service` added property `metadata`
14+
- Added model `ClassificationService`
15+
- Added model `LookUpResourceIdRequest`
16+
- Added model `LookUpResourceIdResponse`
17+
- Added model `ProblemClassificationsClassificationInput`
18+
- Added model `ProblemClassificationsClassificationOutput`
19+
- Added model `ProblemClassificationsClassificationResult`
20+
- Added model `ServiceClassificationAnswer`
21+
- Added model `ServiceClassificationOutput`
22+
- Added model `ServiceClassificationRequest`
23+
- Model `ProblemClassificationsOperations` added method `classify_problems`
24+
- Added model `LookUpResourceIdOperations`
25+
- Added model `ProblemClassificationsNoSubscriptionOperations`
26+
- Added model `ServiceClassificationsNoSubscriptionOperations`
27+
- Added model `ServiceClassificationsOperations`
28+
- Method `ProblemClassificationsOperations.classify_problems` has a new overload `def classify_problems(self: None, problem_service_name: str, problem_classifications_classification_input: ProblemClassificationsClassificationInput, content_type: str)`
29+
- Method `ProblemClassificationsOperations.classify_problems` has a new overload `def classify_problems(self: None, problem_service_name: str, problem_classifications_classification_input: IO[bytes], content_type: str)`
30+
- Method `LookUpResourceIdOperations.post` has a new overload `def post(self: None, look_up_resource_id_request: LookUpResourceIdRequest, content_type: str)`
31+
- Method `LookUpResourceIdOperations.post` has a new overload `def post(self: None, look_up_resource_id_request: IO[bytes], content_type: str)`
32+
- Method `ProblemClassificationsNoSubscriptionOperations.classify_problems` has a new overload `def classify_problems(self: None, problem_service_name: str, problem_classifications_classification_input: ProblemClassificationsClassificationInput, content_type: str)`
33+
- Method `ProblemClassificationsNoSubscriptionOperations.classify_problems` has a new overload `def classify_problems(self: None, problem_service_name: str, problem_classifications_classification_input: IO[bytes], content_type: str)`
34+
- Method `ServiceClassificationsNoSubscriptionOperations.classify_services` has a new overload `def classify_services(self: None, service_classification_request: ServiceClassificationRequest, content_type: str)`
35+
- Method `ServiceClassificationsNoSubscriptionOperations.classify_services` has a new overload `def classify_services(self: None, service_classification_request: IO[bytes], content_type: str)`
36+
- Method `ServiceClassificationsOperations.classify_services` has a new overload `def classify_services(self: None, service_classification_request: ServiceClassificationRequest, content_type: str)`
37+
- Method `ServiceClassificationsOperations.classify_services` has a new overload `def classify_services(self: None, service_classification_request: IO[bytes], content_type: str)`
38+
39+
### Breaking Changes
40+
41+
- Method `MessageProperties.__init__` removed default value `None` from its parameter `body`
42+
343
## 7.0.0 (2024-04-22)
444

545
### Features Added

sdk/support/azure-mgmt-support/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 Support 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.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "665e7c3b6f26b148b3c05e55602621bc293cc0a4",
2+
"commit": "367cd162a788f05c4a6c2729f8c6cc4fbf83131b",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.9.7",
4+
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.13.7",
6+
"@autorest/python@6.33.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/support/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/[email protected] --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/support/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/s/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/support/resource-manager/readme.md"
1111
}

sdk/support/azure-mgmt-support/azure/mgmt/support/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +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 ._microsoft_support import MicrosoftSupport
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._microsoft_support import MicrosoftSupport # type: ignore
1016
from ._version import VERSION
1117

1218
__version__ = VERSION
1319

1420
try:
1521
from ._patch import __all__ as _patch_all
16-
from ._patch import * # pylint: disable=unused-wildcard-import
22+
from ._patch import *
1723
except ImportError:
1824
_patch_all = []
1925
from ._patch import patch_sdk as _patch_sdk
2026

2127
__all__ = [
2228
"MicrosoftSupport",
2329
]
24-
__all__.extend([p for p in _patch_all if p not in __all__])
30+
__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
2531

2632
_patch_sdk()

sdk/support/azure-mgmt-support/azure/mgmt/support/_configuration.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
from ._version import VERSION
1515

1616
if TYPE_CHECKING:
17-
# pylint: disable=unused-import,ungrouped-imports
1817
from azure.core.credentials import TokenCredential
1918

2019

21-
class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for MicrosoftSupport.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class MicrosoftSupportConfiguration: # pylint: disable=too-many-instance-attrib
2827
:type credential: ~azure.core.credentials.TokenCredential
2928
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3029
:type subscription_id: str
31-
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
32-
default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
31+
this default value may result in unsupported behavior.
3332
:paramtype api_version: str
3433
"""
3534

3635
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
37-
api_version: str = kwargs.pop("api_version", "2024-04-01")
36+
api_version: str = kwargs.pop("api_version", "2023-06-01-preview")
3837

3938
if credential is None:
4039
raise ValueError("Parameter 'credential' must not be None.")

sdk/support/azure-mgmt-support/azure/mgmt/support/_microsoft_support.py

Lines changed: 49 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +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
11+
from typing_extensions import Self
1112

1213
from azure.core.pipeline import policies
1314
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1416
from azure.mgmt.core import ARMPipelineClient
1517
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1619

1720
from . import models as _models
1821
from ._configuration import MicrosoftSupportConfiguration
@@ -26,25 +29,39 @@
2629
FileWorkspacesOperations,
2730
FilesNoSubscriptionOperations,
2831
FilesOperations,
32+
LookUpResourceIdOperations,
2933
Operations,
34+
ProblemClassificationsNoSubscriptionOperations,
3035
ProblemClassificationsOperations,
36+
ServiceClassificationsNoSubscriptionOperations,
37+
ServiceClassificationsOperations,
3138
ServicesOperations,
3239
SupportTicketsNoSubscriptionOperations,
3340
SupportTicketsOperations,
3441
)
3542

3643
if TYPE_CHECKING:
37-
# pylint: disable=unused-import,ungrouped-imports
3844
from azure.core.credentials import TokenCredential
3945

4046

41-
class MicrosoftSupport: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
47+
class MicrosoftSupport: # pylint: disable=too-many-instance-attributes
4248
"""Microsoft Azure Support Resource Provider.
4349
4450
:ivar operations: Operations operations
4551
:vartype operations: azure.mgmt.support.operations.Operations
4652
:ivar services: ServicesOperations operations
4753
:vartype services: azure.mgmt.support.operations.ServicesOperations
54+
:ivar service_classifications_no_subscription: ServiceClassificationsNoSubscriptionOperations
55+
operations
56+
:vartype service_classifications_no_subscription:
57+
azure.mgmt.support.operations.ServiceClassificationsNoSubscriptionOperations
58+
:ivar service_classifications: ServiceClassificationsOperations operations
59+
:vartype service_classifications:
60+
azure.mgmt.support.operations.ServiceClassificationsOperations
61+
:ivar problem_classifications_no_subscription: ProblemClassificationsNoSubscriptionOperations
62+
operations
63+
:vartype problem_classifications_no_subscription:
64+
azure.mgmt.support.operations.ProblemClassificationsNoSubscriptionOperations
4865
:ivar problem_classifications: ProblemClassificationsOperations operations
4966
:vartype problem_classifications:
5067
azure.mgmt.support.operations.ProblemClassificationsOperations
@@ -72,27 +89,33 @@ class MicrosoftSupport: # pylint: disable=client-accepts-api-version-keyword,to
7289
:vartype files: azure.mgmt.support.operations.FilesOperations
7390
:ivar files_no_subscription: FilesNoSubscriptionOperations operations
7491
:vartype files_no_subscription: azure.mgmt.support.operations.FilesNoSubscriptionOperations
92+
:ivar look_up_resource_id: LookUpResourceIdOperations operations
93+
:vartype look_up_resource_id: azure.mgmt.support.operations.LookUpResourceIdOperations
7594
:param credential: Credential needed for the client to connect to Azure. Required.
7695
:type credential: ~azure.core.credentials.TokenCredential
7796
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
7897
:type subscription_id: str
79-
:param base_url: Service URL. Default value is "https://management.azure.com".
98+
:param base_url: Service URL. Default value is None.
8099
:type base_url: str
81-
:keyword api_version: Api Version. Default value is "2024-04-01". Note that overriding this
82-
default value may result in unsupported behavior.
100+
:keyword api_version: Api Version. Default value is "2023-06-01-preview". Note that overriding
101+
this default value may result in unsupported behavior.
83102
:paramtype api_version: str
84103
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
85104
Retry-After header is present.
86105
"""
87106

88107
def __init__(
89-
self,
90-
credential: "TokenCredential",
91-
subscription_id: str,
92-
base_url: str = "https://management.azure.com",
93-
**kwargs: Any
108+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
94109
) -> None:
95-
self._config = MicrosoftSupportConfiguration(credential=credential, subscription_id=subscription_id, **kwargs)
110+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
111+
_endpoints = get_arm_endpoints(_cloud)
112+
if not base_url:
113+
base_url = _endpoints["resource_manager"]
114+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
115+
self._config = MicrosoftSupportConfiguration(
116+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
117+
)
118+
96119
_policies = kwargs.pop("policies", None)
97120
if _policies is None:
98121
_policies = [
@@ -111,14 +134,23 @@ def __init__(
111134
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
112135
self._config.http_logging_policy,
113136
]
114-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
137+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
115138

116139
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
117140
self._serialize = Serializer(client_models)
118141
self._deserialize = Deserializer(client_models)
119142
self._serialize.client_side_validation = False
120143
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
121144
self.services = ServicesOperations(self._client, self._config, self._serialize, self._deserialize)
145+
self.service_classifications_no_subscription = ServiceClassificationsNoSubscriptionOperations(
146+
self._client, self._config, self._serialize, self._deserialize
147+
)
148+
self.service_classifications = ServiceClassificationsOperations(
149+
self._client, self._config, self._serialize, self._deserialize
150+
)
151+
self.problem_classifications_no_subscription = ProblemClassificationsNoSubscriptionOperations(
152+
self._client, self._config, self._serialize, self._deserialize
153+
)
122154
self.problem_classifications = ProblemClassificationsOperations(
123155
self._client, self._config, self._serialize, self._deserialize
124156
)
@@ -144,6 +176,9 @@ def __init__(
144176
self.files_no_subscription = FilesNoSubscriptionOperations(
145177
self._client, self._config, self._serialize, self._deserialize
146178
)
179+
self.look_up_resource_id = LookUpResourceIdOperations(
180+
self._client, self._config, self._serialize, self._deserialize
181+
)
147182

148183
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
149184
"""Runs the network request through the client's chained policies.
@@ -170,7 +205,7 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
170205
def close(self) -> None:
171206
self._client.close()
172207

173-
def __enter__(self) -> "MicrosoftSupport":
208+
def __enter__(self) -> Self:
174209
self._client.__enter__()
175210
return self
176211

0 commit comments

Comments
 (0)