Skip to content

[AutoPR azure-mgmt-dns] [TSP Migration][dns] TypeSpec migrated from swagger #11641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions sdk/network/azure-mgmt-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Release History

## 9.0.0 (2025-04-29)

### Features Added

- Model RecordSet has a new parameter system_data
- Model Resource has a new parameter system_data
- Model TrackedResource has a new parameter system_data

### Breaking Changes

- Model Resource no longer has parameter location
- Model Resource no longer has parameter tags
- Operation DnsResourceReferenceOperations.get_by_target_resources has a new required parameter body
- Operation DnsResourceReferenceOperations.get_by_target_resources no longer has parameter parameters
- Operation DnssecConfigsOperations.begin_create_or_update has a new required parameter resource
- Parameter value of model DnssecConfigListResult is now required
- Parameter value of model RecordSetListResult is now required
- Parameter value of model ZoneListResult is now required

## 8.2.0 (2024-10-22)

### Features Added
Expand Down
6 changes: 3 additions & 3 deletions sdk/network/azure-mgmt-dns/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure DNS Management Client Library.
This package has been tested with Python 3.8+.
This package has been tested with Python 3.9+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.8+ is required to use this package.
- Python 3.9+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand All @@ -24,7 +24,7 @@ pip install azure-identity

### Authentication

By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down
6 changes: 3 additions & 3 deletions sdk/network/azure-mgmt-dns/_meta.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"commit": "7189fb57f69468c56df76f9a4d68dd9ff04ab100",
"commit": "16d1d38b083ac3aca22a4ae2bb6343a425f0747a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/python@6.19.0",
"@autorest/python@6.34.1",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/dns/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",
"autorest_command": "autorest specification/dns/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",
"readme": "specification/dns/resource-manager/readme.md",
"package-2023-07-preview": "2024-01-03 09:33:30 -0800 389c6c7476ec7c6585b002b44a9dacfb5c88b71a Microsoft.Network/preview/2023-07-01-preview/dns.json",
"package-2018-05": "2020-11-17 18:50:08 -0800 b47a32169e59378d8005aabb5358e3f4ddf10766 Microsoft.Network/stable/2018-05-01/dns.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@
# regenerated.
# --------------------------------------------------------------------------

from typing import Any, Optional, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING, cast
from typing_extensions import Self

from azure.core.pipeline import policies
from azure.core.settings import settings
from azure.mgmt.core import ARMPipelineClient
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
from azure.mgmt.core.tools import get_arm_endpoints
from azure.profiles import KnownProfiles, ProfileDefinition
from azure.profiles.multiapiclient import MultiApiClientMixin

from ._configuration import DnsManagementClientConfiguration
from ._serialization import Deserializer, Serializer
from ._utils.serialization import Deserializer, Serializer

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

class _SDKClient(object):
def __init__(self, *args, **kwargs):
"""This is a fake class to support current implemetation of MultiApiClientMixin."
"""This is a fake class to support current implementation of MultiApiClientMixin."
Will be removed in final version of multiapi azure-core based client
"""
pass
Expand Down Expand Up @@ -70,13 +72,18 @@ def __init__(
credential: "TokenCredential",
subscription_id: str,
api_version: Optional[str]=None,
base_url: str = "https://management.azure.com",
base_url: Optional[str] = None,
profile: KnownProfiles=KnownProfiles.default,
**kwargs: Any
):
if api_version:
kwargs.setdefault('api_version', api_version)
self._config = DnsManagementClientConfiguration(credential, subscription_id, **kwargs)
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = DnsManagementClientConfiguration(credential, subscription_id, credential_scopes=credential_scopes, **kwargs)
_policies = kwargs.pop("policies", None)
if _policies is None:
_policies = [
Expand All @@ -95,7 +102,7 @@ def __init__(
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
self._config.http_logging_policy,
]
self._client = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, base_url), policies=_policies, **kwargs)
super(DnsManagementClient, self).__init__(
api_version=api_version,
profile=profile
Expand Down
10 changes: 10 additions & 0 deletions sdk/network/azure-mgmt-dns/azure/mgmt/dns/_utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
Loading