Skip to content

Commit 04354ae

Browse files
author
SDKAuto
committed
CodeGen from PR 34325 in Azure/azure-rest-api-specs
Merge 439b5b89e8831d31e5b4879d4a8cd65e1feeed69 into 5db6f4b2219494122de700460988e9f3ef735dc0
1 parent 2c9172e commit 04354ae

File tree

82 files changed

+2888
-2253
lines changed

Some content is hidden

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

82 files changed

+2888
-2253
lines changed

sdk/network/azure-mgmt-privatedns/CHANGELOG.md

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

3+
## 2.0.0 (2025-04-29)
4+
5+
### Features Added
6+
7+
- Model `PrivateZone` added property `system_data`
8+
- Model `ProxyResource` added property `system_data`
9+
- Model `RecordSet` added property `system_data`
10+
- Model `Resource` added property `system_data`
11+
- Model `TrackedResource` added property `system_data`
12+
- Model `VirtualNetworkLink` added property `system_data`
13+
- Added enum `CreatedByType`
14+
- Added model `ErrorAdditionalInfo`
15+
- Added model `ErrorDetail`
16+
- Added model `ErrorResponse`
17+
- Added model `SystemData`
18+
19+
### Breaking Changes
20+
21+
- Method `PrivateZone.__init__` removed default value `None` from its parameter `location`
22+
- Method `PrivateZoneListResult.__init__` removed default value `None` from its parameter `value`
23+
- Method `RecordSetListResult.__init__` removed default value `None` from its parameter `value`
24+
- Method `TrackedResource.__init__` removed default value `None` from its parameter `location`
25+
- Method `VirtualNetworkLink.__init__` removed default value `None` from its parameter `location`
26+
- Method `VirtualNetworkLinkListResult.__init__` removed default value `None` from its parameter `value`
27+
- Deleted or renamed model `CloudErrorBody`
28+
- Method `RecordSetsOperations.update` re-ordered its parameters from `['self', 'resource_group_name', 'private_zone_name', 'record_type', 'relative_record_set_name', 'parameters', 'if_match', 'kwargs']` to `['self', 'resource_group_name', 'private_zone_name', 'relative_record_set_name', 'record_type', 'parameters', 'if_match', 'kwargs']`
29+
- Method `RecordSetsOperations.get` re-ordered its parameters from `['self', 'resource_group_name', 'private_zone_name', 'record_type', 'relative_record_set_name', 'kwargs']` to `['self', 'resource_group_name', 'private_zone_name', 'relative_record_set_name', 'record_type', 'kwargs']`
30+
- Method `RecordSetsOperations.create_or_update` re-ordered its parameters from `['self', 'resource_group_name', 'private_zone_name', 'record_type', 'relative_record_set_name', 'parameters', 'if_match', 'if_none_match', 'kwargs']` to `['self', 'resource_group_name', 'private_zone_name', 'relative_record_set_name', 'record_type', 'parameters', 'if_match', 'if_none_match', 'kwargs']`
31+
- Method `RecordSetsOperations.delete` re-ordered its parameters from `['self', 'resource_group_name', 'private_zone_name', 'record_type', 'relative_record_set_name', 'if_match', 'kwargs']` to `['self', 'resource_group_name', 'private_zone_name', 'relative_record_set_name', 'record_type', 'if_match', 'kwargs']`
32+
333
## 1.2.0 (2024-09-23)
434

535
### Features Added

sdk/network/azure-mgmt-privatedns/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 DNS Private Zones 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "e4991356eec55985c1af47096c9c2091126a7d0f",
2+
"commit": "6c577193eb0f5e6e80b974ac0dcb028462823e10",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
6-
"@autorest/python@6.19.0",
6+
"@autorest/python@6.34.1",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/privatedns/resource-manager/readme.md --generate-sample=True --generate-test=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.19.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/privatedns/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.34.1 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/privatedns/resource-manager/readme.md"
1111
}

sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/__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 ._private_dns_management_client import PrivateDnsManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._private_dns_management_client import PrivateDnsManagementClient # 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
"PrivateDnsManagementClient",
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/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_configuration.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,18 @@
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 PrivateDnsManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class PrivateDnsManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for PrivateDnsManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
2524
attributes.
2625
2726
:param credential: Credential needed for the client to connect to Azure. Required.
2827
:type credential: ~azure.core.credentials.TokenCredential
29-
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
30-
subscription. The subscription ID forms part of the URI for every service call. Required.
28+
:param subscription_id: The ID of the target subscription. Required.
3129
:type subscription_id: str
3230
:keyword api_version: Api Version. Default value is "2024-06-01". Note that overriding this
3331
default value may result in unsupported behavior.

