Skip to content

Commit 758a027

Browse files
[AutoPR azure-mgmt-hanaonazure]-generated-from-SDK Generation - Python-6350977 (#47126)
* Configurations: 'specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/HanaOnAzure/tspconfig.yaml', API Version: 2020-02-07-preview, SDK Release Type: beta, and CommitSHA: 'd0beff06ece5e53277d93233b70d46b703346576' in SpecRepo: 'https://github.com/Azure/azure-rest-api-specs' Pipeline run: https://dev.azure.com/azure-sdk/internal/_build/results?buildId=6350977 Refer to https://eng.ms/docs/products/azure-developer-experience/develop/sdk-release/sdk-release-prerequisites to prepare for SDK release. * update --------- Co-authored-by: Chenxi Jiang (WICRESOFT NORTH AMERICA LTD) <v-chenjiang@microsoft.com>
1 parent a01197d commit 758a027

56 files changed

Lines changed: 5874 additions & 3606 deletions

Some content is hidden

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

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

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

3+
## 1.1.0b2 (2026-05-26)
4+
5+
### Features Added
6+
7+
- Client `HanaManagementClient` added parameter `cloud_setting` in method `__init__`
8+
- Client `HanaManagementClient` added method `send_request`
9+
- Model `ProviderInstance` added property `system_data`
10+
- Model `ProxyResource` added property `system_data`
11+
- Model `Resource` added property `system_data`
12+
- Model `SapMonitor` added property `system_data`
13+
- Model `TrackedResource` added property `system_data`
14+
- Added enum `CreatedByType`
15+
- Added model `SystemData`
16+
17+
### Breaking Changes
18+
19+
- This version introduces new hybrid models which have dual dictionary and model nature. Please follow https://aka.ms/azsdk/python/migrate/hybrid-models for migration.
20+
- Model `ProviderInstance` moved instance variable `type_properties_type`, `metadata` and `provisioning_state` under property `properties` whose type is `ProviderInstanceProperties`
21+
22+
### Other Changes
23+
24+
- Deleted model `OperationList` which actually was not used by SDK users
25+
326
## 1.0.1 (2026-05-15)
427

528
### Other Changes
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
2-
"commit": "c962ac7fb7c81a90b43449d021f1cf9eeecce2b7",
2+
"apiVersion": "2020-02-07-preview",
3+
"apiVersions": {
4+
"Microsoft.HanaOnAzure": "2020-02-07-preview"
5+
},
6+
"commit": "d0beff06ece5e53277d93233b70d46b703346576",
37
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
4-
"autorest": "3.10.2",
5-
"use": [
6-
"@autorest/python@6.50.0",
7-
"@autorest/modelerfour@4.27.0"
8-
],
9-
"autorest_command": "autorest specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/HanaOnAzure/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=C:\\dev\\azure-sdk-for-python\\sdk --tag=package-2020-02-07-preview --use=@autorest/python@6.50.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
10-
"readme": "specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/HanaOnAzure/readme.md"
8+
"typespec_src": "specification/hanaonazure/resource-manager/Microsoft.HanaOnAzure/HanaOnAzure",
9+
"emitterVersion": "0.62.1"
1110
}
Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
{
2-
"CrossLanguagePackageId": null,
2+
"CrossLanguagePackageId": "Microsoft.HanaOnAzure",
33
"CrossLanguageDefinitionId": {
4-
"azure.mgmt.hanaonazure.models.Display": null,
5-
"azure.mgmt.hanaonazure.models.ErrorResponse": null,
6-
"azure.mgmt.hanaonazure.models.ErrorResponseError": null,
7-
"azure.mgmt.hanaonazure.models.Operation": null,
8-
"azure.mgmt.hanaonazure.models.OperationList": null,
9-
"azure.mgmt.hanaonazure.models.Resource": null,
10-
"azure.mgmt.hanaonazure.models.ProxyResource": null,
11-
"azure.mgmt.hanaonazure.models.ProviderInstance": null,
12-
"azure.mgmt.hanaonazure.models.ProviderInstanceListResult": null,
13-
"azure.mgmt.hanaonazure.models.TrackedResource": null,
14-
"azure.mgmt.hanaonazure.models.SapMonitor": null,
15-
"azure.mgmt.hanaonazure.models.SapMonitorListResult": null,
16-
"azure.mgmt.hanaonazure.models.Tags": null,
17-
"azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum": null,
18-
"azure.mgmt.hanaonazure.operations.Operations.list": null,
19-
"azure.mgmt.hanaonazure.aio.operations.Operations.list": null,
20-
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.list": null,
21-
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.list": null,
22-
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.get": null,
23-
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.get": null,
24-
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.begin_create": null,
25-
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.begin_create": null,
26-
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.begin_delete": null,
27-
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.begin_delete": null,
28-
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.update": null,
29-
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.update": null,
30-
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.list": null,
31-
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.list": null,
32-
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.get": null,
33-
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.get": null,
34-
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.begin_create": null,
35-
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.begin_create": null,
36-
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.begin_delete": null,
37-
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.begin_delete": null
38-
}
4+
"azure.mgmt.hanaonazure.models.Display": "Microsoft.HanaOnAzure.Display",
5+
"azure.mgmt.hanaonazure.models.ErrorResponse": "Microsoft.HanaOnAzure.ErrorResponse",
6+
"azure.mgmt.hanaonazure.models.ErrorResponseError": "Microsoft.HanaOnAzure.ErrorResponseError",
7+
"azure.mgmt.hanaonazure.models.Operation": "Microsoft.HanaOnAzure.Operation",
8+
"azure.mgmt.hanaonazure.models.Resource": "Azure.ResourceManager.CommonTypes.Resource",
9+
"azure.mgmt.hanaonazure.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource",
10+
"azure.mgmt.hanaonazure.models.ProviderInstance": "Microsoft.HanaOnAzure.ProviderInstance",
11+
"azure.mgmt.hanaonazure.models.ProviderInstanceProperties": "Microsoft.HanaOnAzure.ProviderInstanceProperties",
12+
"azure.mgmt.hanaonazure.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource",
13+
"azure.mgmt.hanaonazure.models.SapMonitor": "Microsoft.HanaOnAzure.SapMonitor",
14+
"azure.mgmt.hanaonazure.models.SapMonitorProperties": "Microsoft.HanaOnAzure.SapMonitorProperties",
15+
"azure.mgmt.hanaonazure.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData",
16+
"azure.mgmt.hanaonazure.models.Tags": "Microsoft.HanaOnAzure.Tags",
17+
"azure.mgmt.hanaonazure.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType",
18+
"azure.mgmt.hanaonazure.models.HanaProvisioningStatesEnum": "Microsoft.HanaOnAzure.HanaProvisioningStatesEnum",
19+
"azure.mgmt.hanaonazure.operations.Operations.list": "Microsoft.HanaOnAzure.Operations.list",
20+
"azure.mgmt.hanaonazure.aio.operations.Operations.list": "Microsoft.HanaOnAzure.Operations.list",
21+
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.get": "Microsoft.HanaOnAzure.SapMonitors.get",
22+
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.get": "Microsoft.HanaOnAzure.SapMonitors.get",
23+
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.begin_create": "Microsoft.HanaOnAzure.SapMonitors.create",
24+
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.begin_create": "Microsoft.HanaOnAzure.SapMonitors.create",
25+
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.update": "Microsoft.HanaOnAzure.SapMonitors.update",
26+
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.update": "Microsoft.HanaOnAzure.SapMonitors.update",
27+
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.begin_delete": "Microsoft.HanaOnAzure.SapMonitors.delete",
28+
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.begin_delete": "Microsoft.HanaOnAzure.SapMonitors.delete",
29+
"azure.mgmt.hanaonazure.operations.SapMonitorsOperations.list": "Microsoft.HanaOnAzure.SapMonitors.list",
30+
"azure.mgmt.hanaonazure.aio.operations.SapMonitorsOperations.list": "Microsoft.HanaOnAzure.SapMonitors.list",
31+
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.get": "Microsoft.HanaOnAzure.ProviderInstances.get",
32+
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.get": "Microsoft.HanaOnAzure.ProviderInstances.get",
33+
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.begin_create": "Microsoft.HanaOnAzure.ProviderInstances.create",
34+
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.begin_create": "Microsoft.HanaOnAzure.ProviderInstances.create",
35+
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.begin_delete": "Microsoft.HanaOnAzure.ProviderInstances.delete",
36+
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.begin_delete": "Microsoft.HanaOnAzure.ProviderInstances.delete",
37+
"azure.mgmt.hanaonazure.operations.ProviderInstancesOperations.list": "Microsoft.HanaOnAzure.ProviderInstances.list",
38+
"azure.mgmt.hanaonazure.aio.operations.ProviderInstancesOperations.list": "Microsoft.HanaOnAzure.ProviderInstances.list"
39+
},
40+
"CrossLanguageVersion": "0301506d2202"
3941
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88
# pylint: disable=wrong-import-position
@@ -12,7 +12,7 @@
1212
if TYPE_CHECKING:
1313
from ._patch import * # pylint: disable=unused-wildcard-import
1414

