Skip to content

Commit 5a5c284

Browse files
[AutoRelease] t2-dnsresolver-2025-05-27-62862(can only be merged by SDK owner) (#41301)
* code and test * update changelog --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: ChenxiJiang333 <[email protected]>
1 parent 096401d commit 5a5c284

File tree

130 files changed

+2230
-1303
lines changed

Some content is hidden

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

130 files changed

+2230
-1303
lines changed

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

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

3+
## 1.1.0 (2025-06-16)
4+
5+
### Features Added
6+
7+
- Client `DnsResolverManagementClient` added operation group `dns_resolver_policies`
8+
- Client `DnsResolverManagementClient` added operation group `dns_security_rules`
9+
- Client `DnsResolverManagementClient` added operation group `dns_resolver_policy_virtual_network_links`
10+
- Client `DnsResolverManagementClient` added operation group `dns_resolver_domain_lists`
11+
- Model `ProxyResource` added property `system_data`
12+
- Model `Resource` added property `system_data`
13+
- Model `TrackedResource` added property `system_data`
14+
- Added enum `Action`
15+
- Added enum `ActionType`
16+
- Added model `DnsResolverDomainList`
17+
- Added model `DnsResolverDomainListBulk`
18+
- Added model `DnsResolverDomainListPatch`
19+
- Added model `DnsResolverDomainListResult`
20+
- Added model `DnsResolverPolicy`
21+
- Added model `DnsResolverPolicyListResult`
22+
- Added model `DnsResolverPolicyPatch`
23+
- Added model `DnsResolverPolicyVirtualNetworkLink`
24+
- Added model `DnsResolverPolicyVirtualNetworkLinkListResult`
25+
- Added model `DnsResolverPolicyVirtualNetworkLinkPatch`
26+
- Added model `DnsSecurityRule`
27+
- Added model `DnsSecurityRuleAction`
28+
- Added model `DnsSecurityRuleListResult`
29+
- Added model `DnsSecurityRulePatch`
30+
- Added enum `DnsSecurityRuleState`
31+
- Added model `ErrorAdditionalInfo`
32+
- Added model `ErrorDetail`
33+
- Added model `ErrorResponse`
34+
- Added operation group `DnsResolverDomainListsOperations`
35+
- Added operation group `DnsResolverPoliciesOperations`
36+
- Added operation group `DnsResolverPolicyVirtualNetworkLinksOperations`
37+
- Added operation group `DnsSecurityRulesOperations`
38+
339
## 1.1.0b2 (2024-10-21)
440

541
### Features Added

sdk/dnsresolver/azure-mgmt-dnsresolver/MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include _meta.json
21
recursive-include tests *.py *.json
32
recursive-include samples *.py *.md
43
include *.md

sdk/dnsresolver/azure-mgmt-dnsresolver/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 Dnsresolver 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "ca4b71ab0e3bb7e4c44b44bf4d84d9c51f7b8264",
2+
"commit": "43ec634741a48376e9dbf4371e7520a9eb0a1cfa",
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.35.0",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/dnsresolver/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/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/dnsresolver/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/azure-sdk-for-python/sdk --use=@autorest/python@6.35.0 --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/dnsresolver/resource-manager/readme.md"
1111
}

sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/__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 ._dns_resolver_management_client import DnsResolverManagementClient
10+
from typing import TYPE_CHECKING
11+
12+
if TYPE_CHECKING:
13+
from ._patch import * # pylint: disable=unused-wildcard-import
14+
15+
from ._dns_resolver_management_client import DnsResolverManagementClient # 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
"DnsResolverManagementClient",
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/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_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 DnsResolverManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
20+
class DnsResolverManagementClientConfiguration: # pylint: disable=too-many-instance-attributes
2221
"""Configuration for DnsResolverManagementClient.
2322
2423
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class DnsResolverManagementClientConfiguration: # pylint: disable=too-many-inst
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 "2023-07-01-preview". Note that overriding
32-
this default value may result in unsupported behavior.
30+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
31+
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", "2023-07-01-preview")
36+
api_version: str = kwargs.pop("api_version", "2025-05-01")
3837

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

sdk/dnsresolver/azure-mgmt-dnsresolver/azure/mgmt/dnsresolver/_dns_resolver_management_client.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,19 @@
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 DnsResolverManagementClientConfiguration
20-
from ._serialization import Deserializer, Serializer
22+
from ._utils.serialization import Deserializer, Serializer
2123
from .operations import (
2224
DnsForwardingRulesetsOperations,
2325
DnsResolverDomainListsOperations,
@@ -32,11 +34,10 @@
3234
)
3335

3436
if TYPE_CHECKING:
35-
# pylint: disable=unused-import,ungrouped-imports
3637
from azure.core.credentials import TokenCredential
3738

3839

39-
class DnsResolverManagementClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
40+
class DnsResolverManagementClient: # pylint: disable=too-many-instance-attributes
4041
"""DNS Resolver Client.
4142
4243
:ivar dns_resolvers: DnsResolversOperations operations
@@ -67,25 +68,27 @@ class DnsResolverManagementClient: # pylint: disable=client-accepts-api-version
6768
:type credential: ~azure.core.credentials.TokenCredential
6869
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
6970
:type subscription_id: str
70-
:param base_url: Service URL. Default value is "https://management.azure.com".
71+
:param base_url: Service URL. Default value is None.
7172
:type base_url: str
72-
:keyword api_version: Api Version. Default value is "2023-07-01-preview". Note that overriding
73-
this default value may result in unsupported behavior.
73+
:keyword api_version: Api Version. Default value is "2025-05-01". Note that overriding this
74+
default value may result in unsupported behavior.
7475
:paramtype api_version: str
7576
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
7677
Retry-After header is present.
7778
"""
7879

7980
def __init__(
80-
self,
81-
credential: "TokenCredential",
82-
subscription_id: str,
83-
base_url: str = "https://management.azure.com",
84-
**kwargs: Any
81+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
8582
) -> None:
83+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
84+
_endpoints = get_arm_endpoints(_cloud)
85+
if not base_url:
86+
base_url = _endpoints["resource_manager"]
87+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
8688
self._config = DnsResolverManagementClientConfiguration(
87-
credential=credential, subscription_id=subscription_id, **kwargs
89+
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
8890
)
91+
8992
_policies = kwargs.pop("policies", None)
9093
if _policies is None:
9194
_policies = [
@@ -104,7 +107,7 @@ def __init__(
104107
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
105108
self._config.http_logging_policy,
106109
]
107-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
110+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
108111

109112
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
110113
self._serialize = Serializer(client_models)
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)