sdk/network/azure-mgmt-privatedns/azure/mgmt/privatedns/_private_dns_management_client.py

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
# --------------------------------------------------------------------------
88

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

1313
from azure.core.pipeline import policies
1414
from azure.core.rest import HttpRequest, HttpResponse
15+
from azure.core.settings import settings
1516
from azure.mgmt.core import ARMPipelineClient
1617
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
18+
from azure.mgmt.core.tools import get_arm_endpoints
1719

1820
from . import models as _models
1921
from ._configuration import PrivateDnsManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import PrivateZonesOperations, RecordSetsOperations, VirtualNetworkLinksOperations
2224

2325
if TYPE_CHECKING:
24-
# pylint: disable=unused-import,ungrouped-imports
2526
from azure.core.credentials import TokenCredential
2627

2728

28-
class PrivateDnsManagementClient: # pylint: disable=client-accepts-api-version-keyword
29+
class PrivateDnsManagementClient:
2930
"""The Private DNS Management Client.
3031
3132
:ivar private_zones: PrivateZonesOperations operations
3233
:vartype private_zones: azure.mgmt.privatedns.operations.PrivateZonesOperations
33-
:ivar virtual_network_links: VirtualNetworkLinksOperations operations
34-
:vartype virtual_network_links: azure.mgmt.privatedns.operations.VirtualNetworkLinksOperations
3534
:ivar record_sets: RecordSetsOperations operations
3635
:vartype record_sets: azure.mgmt.privatedns.operations.RecordSetsOperations
36+
:ivar virtual_network_links: VirtualNetworkLinksOperations operations
37+
:vartype virtual_network_links: azure.mgmt.privatedns.operations.VirtualNetworkLinksOperations
3738
:param credential: Credential needed for the client to connect to Azure. Required.
3839
:type credential: ~azure.core.credentials.TokenCredential
39-
:param subscription_id: Gets subscription credentials which uniquely identify Microsoft Azure
40-
subscription. The subscription ID forms part of the URI for every service call. Required.
40+
:param subscription_id: The ID of the target subscription. Required.
4141
:type subscription_id: str
42-
:param base_url: Service URL. Default value is "https://management.azure.com".
42+
:param base_url: Service URL. Default value is None.
4343
:type base_url: str
4444
:keyword api_version: Api Version. Default value is "2024-06-01". Note that overriding this
4545
default value may result in unsupported behavior.
@@ -49,15 +49,17 @@ class PrivateDnsManagementClient: # pylint: disable=client-accepts-api-version-
4949
"""
5050

5151
def __init__(
52-
self,
53-
credential: "TokenCredential",
54-
subscription_id: str,
55-
base_url: str = "https://management.azure.com",
56-
**kwargs: Any
52+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5753
) -> None:
54+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
55+
_endpoints = get_arm_endpoints(_cloud)
56+
if not base_url:
57+
base_url = _endpoints["resource_manager"]
58+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5859
self._config = PrivateDnsManagementClientConfiguration(
59-
credential=credential, subscription_id=subscription_id, **kwargs
60+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
6061
)
62+
6163
_policies = kwargs.pop("policies", None)
6264
if _policies is None:
6365
_policies = [
@@ -76,17 +78,17 @@ def __init__(
7678
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7779
self._config.http_logging_policy,
7880
]
79-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
81+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
8082

8183
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
8284
self._serialize = Serializer(client_models)
8385
self._deserialize = Deserializer(client_models)
8486
self._serialize.client_side_validation = False
8587
self.private_zones = PrivateZonesOperations(self._client, self._config, self._serialize, self._deserialize)
88+
self.record_sets = RecordSetsOperations(self._client, self._config, self._serialize, self._deserialize)
8689
self.virtual_network_links = VirtualNetworkLinksOperations(
8790
self._client, self._config, self._serialize, self._deserialize
8891
)
89-
self.record_sets = RecordSetsOperations(self._client, self._config, self._serialize, self._deserialize)
9092

9193
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
9294
"""Runs the network request through the client's chained policies.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
# Code generated by Microsoft (R) AutoRest Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

0 commit comments

Comments
 (0)