15-
from ._hana_management_client import HanaManagementClient # type: ignore
15+
from ._client import HanaManagementClient # type: ignore
1616
from ._version import VERSION
1717

1818
__version__ = VERSION

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_hana_management_client.py renamed to sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_client.py

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

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

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
@@ -17,37 +17,42 @@
1717
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1818
from azure.mgmt.core.tools import get_arm_endpoints
1919

20-
from . import models as _models
2120
from ._configuration import HanaManagementClientConfiguration
2221
from ._utils.serialization import Deserializer, Serializer
2322
from .operations import Operations, ProviderInstancesOperations, SapMonitorsOperations
2423

24+
if sys.version_info >= (3, 11):
25+
from typing import Self
26+
else:
27+
from typing_extensions import Self # type: ignore
28+
2529
if TYPE_CHECKING:
2630
from azure.core import AzureClouds
2731
from azure.core.credentials import TokenCredential
2832

2933

3034
class HanaManagementClient:
31-
"""HANA on Azure Client.
35+
"""The SAP HANA on Azure Management Client.
3236
3337
:ivar operations: Operations operations
3438
:vartype operations: azure.mgmt.hanaonazure.operations.Operations
3539
:ivar sap_monitors: SapMonitorsOperations operations
3640
:vartype sap_monitors: azure.mgmt.hanaonazure.operations.SapMonitorsOperations
3741
:ivar provider_instances: ProviderInstancesOperations operations
3842
:vartype provider_instances: azure.mgmt.hanaonazure.operations.ProviderInstancesOperations
39-
:param credential: Credential needed for the client to connect to Azure. Required.
43+
:param credential: Credential used to authenticate requests to the service. Required.
4044
:type credential: ~azure.core.credentials.TokenCredential
41-
:param subscription_id: Subscription ID which uniquely identify Microsoft Azure subscription.
42-
The subscription ID forms part of the URI for every service call. Required.
45+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
4346
:type subscription_id: str
44-
:param base_url: Service URL. Default value is None.
47+
:param base_url: Service host. Default value is None.
4548
:type base_url: str
4649
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
4750
None.
4851
:paramtype cloud_setting: ~azure.core.AzureClouds
49-
:keyword api_version: Api Version. Default value is "2020-02-07-preview". Note that overriding
50-
this default value may result in unsupported behavior.
52+
:keyword api_version: The API version to use for this operation. Known values are
53+
"2020-02-07-preview" and None. Default value is None. If not set, the operation's default API
54+
version will be used. Note that overriding this default value may result in unsupported
55+
behavior.
5156
:paramtype api_version: str
5257
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
5358
Retry-After header is present.
@@ -62,6 +67,7 @@ def __init__(
6267
cloud_setting: Optional["AzureClouds"] = None,
6368
**kwargs: Any
6469
) -> None:
70+
_endpoint = "{endpoint}"
6571
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
6672
_endpoints = get_arm_endpoints(_cloud)
6773
if not base_url:
@@ -70,6 +76,7 @@ def __init__(
7076
self._config = HanaManagementClientConfiguration(
7177
credential=credential,
7278
subscription_id=subscription_id,
79+
base_url=cast(str, base_url),
7380
cloud_setting=cloud_setting,
7481
credential_scopes=credential_scopes,
7582
**kwargs
@@ -93,25 +100,24 @@ def __init__(
93100
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
94101
self._config.http_logging_policy,
95102
]
96-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
103+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
97104

98-
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
99-
self._serialize = Serializer(client_models)
100-
self._deserialize = Deserializer(client_models)
105+
self._serialize = Serializer()
106+
self._deserialize = Deserializer()
101107
self._serialize.client_side_validation = False
102108
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
103109
self.sap_monitors = SapMonitorsOperations(self._client, self._config, self._serialize, self._deserialize)
104110
self.provider_instances = ProviderInstancesOperations(
105111
self._client, self._config, self._serialize, self._deserialize
106112
)
107113

108-
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
114+
def send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
109115
"""Runs the network request through the client's chained policies.
110116
111117
>>> from azure.core.rest import HttpRequest
112118
>>> request = HttpRequest("GET", "https://www.example.org/")
113119
<HttpRequest [GET], url: 'https://www.example.org/'>
114-
>>> response = client._send_request(request)
120+
>>> response = client.send_request(request)
115121
<HttpResponse: 200 OK>
116122
117123
For more information on this code flow, see https://aka.ms/azsdk/dpcodegen/python/send_request
@@ -124,7 +130,11 @@ def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs:
124130
"""
125131

126132
request_copy = deepcopy(request)
127-
request_copy.url = self._client.format_url(request_copy.url)
133+
path_format_arguments = {
134+
"endpoint": self._serialize.url("self._config.base_url", self._config.base_url, "str", skip_quote=True),
135+
}
136+
137+
request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments)
128138
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
129139

130140
def close(self) -> None:

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# --------------------------------------------------------------------------
33
# Copyright (c) Microsoft Corporation. All rights reserved.
44
# Licensed under the MIT License. See License.txt in the project root for license information.
5-
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Code generated by Microsoft (R) Python Code Generator.
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

@@ -24,23 +24,27 @@ class HanaManagementClientConfiguration: # pylint: disable=too-many-instance-at
2424
Note that all parameters used to create this instance are saved as instance
2525
attributes.
2626
27-
:param credential: Credential needed for the client to connect to Azure. Required.
27+
:param credential: Credential used to authenticate requests to the service. Required.
2828
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: Subscription ID which uniquely identify Microsoft Azure subscription.
30-
The subscription ID forms part of the URI for every service call. Required.
29+
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3130
:type subscription_id: str
31+
:param base_url: Service host. Default value is "https://management.azure.com".
32+
:type base_url: str
3233
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
3334
None.
3435
:type cloud_setting: ~azure.core.AzureClouds
35-
:keyword api_version: Api Version. Default value is "2020-02-07-preview". Note that overriding
36-
this default value may result in unsupported behavior.
36+
:keyword api_version: The API version to use for this operation. Known values are
37+
"2020-02-07-preview" and None. Default value is None. If not set, the operation's default API
38+
version will be used. Note that overriding this default value may result in unsupported
39+
behavior.
3740
:paramtype api_version: str
3841
"""
3942

4043
def __init__(
4144
self,
4245
credential: "TokenCredential",
4346
subscription_id: str,
47+
base_url: str = "https://management.azure.com",
4448
cloud_setting: Optional["AzureClouds"] = None,
4549
**kwargs: Any
4650
) -> None:
@@ -53,6 +57,7 @@ def __init__(
5357

5458
self.credential = credential
5559
self.subscription_id = subscription_id
60+
self.base_url = base_url
5661
self.cloud_setting = cloud_setting
5762
self.api_version = api_version
5863
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])

sdk/hanaonazure/azure-mgmt-hanaonazure/azure/mgmt/hanaonazure/_patch.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
5-
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# --------------------------------------------------------------------------
66
"""Customize generated code here.
77
88
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
99
"""
10-
from typing import List
1110

12-
__all__: List[str] = [] # Add all objects you want publicly available to users at this package level
11+
__all__: list[str] = [] # Add all objects you want publicly available to users at this package level
1312

1413

1514
def patch_sdk():

0 commit comments

Comments
 (0)