Skip to content

Commit 37c997b

Browse files
author
SDKAuto
committed
CodeGen from PR 34557 in Azure/azure-rest-api-specs
Merge a213fd099357f9197321a952a82eee274d88dc40 into 761d8b58e465b26eddb8ad70dda3cde7b4228bdf
1 parent d6612d0 commit 37c997b

40 files changed

+222
-193
lines changed

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

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

3+
## 1.0.0b2 (2025-05-09)
4+
5+
### Features Added
6+
7+
- Model `ExportDependenciesRequest` added property `appliance_name`
8+
- Method `ExportDependenciesRequest.__init__` has a new overload `def __init__(self: None, focused_machine_id: Optional[str], filters: Optional[_models.DependencyMapVisualizationFilter], appliance_name: Optional[str])`
9+
310
## 1.0.0b1 (2025-04-20)
411

512
### Other Changes

sdk/dependencymap/azure-mgmt-dependencymap/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 Dependencymap 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"commit": "9e4890d02ec714b4b1465e1ca4767ae6bf5cb004",
2+
"commit": "90dae9674cd8c2d8d9a812820e8ff26c496b7e4f",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"typespec_src": "specification/azuredependencymap/DependencyMap.Management",
5-
"@azure-tools/typespec-python": "0.40.0"
5+
"@azure-tools/typespec-python": "0.44.2"
66
}

sdk/dependencymap/azure-mgmt-dependencymap/apiview-properties.json

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,37 @@
2929
"azure.mgmt.dependencymap.models.ProvisioningState": "Microsoft.DependencyMap.ProvisioningState",
3030
"azure.mgmt.dependencymap.models.ProcessNameFilterOperator": "Microsoft.DependencyMap.ProcessNameFilterOperator",
3131
"azure.mgmt.dependencymap.models.SourceType": "Microsoft.DependencyMap.SourceType",
32-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.operations.list": "Azure.ResourceManager.Operations.list",
33-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.get": "Microsoft.DependencyMap.Maps.get",
34-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_create_or_update": "Microsoft.DependencyMap.Maps.createOrUpdate",
35-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_update": "Microsoft.DependencyMap.Maps.update",
36-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_delete": "Microsoft.DependencyMap.Maps.delete",
37-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.list_by_resource_group": "Microsoft.DependencyMap.Maps.listByResourceGroup",
38-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.list_by_subscription": "Microsoft.DependencyMap.Maps.listBySubscription",
39-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_get_dependency_view_for_focused_machine": "Microsoft.DependencyMap.Maps.getDependencyViewForFocusedMachine",
40-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_get_connections_with_connected_machine_for_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsWithConnectedMachineForFocusedMachine",
41-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_get_connections_for_process_on_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsForProcessOnFocusedMachine",
42-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.maps.begin_export_dependencies": "Microsoft.DependencyMap.Maps.exportDependencies",
43-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.discovery_sources.get": "Microsoft.DependencyMap.DiscoverySources.get",
44-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.discovery_sources.begin_create_or_update": "Microsoft.DependencyMap.DiscoverySources.createOrUpdate",
45-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.discovery_sources.begin_update": "Microsoft.DependencyMap.DiscoverySources.update",
46-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.discovery_sources.begin_delete": "Microsoft.DependencyMap.DiscoverySources.delete",
47-
"azure.mgmt.dependencymap.DependencyMapMgmtClient.discovery_sources.list_by_maps_resource": "Microsoft.DependencyMap.DiscoverySources.listByMapsResource"
32+
"azure.mgmt.dependencymap.operations.Operations.list": "Azure.ResourceManager.Operations.list",
33+
"azure.mgmt.dependencymap.aio.operations.Operations.list": "Azure.ResourceManager.Operations.list",
34+
"azure.mgmt.dependencymap.operations.MapsOperations.get": "Microsoft.DependencyMap.Maps.get",
35+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.get": "Microsoft.DependencyMap.Maps.get",
36+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_create_or_update": "Microsoft.DependencyMap.Maps.createOrUpdate",
37+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_create_or_update": "Microsoft.DependencyMap.Maps.createOrUpdate",
38+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_update": "Microsoft.DependencyMap.Maps.update",
39+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_update": "Microsoft.DependencyMap.Maps.update",
40+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_delete": "Microsoft.DependencyMap.Maps.delete",
41+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_delete": "Microsoft.DependencyMap.Maps.delete",
42+
"azure.mgmt.dependencymap.operations.MapsOperations.list_by_resource_group": "Microsoft.DependencyMap.Maps.listByResourceGroup",
43+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.list_by_resource_group": "Microsoft.DependencyMap.Maps.listByResourceGroup",
44+
"azure.mgmt.dependencymap.operations.MapsOperations.list_by_subscription": "Microsoft.DependencyMap.Maps.listBySubscription",
45+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.list_by_subscription": "Microsoft.DependencyMap.Maps.listBySubscription",
46+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_get_dependency_view_for_focused_machine": "Microsoft.DependencyMap.Maps.getDependencyViewForFocusedMachine",
47+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_get_dependency_view_for_focused_machine": "Microsoft.DependencyMap.Maps.getDependencyViewForFocusedMachine",
48+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_get_connections_with_connected_machine_for_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsWithConnectedMachineForFocusedMachine",
49+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_get_connections_with_connected_machine_for_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsWithConnectedMachineForFocusedMachine",
50+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_get_connections_for_process_on_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsForProcessOnFocusedMachine",
51+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_get_connections_for_process_on_focused_machine": "Microsoft.DependencyMap.Maps.getConnectionsForProcessOnFocusedMachine",
52+
"azure.mgmt.dependencymap.operations.MapsOperations.begin_export_dependencies": "Microsoft.DependencyMap.Maps.exportDependencies",
53+
"azure.mgmt.dependencymap.aio.operations.MapsOperations.begin_export_dependencies": "Microsoft.DependencyMap.Maps.exportDependencies",
54+
"azure.mgmt.dependencymap.operations.DiscoverySourcesOperations.get": "Microsoft.DependencyMap.DiscoverySources.get",
55+
"azure.mgmt.dependencymap.aio.operations.DiscoverySourcesOperations.get": "Microsoft.DependencyMap.DiscoverySources.get",
56+
"azure.mgmt.dependencymap.operations.DiscoverySourcesOperations.begin_create_or_update": "Microsoft.DependencyMap.DiscoverySources.createOrUpdate",
57+
"azure.mgmt.dependencymap.aio.operations.DiscoverySourcesOperations.begin_create_or_update": "Microsoft.DependencyMap.DiscoverySources.createOrUpdate",
58+
"azure.mgmt.dependencymap.operations.DiscoverySourcesOperations.begin_update": "Microsoft.DependencyMap.DiscoverySources.update",
59+
"azure.mgmt.dependencymap.aio.operations.DiscoverySourcesOperations.begin_update": "Microsoft.DependencyMap.DiscoverySources.update",
60+
"azure.mgmt.dependencymap.operations.DiscoverySourcesOperations.begin_delete": "Microsoft.DependencyMap.DiscoverySources.delete",
61+
"azure.mgmt.dependencymap.aio.operations.DiscoverySourcesOperations.begin_delete": "Microsoft.DependencyMap.DiscoverySources.delete",
62+
"azure.mgmt.dependencymap.operations.DiscoverySourcesOperations.list_by_maps_resource": "Microsoft.DependencyMap.DiscoverySources.listByMapsResource",
63+
"azure.mgmt.dependencymap.aio.operations.DiscoverySourcesOperations.list_by_maps_resource": "Microsoft.DependencyMap.DiscoverySources.listByMapsResource"
4864
}
4965
}

sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_client.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,18 @@
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 ._configuration import DependencyMapMgmtClientConfiguration
19-
from ._serialization import Deserializer, Serializer
21+
from ._utils.serialization import Deserializer, Serializer
2022
from .operations import DiscoverySourcesOperations, MapsOperations, Operations
2123

2224
if TYPE_CHECKING:
@@ -36,27 +38,33 @@ class DependencyMapMgmtClient:
3638
:type credential: ~azure.core.credentials.TokenCredential
3739
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3840
:type subscription_id: str
39-
:param base_url: Service host. Default value is "https://management.azure.com".
41+
:param base_url: Service host. Default value is None.
4042
:type base_url: str
4143
:keyword api_version: The API version to use for this operation. Default value is
42-
"2025-01-31-preview". Note that overriding this default value may result in unsupported
44+
"2025-05-01-preview". Note that overriding this default value may result in unsupported
4345
behavior.
4446
:paramtype api_version: str
4547
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
4648
Retry-After header is present.
4749
"""
4850

4951
def __init__(
50-
self,
51-
credential: "TokenCredential",
52-
subscription_id: str,
53-
base_url: str = "https://management.azure.com",
54-
**kwargs: Any
52+
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
5553
) -> None:
5654
_endpoint = "{endpoint}"
55+
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
56+
_endpoints = get_arm_endpoints(_cloud)
57+
if not base_url:
58+
base_url = _endpoints["resource_manager"]
59+
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
5760
self._config = DependencyMapMgmtClientConfiguration(
58-
credential=credential, subscription_id=subscription_id, base_url=base_url, **kwargs
61+
credential=credential,
62+
subscription_id=subscription_id,
63+
base_url=cast(str, base_url),
64+
credential_scopes=credential_scopes,
65+
**kwargs
5966
)
67+
6068
_policies = kwargs.pop("policies", None)
6169
if _policies is None:
6270
_policies = [
@@ -75,7 +83,7 @@ def __init__(
7583
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
7684
self._config.http_logging_policy,
7785
]
78-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=_endpoint, policies=_policies, **kwargs)
86+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=cast(str, _endpoint), policies=_policies, **kwargs)
7987

8088
self._serialize = Serializer()
8189
self._deserialize = Deserializer()

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DependencyMapMgmtClientConfiguration: # pylint: disable=too-many-instance
3030
:param base_url: Service host. Default value is "https://management.azure.com".
3131
:type base_url: str
3232
:keyword api_version: The API version to use for this operation. Default value is
33-
"2025-01-31-preview". Note that overriding this default value may result in unsupported
33+
"2025-05-01-preview". Note that overriding this default value may result in unsupported
3434
behavior.
3535
:paramtype api_version: str
3636
"""
@@ -42,7 +42,7 @@ def __init__(
4242
base_url: str = "https://management.azure.com",
4343
**kwargs: Any
4444
) -> None:
45-
api_version: str = kwargs.pop("api_version", "2025-01-31-preview")
45+
api_version: str = kwargs.pop("api_version", "2025-05-01-preview")
4646

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

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# ------------------------------------
2-
# Copyright (c) Microsoft Corporation.
3-
# Licensed under the MIT License.
4-
# ------------------------------------
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+
# --------------------------------------------------------------------------
56
"""Customize generated code here.
67
78
Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
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) Python Code Generator.
5+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
6+
# --------------------------------------------------------------------------

sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_model_base.py renamed to sdk/dependencymap/azure-mgmt-dependencymap/azure/mgmt/dependencymap/_utils/model_base.py

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# coding=utf-8
33
# --------------------------------------------------------------------------
44
# Copyright (c) Microsoft Corporation. All rights reserved.
5-
# Licensed under the MIT License. See License.txt in the project root for
6-
# license information.
5+
# Licensed under the MIT License. See License.txt in the project root for license information.
6+
# Code generated by Microsoft (R) Python Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
78
# --------------------------------------------------------------------------
89
# pylint: disable=protected-access, broad-except
910

@@ -21,18 +22,14 @@
2122
from datetime import datetime, date, time, timedelta, timezone
2223
from json import JSONEncoder
2324
import xml.etree.ElementTree as ET
25+
from collections.abc import MutableMapping
2426
from typing_extensions import Self
2527
import isodate
2628
from azure.core.exceptions import DeserializationError
2729
from azure.core import CaseInsensitiveEnumMeta
2830
from azure.core.pipeline import PipelineResponse
2931
from azure.core.serialization import _Null
3032

31-
if sys.version_info >= (3, 9):
32-
from collections.abc import MutableMapping
33-
else:
34-
from typing import MutableMapping
35-
3633
_LOGGER = logging.getLogger(__name__)
3734

3835
__all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"]
@@ -347,7 +344,7 @@ def _get_model(module_name: str, model_name: str):
347344
_UNSET = object()
348345

349346

350-
class _MyMutableMapping(MutableMapping[str, typing.Any]): # pylint: disable=unsubscriptable-object
347+
class _MyMutableMapping(MutableMapping[str, typing.Any]):
351348
def __init__(self, data: typing.Dict[str, typing.Any]) -> None:
352349
self._data = data
353350

@@ -407,13 +404,13 @@ def get(self, key: str, default: typing.Any = None) -> typing.Any:
407404
return default
408405

409406
@typing.overload
410-
def pop(self, key: str) -> typing.Any: ...
407+
def pop(self, key: str) -> typing.Any: ... # pylint: disable=arguments-differ
411408

412409
@typing.overload
413-
def pop(self, key: str, default: _T) -> _T: ...
410+
def pop(self, key: str, default: _T) -> _T: ... # pylint: disable=signature-differs
414411

415412
@typing.overload
416-
def pop(self, key: str, default: typing.Any) -> typing.Any: ...
413+
def pop(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
417414

418415
def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
419416
"""
@@ -443,7 +440,7 @@ def clear(self) -> None:
443440
"""
444441
self._data.clear()
445442

446-
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
443+
def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: # pylint: disable=arguments-differ
447444
"""
448445
Updates D from mapping/iterable E and F.
449446
:param any args: Either a mapping object or an iterable of key-value pairs.
@@ -454,7 +451,7 @@ def update(self, *args: typing.Any, **kwargs: typing.Any) -> None:
454451
def setdefault(self, key: str, default: None = None) -> None: ...
455452

456453
@typing.overload
457-
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ...
454+
def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... # pylint: disable=signature-differs
458455

459456
def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any:
460457
"""
@@ -644,7 +641,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self:
644641
cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items())
645642
cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}")
646643

647-
return super().__new__(cls) # pylint: disable=no-value-for-parameter
644+
return super().__new__(cls)
648645

649646
def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None:
650647
for base in cls.__bases__:
@@ -680,7 +677,7 @@ def _deserialize(cls, data, exist_discriminators):
680677
discriminator_value = data.find(xml_name).text # pyright: ignore
681678
else:
682679
discriminator_value = data.get(discriminator._rest_name)
683-
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore
680+
mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member
684681
return mapped_cls._deserialize(data, exist_discriminators)
685682

686683
def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]:

0 commit comments

Comments
 (0)