diff --git a/sdk/dashboard/azure-mgmt-dashboard/CHANGELOG.md b/sdk/dashboard/azure-mgmt-dashboard/CHANGELOG.md index 8268d937ee42..2df35f0e5b56 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/CHANGELOG.md +++ b/sdk/dashboard/azure-mgmt-dashboard/CHANGELOG.md @@ -1,5 +1,46 @@ # Release History +## 2.0.0 (2025-10-10) + +### Features Added + + - Model `DashboardManagementClient` added parameter `cloud_setting` in method `__init__` + - Client `DashboardManagementClient` added method `send_request` + - Client `DashboardManagementClient` added operation group `integration_fabrics` + - Client `DashboardManagementClient` added operation group `managed_dashboards` + - Model `GrafanaAvailablePlugin` added property `type` + - Model `GrafanaAvailablePlugin` added property `author` + - Model `GrafanaConfigurations` added property `snapshots` + - Model `GrafanaConfigurations` added property `users` + - Model `GrafanaConfigurations` added property `security` + - Model `GrafanaConfigurations` added property `unified_alerting_screenshots` + - Model `ManagedGrafanaProperties` added property `creator_can_admin` + - Model `ManagedGrafanaPropertiesUpdateParameters` added property `creator_can_admin` + - Model `ResourceSku` added property `size` + - Added enum `CreatorCanAdmin` + - Added model `IntegrationFabric` + - Added model `IntegrationFabricProperties` + - Added model `IntegrationFabricPropertiesUpdateParameters` + - Added model `IntegrationFabricUpdateParameters` + - Added model `ManagedDashboard` + - Added model `ManagedDashboardProperties` + - Added model `ManagedDashboardUpdateParameters` + - Added model `ProxyResource` + - Added model `Security` + - Added enum `Size` + - Added model `Snapshots` + - Added model `UnifiedAlertingScreenshots` + - Added model `Users` + - Model `GrafanaOperations` added method `begin_update` + - Added operation group `IntegrationFabricsOperations` + - Added operation group `ManagedDashboardsOperations` + +### Breaking Changes + + - Deleted or renamed model `ManagedGrafanaListResponse` + - Deleted or renamed model `ManagedPrivateEndpointModelListResponse` + - Deleted or renamed method `GrafanaOperations.update` + ## 2.0.0b1 (2025-07-31) ### Features Added diff --git a/sdk/dashboard/azure-mgmt-dashboard/MANIFEST.in b/sdk/dashboard/azure-mgmt-dashboard/MANIFEST.in index e8968adc6665..83301aa6aa83 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/MANIFEST.in +++ b/sdk/dashboard/azure-mgmt-dashboard/MANIFEST.in @@ -1,7 +1,7 @@ -recursive-include tests *.py *.json -recursive-include samples *.py *.md include *.md -include azure/__init__.py -include azure/mgmt/__init__.py include LICENSE include azure/mgmt/dashboard/py.typed +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/__init__.py +include azure/mgmt/__init__.py diff --git a/sdk/dashboard/azure-mgmt-dashboard/_metadata.json b/sdk/dashboard/azure-mgmt-dashboard/_metadata.json index b5061c49e155..0974f535a36a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/_metadata.json +++ b/sdk/dashboard/azure-mgmt-dashboard/_metadata.json @@ -1,7 +1,7 @@ { - "apiVersion": "2024-11-01-preview", - "commit": "0a8628b33f8e51b56304d616b8b50be6fa158fb3", + "apiVersion": "2025-08-01", + "commit": "b2965096067d6f8374b5485b0568fd36e7c9d099", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/dashboard/Dashboard.Management", - "emitterVersion": "0.47.0" + "emitterVersion": "0.52.1" } \ No newline at end of file diff --git a/sdk/dashboard/azure-mgmt-dashboard/apiview-properties.json b/sdk/dashboard/azure-mgmt-dashboard/apiview-properties.json index 6969216ad2e9..029402899915 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/apiview-properties.json +++ b/sdk/dashboard/azure-mgmt-dashboard/apiview-properties.json @@ -59,10 +59,12 @@ "azure.mgmt.dashboard.models.PublicNetworkAccess": "Microsoft.Dashboard.PublicNetworkAccess", "azure.mgmt.dashboard.models.ZoneRedundancy": "Microsoft.Dashboard.ZoneRedundancy", "azure.mgmt.dashboard.models.ApiKey": "Microsoft.Dashboard.ApiKey", + "azure.mgmt.dashboard.models.CreatorCanAdmin": "Microsoft.Dashboard.CreatorCanAdmin", "azure.mgmt.dashboard.models.DeterministicOutboundIP": "Microsoft.Dashboard.DeterministicOutboundIP", "azure.mgmt.dashboard.models.AutoGeneratedDomainNameLabelScope": "Microsoft.Dashboard.AutoGeneratedDomainNameLabelScope", "azure.mgmt.dashboard.models.MarketplaceAutoRenew": "Microsoft.Dashboard.MarketplaceAutoRenew", "azure.mgmt.dashboard.models.StartTLSPolicy": "Microsoft.Dashboard.StartTLSPolicy", + "azure.mgmt.dashboard.models.Size": "Microsoft.Dashboard.Size", "azure.mgmt.dashboard.models.ManagedServiceIdentityType": "Azure.ResourceManager.CommonTypes.ManagedServiceIdentityType", "azure.mgmt.dashboard.models.AvailablePromotion": "Microsoft.Dashboard.AvailablePromotion", "azure.mgmt.dashboard.models.ManagedPrivateEndpointConnectionStatus": "Microsoft.Dashboard.ManagedPrivateEndpointConnectionStatus", diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/__init__.py b/sdk/dashboard/azure-mgmt-dashboard/azure/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/__init__.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/__init__.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/__init__.py index 8db66d3d0f0f..d55ccad1f573 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/__init__.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/__init__.py @@ -1 +1 @@ -__path__ = __import__("pkgutil").extend_path(__path__, __name__) +__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_client.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_client.py index c32260d2d059..334b2f066b94 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_client.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_client.py @@ -30,6 +30,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -58,19 +59,27 @@ class DashboardManagementClient: # pylint: disable=too-many-instance-attributes :type subscription_id: str :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-11-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2025-08-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "TokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: _endpoint = "{endpoint}" - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] @@ -79,6 +88,7 @@ def __init__( credential=credential, subscription_id=subscription_id, base_url=cast(str, base_url), + cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs ) diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_configuration.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_configuration.py index a297a459d3c3..65ed742843d0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_configuration.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy @@ -14,6 +14,7 @@ from ._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials import TokenCredential @@ -29,9 +30,11 @@ class DashboardManagementClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-11-01-preview". Note that overriding this default value may result in unsupported - behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2025-08-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,9 +43,10 @@ def __init__( credential: "TokenCredential", subscription_id: str, base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-11-01-preview") + api_version: str = kwargs.pop("api_version", "2025-08-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-dashboard/{}".format(VERSION)) diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/model_base.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/model_base.py index 49d5c7259389..12926fa98dcf 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/model_base.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/model_base.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -29,6 +29,7 @@ from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null +from azure.core.rest import HttpResponse _LOGGER = logging.getLogger(__name__) @@ -345,7 +346,7 @@ def _get_model(module_name: str, model_name: str): class _MyMutableMapping(MutableMapping[str, typing.Any]): - def __init__(self, data: typing.Dict[str, typing.Any]) -> None: + def __init__(self, data: dict[str, typing.Any]) -> None: self._data = data def __contains__(self, key: typing.Any) -> bool: @@ -425,7 +426,7 @@ def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: return self._data.pop(key) return self._data.pop(key, default) - def popitem(self) -> typing.Tuple[str, typing.Any]: + def popitem(self) -> tuple[str, typing.Any]: """ Removes and returns some (key, value) pair :returns: The (key, value) pair. @@ -513,9 +514,7 @@ def _serialize(o, format: typing.Optional[str] = None): # pylint: disable=too-m return o -def _get_rest_field( - attr_to_rest_field: typing.Dict[str, "_RestField"], rest_name: str -) -> typing.Optional["_RestField"]: +def _get_rest_field(attr_to_rest_field: dict[str, "_RestField"], rest_name: str) -> typing.Optional["_RestField"]: try: return next(rf for rf in attr_to_rest_field.values() if rf._rest_name == rest_name) except StopIteration: @@ -538,7 +537,7 @@ class Model(_MyMutableMapping): _is_model = True # label whether current class's _attr_to_rest_field has been calculated # could not see _attr_to_rest_field directly because subclass inherits it from parent class - _calculated: typing.Set[str] = set() + _calculated: set[str] = set() def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ @@ -623,7 +622,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' mros = cls.__mro__[:-9][::-1] # ignore parents, and reverse the mro order - attr_to_rest_field: typing.Dict[str, _RestField] = { # map attribute name to rest_field property + attr_to_rest_field: dict[str, _RestField] = { # map attribute name to rest_field property k: v for mro_class in mros for k, v in mro_class.__dict__.items() if k[0] != "_" and hasattr(v, "_type") } annotations = { @@ -638,7 +637,7 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: rf._type = rf._get_deserialize_callable_from_annotation(annotations.get(attr, None)) if not rf._rest_name_input: rf._rest_name_input = attr - cls._attr_to_rest_field: typing.Dict[str, _RestField] = dict(attr_to_rest_field.items()) + cls._attr_to_rest_field: dict[str, _RestField] = dict(attr_to_rest_field.items()) cls._calculated.add(f"{cls.__module__}.{cls.__qualname__}") return super().__new__(cls) @@ -680,7 +679,7 @@ def _deserialize(cls, data, exist_discriminators): mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member return mapped_cls._deserialize(data, exist_discriminators) - def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: + def as_dict(self, *, exclude_readonly: bool = False) -> dict[str, typing.Any]: """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. @@ -740,7 +739,7 @@ def _deserialize_with_union(deserializers, obj): def _deserialize_dict( value_deserializer: typing.Optional[typing.Callable], module: typing.Optional[str], - obj: typing.Dict[typing.Any, typing.Any], + obj: dict[typing.Any, typing.Any], ): if obj is None: return obj @@ -750,7 +749,7 @@ def _deserialize_dict( def _deserialize_multiple_sequence( - entry_deserializers: typing.List[typing.Optional[typing.Callable]], + entry_deserializers: list[typing.Optional[typing.Callable]], module: typing.Optional[str], obj, ): @@ -771,14 +770,14 @@ def _deserialize_sequence( return type(obj)(_deserialize(deserializer, entry, module) for entry in obj) -def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.Any]: +def _sorted_annotations(types: list[typing.Any]) -> list[typing.Any]: return sorted( types, key=lambda x: hasattr(x, "__name__") and x.__name__.lower() in ("str", "float", "int", "bool"), ) -def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, @@ -843,7 +842,10 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur return functools.partial(_deserialize_with_union, deserializers) try: - if annotation._name == "Dict": # pyright: ignore + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() == "dict": value_deserializer = _get_deserialize_callable_from_annotation( annotation.__args__[1], module, rf # pyright: ignore ) @@ -856,7 +858,10 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-retur except (AttributeError, IndexError): pass try: - if annotation._name in ["List", "Set", "Tuple", "Sequence"]: # pyright: ignore + annotation_name = ( + annotation.__name__ if hasattr(annotation, "__name__") else annotation._name # pyright: ignore + ) + if annotation_name.lower() in ["list", "set", "tuple", "sequence"]: if len(annotation.__args__) > 1: # pyright: ignore entry_deserializers = [ _get_deserialize_callable_from_annotation(dt, module, rf) @@ -940,13 +945,13 @@ def _deserialize( def _failsafe_deserialize( deserializer: typing.Any, - value: typing.Any, + response: HttpResponse, module: typing.Optional[str] = None, rf: typing.Optional["_RestField"] = None, format: typing.Optional[str] = None, ) -> typing.Any: try: - return _deserialize(deserializer, value, module, rf, format) + return _deserialize(deserializer, response.json(), module, rf, format) except DeserializationError: _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True @@ -956,10 +961,10 @@ def _failsafe_deserialize( def _failsafe_deserialize_xml( deserializer: typing.Any, - value: typing.Any, + response: HttpResponse, ) -> typing.Any: try: - return _deserialize_xml(deserializer, value) + return _deserialize_xml(deserializer, response.text()) except DeserializationError: _LOGGER.warning( "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True @@ -974,11 +979,11 @@ def __init__( name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin is_discriminator: bool = False, - visibility: typing.Optional[typing.List[str]] = None, + visibility: typing.Optional[list[str]] = None, default: typing.Any = _UNSET, format: typing.Optional[str] = None, is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ): self._type = type self._rest_name_input = name @@ -1036,11 +1041,11 @@ def rest_field( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, + visibility: typing.Optional[list[str]] = None, default: typing.Any = _UNSET, format: typing.Optional[str] = None, is_multipart_file_input: bool = False, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ) -> typing.Any: return _RestField( name=name, @@ -1057,8 +1062,8 @@ def rest_discriminator( *, name: typing.Optional[str] = None, type: typing.Optional[typing.Callable] = None, # pylint: disable=redefined-builtin - visibility: typing.Optional[typing.List[str]] = None, - xml: typing.Optional[typing.Dict[str, typing.Any]] = None, + visibility: typing.Optional[list[str]] = None, + xml: typing.Optional[dict[str, typing.Any]] = None, ) -> typing.Any: return _RestField(name=name, type=type, is_discriminator=True, visibility=visibility, xml=xml) @@ -1077,9 +1082,9 @@ def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: def _get_element( o: typing.Any, exclude_readonly: bool = False, - parent_meta: typing.Optional[typing.Dict[str, typing.Any]] = None, + parent_meta: typing.Optional[dict[str, typing.Any]] = None, wrapped_element: typing.Optional[ET.Element] = None, -) -> typing.Union[ET.Element, typing.List[ET.Element]]: +) -> typing.Union[ET.Element, list[ET.Element]]: if _is_model(o): model_meta = getattr(o, "_xml", {}) @@ -1168,7 +1173,7 @@ def _get_element( def _get_wrapped_element( v: typing.Any, exclude_readonly: bool, - meta: typing.Optional[typing.Dict[str, typing.Any]], + meta: typing.Optional[dict[str, typing.Any]], ) -> ET.Element: wrapped_element = _create_xml_element( meta.get("name") if meta else None, meta.get("prefix") if meta else None, meta.get("ns") if meta else None @@ -1211,7 +1216,7 @@ def _deserialize_xml( def _convert_element(e: ET.Element): # dict case if len(e.attrib) > 0 or len({child.tag for child in e}) > 1: - dict_result: typing.Dict[str, typing.Any] = {} + dict_result: dict[str, typing.Any] = {} for child in e: if dict_result.get(child.tag) is not None: if isinstance(dict_result[child.tag], list): @@ -1224,7 +1229,7 @@ def _convert_element(e: ET.Element): return dict_result # array case if len(e) > 0: - array_result: typing.List[typing.Any] = [] + array_result: list[typing.Any] = [] for child in e: array_result.append(_convert_element(child)) return array_result diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/serialization.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/serialization.py index eb86ea23c965..45a3e44e45cb 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/serialization.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_utils/serialization.py @@ -21,7 +21,6 @@ import sys import codecs from typing import ( - Dict, Any, cast, Optional, @@ -31,7 +30,6 @@ Mapping, Callable, MutableMapping, - List, ) try: @@ -229,12 +227,12 @@ class Model: serialization and deserialization. """ - _subtype_map: Dict[str, Dict[str, Any]] = {} - _attribute_map: Dict[str, Dict[str, Any]] = {} - _validation: Dict[str, Dict[str, Any]] = {} + _subtype_map: dict[str, dict[str, Any]] = {} + _attribute_map: dict[str, dict[str, Any]] = {} + _validation: dict[str, dict[str, Any]] = {} def __init__(self, **kwargs: Any) -> None: - self.additional_properties: Optional[Dict[str, Any]] = {} + self.additional_properties: Optional[dict[str, Any]] = {} for k in kwargs: # pylint: disable=consider-using-dict-items if k not in self._attribute_map: _LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__) @@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON: def as_dict( self, keep_readonly: bool = True, - key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer, + key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer, **kwargs: Any ) -> JSON: """Return a dict that can be serialized using json.dump. @@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: def from_dict( cls, data: Any, - key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, + key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, ) -> Self: """Parse a dict using given key extractor return a model. @@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects): return {} result = dict(cls._subtype_map[key]) for valuetype in cls._subtype_map[key].values(): - result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access + result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access return result @classmethod @@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "[]": self.serialize_iter, "{}": self.serialize_dict, } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_transformer = full_restapi_key_transformer self.client_side_validation = True @@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to if attr_name == "additional_properties" and attr_desc["key"] == "": if target_obj.additional_properties is not None: - serialized.update(target_obj.additional_properties) + serialized |= target_obj.additional_properties continue try: @@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs): # If dependencies is empty, try with current data class # It has to be a subclass of Enum anyway - enum_type = self.dependencies.get(data_type, data.__class__) + enum_type = self.dependencies.get(data_type, cast(type, data.__class__)) if issubclass(enum_type, Enum): return Serializer.serialize_enum(data, enum_obj=enum_type) @@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen while "." in key: # Need the cast, as for some reasons "split" is typed as list[str | Any] - dict_keys = cast(List[str], _FLATTEN.split(key)) + dict_keys = cast(list[str], _FLATTEN.split(key)) if len(dict_keys) == 1: key = _decode_attribute_map_key(dict_keys[0]) break @@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: "duration": (isodate.Duration, datetime.timedelta), "iso-8601": (datetime.datetime), } - self.dependencies: Dict[str, type] = dict(classes) if classes else {} + self.dependencies: dict[str, type] = dict(classes) if classes else {} self.key_extractors = [rest_key_extractor, xml_key_extractor] # Additional properties only works if the "rest_key_extractor" is used to # extract the keys. Making it to work whatever the key extractor is too much diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_version.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_version.py index 0e00a6283246..8f2350dd3b0c 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_version.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0b1" +VERSION = "2.0.0" diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_client.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_client.py index 8b001ce56e2d..0e5edcb64340 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_client.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_client.py @@ -30,6 +30,7 @@ ) if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -59,19 +60,27 @@ class DashboardManagementClient: # pylint: disable=too-many-instance-attributes :type subscription_id: str :param base_url: Service host. Default value is None. :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-11-01-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :paramtype cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2025-08-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( - self, credential: "AsyncTokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + *, + cloud_setting: Optional["AzureClouds"] = None, + **kwargs: Any ) -> None: _endpoint = "{endpoint}" - _cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore + _cloud = cloud_setting or settings.current.azure_cloud # type: ignore _endpoints = get_arm_endpoints(_cloud) if not base_url: base_url = _endpoints["resource_manager"] @@ -80,6 +89,7 @@ def __init__( credential=credential, subscription_id=subscription_id, base_url=cast(str, base_url), + cloud_setting=cloud_setting, credential_scopes=credential_scopes, **kwargs ) diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_configuration.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_configuration.py index 6f098fa78705..2bce7dc4d325 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_configuration.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_configuration.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy @@ -14,6 +14,7 @@ from .._version import VERSION if TYPE_CHECKING: + from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential @@ -29,9 +30,11 @@ class DashboardManagementClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-11-01-preview". Note that overriding this default value may result in unsupported - behavior. + :param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is + None. + :type cloud_setting: ~azure.core.AzureClouds + :keyword api_version: The API version to use for this operation. Default value is "2025-08-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -40,9 +43,10 @@ def __init__( credential: "AsyncTokenCredential", subscription_id: str, base_url: str = "https://management.azure.com", + cloud_setting: Optional["AzureClouds"] = None, **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-11-01-preview") + api_version: str = kwargs.pop("api_version", "2025-08-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") @@ -52,6 +56,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.base_url = base_url + self.cloud_setting = cloud_setting self.api_version = api_version self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"]) kwargs.setdefault("sdk_moniker", "mgmt-dashboard/{}".format(VERSION)) diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_operations.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_operations.py index 20339dcfc6ff..c3450a4a5ebb 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_operations.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_operations.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload +from typing import Any, AsyncIterator, Callable, IO, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import AsyncPipelineClient @@ -73,8 +73,9 @@ from .._configuration import DashboardManagementClientConfiguration T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, dict[str, Any]], Any]] JSON = MutableMapping[str, Any] +List = list class Operations: @@ -170,7 +171,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -255,7 +256,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -288,9 +289,10 @@ async def _approve_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if body else None _content = None if isinstance(body, (IOBase, bytes)): _content = body @@ -329,7 +331,7 @@ async def _approve_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -476,6 +478,7 @@ async def begin_approve( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -574,7 +577,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -741,7 +744,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -824,7 +827,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -924,7 +927,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1007,7 +1010,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1078,7 +1081,7 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1326,7 +1329,7 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1335,6 +1338,7 @@ async def _update_initial( "str", response.headers.get("Azure-AsyncOperation") ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) deserialized = response.iter_bytes() @@ -1559,7 +1563,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1568,6 +1572,7 @@ async def _delete_initial( "str", response.headers.get("Azure-AsyncOperation") ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) deserialized = response.iter_bytes() @@ -1724,7 +1729,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1802,7 +1807,7 @@ async def get(self, resource_group_name: str, dashboard_name: str, **kwargs: Any except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1871,7 +1876,7 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2206,7 +2211,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2267,7 +2272,7 @@ async def delete(self, resource_group_name: str, dashboard_name: str, **kwargs: if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -2354,7 +2359,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2438,7 +2443,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2516,7 +2521,7 @@ async def get(self, resource_group_name: str, workspace_name: str, **kwargs: Any except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2585,7 +2590,7 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2821,7 +2826,7 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3040,7 +3045,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3197,7 +3202,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3281,7 +3286,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3343,7 +3348,7 @@ async def check_enterprise_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3412,7 +3417,7 @@ async def fetch_available_plugins( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3485,7 +3490,7 @@ async def _refresh_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3619,7 +3624,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3690,7 +3695,7 @@ async def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3949,7 +3954,7 @@ async def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4195,7 +4200,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4362,7 +4367,7 @@ async def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/aio/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/__init__.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/__init__.py index 95c5a0eb2563..4218f732f59a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/__init__.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/__init__.py @@ -71,6 +71,7 @@ AutoGeneratedDomainNameLabelScope, AvailablePromotion, CreatedByType, + CreatorCanAdmin, DeterministicOutboundIP, ManagedPrivateEndpointConnectionStatus, ManagedServiceIdentityType, @@ -80,6 +81,7 @@ PrivateEndpointServiceConnectionStatus, ProvisioningState, PublicNetworkAccess, + Size, StartTLSPolicy, ZoneRedundancy, ) @@ -142,6 +144,7 @@ "AutoGeneratedDomainNameLabelScope", "AvailablePromotion", "CreatedByType", + "CreatorCanAdmin", "DeterministicOutboundIP", "ManagedPrivateEndpointConnectionStatus", "ManagedServiceIdentityType", @@ -151,6 +154,7 @@ "PrivateEndpointServiceConnectionStatus", "ProvisioningState", "PublicNetworkAccess", + "Size", "StartTLSPolicy", "ZoneRedundancy", ] diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_enums.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_enums.py index 798522b4a691..55cc50ae7410 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_enums.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_enums.py @@ -52,6 +52,15 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The entity was created by a key.""" +class CreatorCanAdmin(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The creator will have admin access for the Grafana instance.""" + + DISABLED = "Disabled" + """Creator admin access is disabled""" + ENABLED = "Enabled" + """Creator admin access is enabled""" + + class DeterministicOutboundIP(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Type of DeterministicOutboundIP.""" @@ -148,10 +157,19 @@ class PublicNetworkAccess(str, Enum, metaclass=CaseInsensitiveEnumMeta): DISABLED = "Disabled" +class Size(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """Specifies the capacity tier of the Grafana instance.""" + + X1 = "X1" + """X1 capacity tier""" + X2 = "X2" + """X2 capacity tier""" + + class StartTLSPolicy(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The StartTLSPolicy setting of the SMTP configuration `https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy - `_. + `_. """ OPPORTUNISTIC_START_TLS = "OpportunisticStartTLS" diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_models.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_models.py index 09ca62536681..628ca5c4606e 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_models.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_models.py @@ -9,7 +9,7 @@ # pylint: disable=useless-super-delegation import datetime -from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload +from typing import Any, Mapping, Optional, TYPE_CHECKING, Union, overload from .._utils.model_base import Model as _Model, rest_field @@ -162,9 +162,9 @@ class ErrorDetail(_Model): """The error message.""" target: Optional[str] = rest_field(visibility=["read"]) """The error target.""" - details: Optional[List["_models.ErrorDetail"]] = rest_field(visibility=["read"]) + details: Optional[list["_models.ErrorDetail"]] = rest_field(visibility=["read"]) """The error details.""" - additional_info: Optional[List["_models.ErrorAdditionalInfo"]] = rest_field( + additional_info: Optional[list["_models.ErrorAdditionalInfo"]] = rest_field( name="additionalInfo", visibility=["read"] ) """The error additional info.""" @@ -205,12 +205,20 @@ class GrafanaAvailablePlugin(_Model): :vartype plugin_id: str :ivar name: Grafana plugin display name. :vartype name: str + :ivar type: Grafana plugin type. + :vartype type: str + :ivar author: Grafana plugin author/publisher name. + :vartype author: str """ plugin_id: Optional[str] = rest_field(name="pluginId", visibility=["read"]) """Grafana plugin id.""" name: Optional[str] = rest_field(visibility=["read"]) """Grafana plugin display name.""" + type: Optional[str] = rest_field(visibility=["read"]) + """Grafana plugin type.""" + author: Optional[str] = rest_field(visibility=["read"]) + """Grafana plugin author/publisher name.""" class GrafanaAvailablePluginListResponse(_Model): @@ -222,7 +230,7 @@ class GrafanaAvailablePluginListResponse(_Model): :vartype next_link: str """ - value: Optional[List["_models.GrafanaAvailablePlugin"]] = rest_field( + value: Optional[list["_models.GrafanaAvailablePlugin"]] = rest_field( visibility=["read", "create", "update", "delete", "query"] ) next_link: Optional[str] = rest_field(name="nextLink", visibility=["read", "create", "update", "delete", "query"]) @@ -231,7 +239,7 @@ class GrafanaAvailablePluginListResponse(_Model): def __init__( self, *, - value: Optional[List["_models.GrafanaAvailablePlugin"]] = None, + value: Optional[list["_models.GrafanaAvailablePlugin"]] = None, next_link: Optional[str] = None, ) -> None: ... @@ -249,23 +257,23 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class GrafanaConfigurations(_Model): """Server configurations of a Grafana instance. - :ivar smtp: Email server settings. - `https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp - `_. - :vartype smtp: ~azure.mgmt.dashboard.models.Smtp - :ivar snapshots: Grafana Snapshots settings. - :vartype snapshots: ~azure.mgmt.dashboard.models.Snapshots - :ivar users: Grafana users settings. - :vartype users: ~azure.mgmt.dashboard.models.Users - :ivar security: Grafana security settings. - :vartype security: ~azure.mgmt.dashboard.models.Security - :ivar unified_alerting_screenshots: Grafana Unified Alerting Screenshots settings. - :vartype unified_alerting_screenshots: ~azure.mgmt.dashboard.models.UnifiedAlertingScreenshots + :ivar smtp: Email server settings. + `https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp + `_. + :vartype smtp: ~azure.mgmt.dashboard.models.Smtp + :ivar snapshots: Grafana Snapshots settings. + :vartype snapshots: ~azure.mgmt.dashboard.models.Snapshots + :ivar users: Grafana users settings. + :vartype users: ~azure.mgmt.dashboard.models.Users + :ivar security: Grafana security settings. + :vartype security: ~azure.mgmt.dashboard.models.Security + :ivar unified_alerting_screenshots: Grafana Unified Alerting Screenshots settings. + :vartype unified_alerting_screenshots: ~azure.mgmt.dashboard.models.UnifiedAlertingScreenshots """ smtp: Optional["_models.Smtp"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Email server settings. - `https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp + `https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp `_.""" snapshots: Optional["_models.Snapshots"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Grafana Snapshots settings.""" @@ -309,7 +317,7 @@ class GrafanaIntegrations(_Model): list[~azure.mgmt.dashboard.models.AzureMonitorWorkspaceIntegration] """ - azure_monitor_workspace_integrations: Optional[List["_models.AzureMonitorWorkspaceIntegration"]] = rest_field( + azure_monitor_workspace_integrations: Optional[list["_models.AzureMonitorWorkspaceIntegration"]] = rest_field( name="azureMonitorWorkspaceIntegrations", visibility=["read", "create", "update", "delete", "query"] ) @@ -317,7 +325,7 @@ class GrafanaIntegrations(_Model): def __init__( self, *, - azure_monitor_workspace_integrations: Optional[List["_models.AzureMonitorWorkspaceIntegration"]] = None, + azure_monitor_workspace_integrations: Optional[list["_models.AzureMonitorWorkspaceIntegration"]] = None, ) -> None: ... @overload @@ -390,7 +398,7 @@ class TrackedResource(Resource): :vartype location: str """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" location: str = rest_field(visibility=["read", "create"]) """The geo-location where the resource lives. Required.""" @@ -400,7 +408,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -445,7 +453,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, properties: Optional["_models.IntegrationFabricProperties"] = None, ) -> None: ... @@ -492,7 +500,7 @@ class IntegrationFabricProperties(_Model): ) """The resource Id of the Azure resource which is used to configure Grafana data source. E.g., an Azure Monitor Workspace, an Azure Data Explorer cluster, etc.""" - scenarios: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + scenarios: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """A list of integration scenarios covered by this integration fabric.""" @overload @@ -501,7 +509,7 @@ def __init__( *, target_resource_id: Optional[str] = None, data_source_resource_id: Optional[str] = None, - scenarios: Optional[List[str]] = None, + scenarios: Optional[list[str]] = None, ) -> None: ... @overload @@ -522,14 +530,14 @@ class IntegrationFabricPropertiesUpdateParameters(_Model): # pylint: disable=na :vartype scenarios: list[str] """ - scenarios: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + scenarios: Optional[list[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The new integration scenarios covered by this integration fabric.""" @overload def __init__( self, *, - scenarios: Optional[List[str]] = None, + scenarios: Optional[list[str]] = None, ) -> None: ... @overload @@ -552,7 +560,7 @@ class IntegrationFabricUpdateParameters(_Model): :vartype properties: ~azure.mgmt.dashboard.models.IntegrationFabricPropertiesUpdateParameters """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The new tags of the Integration Fabric resource.""" properties: Optional["_models.IntegrationFabricPropertiesUpdateParameters"] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -563,7 +571,7 @@ class IntegrationFabricUpdateParameters(_Model): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, properties: Optional["_models.IntegrationFabricPropertiesUpdateParameters"] = None, ) -> None: ... @@ -612,7 +620,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, properties: Optional["_models.ManagedDashboardProperties"] = None, ) -> None: ... @@ -668,14 +676,14 @@ class ManagedDashboardUpdateParameters(_Model): :vartype tags: dict[str, str] """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The new tags of the managed dashboard resource.""" @overload def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -738,7 +746,7 @@ class ManagedGrafana(ProxyResource): """Properties specific to the grafana resource.""" sku: Optional["_models.ResourceSku"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The Sku of the grafana resource.""" - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" location: Optional[str] = rest_field(visibility=["read", "create"]) """The geo-location where the resource lives.""" @@ -753,7 +761,7 @@ def __init__( *, properties: Optional["_models.ManagedGrafanaProperties"] = None, sku: Optional["_models.ResourceSku"] = None, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, location: Optional[str] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, ) -> None: ... @@ -789,6 +797,9 @@ class ManagedGrafanaProperties(_Model): :ivar api_key: The api key setting of the Grafana instance. Known values are: "Disabled" and "Enabled". :vartype api_key: str or ~azure.mgmt.dashboard.models.ApiKey + :ivar creator_can_admin: The creator will have admin access for the Grafana instance. Known + values are: "Disabled" and "Enabled". + :vartype creator_can_admin: str or ~azure.mgmt.dashboard.models.CreatorCanAdmin :ivar deterministic_outbound_ip: Whether a Grafana instance uses deterministic outbound IPs. Known values are: "Disabled" and "Enabled". :vartype deterministic_outbound_ip: str or ~azure.mgmt.dashboard.models.DeterministicOutboundIP @@ -839,14 +850,19 @@ class ManagedGrafanaProperties(_Model): name="apiKey", visibility=["read", "create", "update", "delete", "query"] ) """The api key setting of the Grafana instance. Known values are: \"Disabled\" and \"Enabled\".""" + creator_can_admin: Optional[Union[str, "_models.CreatorCanAdmin"]] = rest_field( + name="creatorCanAdmin", visibility=["read", "create", "update", "delete", "query"] + ) + """The creator will have admin access for the Grafana instance. Known values are: \"Disabled\" and + \"Enabled\".""" deterministic_outbound_ip: Optional[Union[str, "_models.DeterministicOutboundIP"]] = rest_field( name="deterministicOutboundIP", visibility=["read", "create", "update", "delete", "query"] ) """Whether a Grafana instance uses deterministic outbound IPs. Known values are: \"Disabled\" and \"Enabled\".""" - outbound_i_ps: Optional[List[str]] = rest_field(name="outboundIPs", visibility=["read"]) + outbound_i_ps: Optional[list[str]] = rest_field(name="outboundIPs", visibility=["read"]) """List of outbound IPs if deterministicOutboundIP is enabled.""" - private_endpoint_connections: Optional[List["_models.PrivateEndpointConnection"]] = rest_field( + private_endpoint_connections: Optional[list["_models.PrivateEndpointConnection"]] = rest_field( name="privateEndpointConnections", visibility=["read"] ) """The private endpoint connections of the Grafana instance.""" @@ -867,7 +883,7 @@ class ManagedGrafanaProperties(_Model): name="grafanaConfigurations", visibility=["read", "create", "update", "delete", "query"] ) """Server configurations of a Grafana instance.""" - grafana_plugins: Optional[Dict[str, "_models.GrafanaPlugin"]] = rest_field( + grafana_plugins: Optional[dict[str, "_models.GrafanaPlugin"]] = rest_field( name="grafanaPlugins", visibility=["read", "create", "update", "delete", "query"] ) """Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition.""" @@ -883,6 +899,7 @@ def __init__( public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, api_key: Optional[Union[str, "_models.ApiKey"]] = None, + creator_can_admin: Optional[Union[str, "_models.CreatorCanAdmin"]] = None, deterministic_outbound_ip: Optional[Union[str, "_models.DeterministicOutboundIP"]] = None, auto_generated_domain_name_label_scope: Optional[ Union[str, "_models.AutoGeneratedDomainNameLabelScope"] @@ -890,7 +907,7 @@ def __init__( grafana_integrations: Optional["_models.GrafanaIntegrations"] = None, enterprise_configurations: Optional["_models.EnterpriseConfigurations"] = None, grafana_configurations: Optional["_models.GrafanaConfigurations"] = None, - grafana_plugins: Optional[Dict[str, "_models.GrafanaPlugin"]] = None, + grafana_plugins: Optional[dict[str, "_models.GrafanaPlugin"]] = None, grafana_major_version: Optional[str] = None, ) -> None: ... @@ -914,6 +931,9 @@ class ManagedGrafanaPropertiesUpdateParameters(_Model): :ivar api_key: The api key setting of the Grafana instance. Known values are: "Disabled" and "Enabled". :vartype api_key: str or ~azure.mgmt.dashboard.models.ApiKey + :ivar creator_can_admin: The creator will have admin access for the Grafana instance. Known + values are: "Disabled" and "Enabled". + :vartype creator_can_admin: str or ~azure.mgmt.dashboard.models.CreatorCanAdmin :ivar deterministic_outbound_ip: Whether a Grafana instance uses deterministic outbound IPs. Known values are: "Disabled" and "Enabled". :vartype deterministic_outbound_ip: str or ~azure.mgmt.dashboard.models.DeterministicOutboundIP @@ -945,6 +965,11 @@ class ManagedGrafanaPropertiesUpdateParameters(_Model): name="apiKey", visibility=["read", "create", "update", "delete", "query"] ) """The api key setting of the Grafana instance. Known values are: \"Disabled\" and \"Enabled\".""" + creator_can_admin: Optional[Union[str, "_models.CreatorCanAdmin"]] = rest_field( + name="creatorCanAdmin", visibility=["read", "create", "update", "delete", "query"] + ) + """The creator will have admin access for the Grafana instance. Known values are: \"Disabled\" and + \"Enabled\".""" deterministic_outbound_ip: Optional[Union[str, "_models.DeterministicOutboundIP"]] = rest_field( name="deterministicOutboundIP", visibility=["read", "create", "update", "delete", "query"] ) @@ -968,7 +993,7 @@ class ManagedGrafanaPropertiesUpdateParameters(_Model): name="grafanaConfigurations", visibility=["read", "create", "update", "delete", "query"] ) """Server configurations of a Grafana instance.""" - grafana_plugins: Optional[Dict[str, "_models.GrafanaPlugin"]] = rest_field( + grafana_plugins: Optional[dict[str, "_models.GrafanaPlugin"]] = rest_field( name="grafanaPlugins", visibility=["read", "create", "update", "delete", "query"] ) """Update of Grafana plugin. Key is plugin id, value is plugin definition. If plugin definition is @@ -984,12 +1009,13 @@ def __init__( *, zone_redundancy: Optional[Union[str, "_models.ZoneRedundancy"]] = None, api_key: Optional[Union[str, "_models.ApiKey"]] = None, + creator_can_admin: Optional[Union[str, "_models.CreatorCanAdmin"]] = None, deterministic_outbound_ip: Optional[Union[str, "_models.DeterministicOutboundIP"]] = None, public_network_access: Optional[Union[str, "_models.PublicNetworkAccess"]] = None, grafana_integrations: Optional["_models.GrafanaIntegrations"] = None, enterprise_configurations: Optional["_models.EnterpriseConfigurations"] = None, grafana_configurations: Optional["_models.GrafanaConfigurations"] = None, - grafana_plugins: Optional[Dict[str, "_models.GrafanaPlugin"]] = None, + grafana_plugins: Optional[dict[str, "_models.GrafanaPlugin"]] = None, grafana_major_version: Optional[str] = None, ) -> None: ... @@ -1022,7 +1048,7 @@ class ManagedGrafanaUpdateParameters(_Model): visibility=["read", "create", "update", "delete", "query"] ) """The managed identity of the grafana resource.""" - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The new tags of the grafana resource.""" properties: Optional["_models.ManagedGrafanaPropertiesUpdateParameters"] = rest_field( visibility=["read", "create", "update", "delete", "query"] @@ -1035,7 +1061,7 @@ def __init__( *, sku: Optional["_models.ResourceSku"] = None, identity: Optional["_models.ManagedServiceIdentity"] = None, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, properties: Optional["_models.ManagedGrafanaPropertiesUpdateParameters"] = None, ) -> None: ... @@ -1110,7 +1136,7 @@ def __init__( self, *, location: str, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, properties: Optional["_models.ManagedPrivateEndpointModelProperties"] = None, ) -> None: ... @@ -1181,7 +1207,7 @@ class ManagedPrivateEndpointModelProperties(_Model): name="privateLinkResourceRegion", visibility=["read", "create"] ) """The region of the resource to which the managed private endpoint is pointing to.""" - group_ids: Optional[List[str]] = rest_field(name="groupIds", visibility=["read", "create"]) + group_ids: Optional[list[str]] = rest_field(name="groupIds", visibility=["read", "create"]) """The group Ids of the managed private endpoint.""" request_message: Optional[str] = rest_field(name="requestMessage", visibility=["read", "create"]) """User input request message of the managed private endpoint.""" @@ -1202,7 +1228,7 @@ def __init__( *, private_link_resource_id: Optional[str] = None, private_link_resource_region: Optional[str] = None, - group_ids: Optional[List[str]] = None, + group_ids: Optional[list[str]] = None, request_message: Optional[str] = None, private_link_service_url: Optional[str] = None, ) -> None: ... @@ -1225,14 +1251,14 @@ class ManagedPrivateEndpointUpdateParameters(_Model): :vartype tags: dict[str, str] """ - tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + tags: Optional[dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The new tags of the managed private endpoint.""" @overload def __init__( self, *, - tags: Optional[Dict[str, str]] = None, + tags: Optional[dict[str, str]] = None, ) -> None: ... @overload @@ -1273,7 +1299,7 @@ class ManagedServiceIdentity(_Model): ) """The type of managed identity assigned to this resource. Required. Known values are: \"None\", \"SystemAssigned\", \"UserAssigned\", and \"SystemAssigned,UserAssigned\".""" - user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = rest_field( + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = rest_field( name="userAssignedIdentities", visibility=["read", "create", "update", "delete", "query"] ) """The identities assigned to this resource by the user.""" @@ -1283,7 +1309,7 @@ def __init__( self, *, type: Union[str, "_models.ManagedServiceIdentityType"], - user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None, + user_assigned_identities: Optional[dict[str, "_models.UserAssignedIdentity"]] = None, ) -> None: ... @overload @@ -1536,7 +1562,7 @@ class PrivateEndpointConnectionProperties(_Model): ) """A collection of information about the state of the connection between service consumer and provider. Required.""" - group_ids: Optional[List[str]] = rest_field( + group_ids: Optional[list[str]] = rest_field( name="groupIds", visibility=["read", "create", "update", "delete", "query"] ) """The private endpoint connection group ids.""" @@ -1552,7 +1578,7 @@ def __init__( *, private_link_service_connection_state: "_models.PrivateLinkServiceConnectionState", private_endpoint: Optional["_models.PrivateEndpoint"] = None, - group_ids: Optional[List[str]] = None, + group_ids: Optional[list[str]] = None, ) -> None: ... @overload @@ -1649,9 +1675,9 @@ class PrivateLinkResourceProperties(_Model): \"Deleting\", \"Succeeded\", \"Failed\", \"Canceled\", \"Deleted\", and \"NotSpecified\".""" group_id: Optional[str] = rest_field(name="groupId", visibility=["read"]) """The private link resource group id.""" - required_members: Optional[List[str]] = rest_field(name="requiredMembers", visibility=["read"]) + required_members: Optional[list[str]] = rest_field(name="requiredMembers", visibility=["read"]) """The private link resource required member names.""" - required_zone_names: Optional[List[str]] = rest_field( + required_zone_names: Optional[list[str]] = rest_field( name="requiredZoneNames", visibility=["read", "create", "update", "delete", "query"] ) """The private link resource Private link DNS zone name.""" @@ -1660,7 +1686,7 @@ class PrivateLinkResourceProperties(_Model): def __init__( self, *, - required_zone_names: Optional[List[str]] = None, + required_zone_names: Optional[list[str]] = None, ) -> None: ... @overload @@ -1725,16 +1751,22 @@ class ResourceSku(_Model): :ivar name: The name of the SKU. Required. :vartype name: str + :ivar size: Specifies the capacity tier of the Grafana instance. Known values are: "X1" and + "X2". + :vartype size: str or ~azure.mgmt.dashboard.models.Size """ name: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The name of the SKU. Required.""" + size: Optional[Union[str, "_models.Size"]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies the capacity tier of the Grafana instance. Known values are: \"X1\" and \"X2\".""" @overload def __init__( self, *, name: str, + size: Optional[Union[str, "_models.Size"]] = None, ) -> None: ... @overload @@ -1828,32 +1860,32 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: class Smtp(_Model): """Email server settings. `https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp - `_. - - :ivar enabled: Enable this to allow Grafana to send email. Default is false. - :vartype enabled: bool - :ivar host: SMTP server hostname with port, e.g. test.email.net:587. - :vartype host: str - :ivar user: User of SMTP auth. - :vartype user: str - :ivar password: Password of SMTP auth. If the password contains # or ;, then you have to wrap - it with triple quotes. - :vartype password: str - :ivar from_address: Address used when sending out emails + `_. + + :ivar enabled: Enable this to allow Grafana to send email. Default is false. + :vartype enabled: bool + :ivar host: SMTP server hostname with port, e.g. test.email.net:587. + :vartype host: str + :ivar user: User of SMTP auth. + :vartype user: str + :ivar password: Password of SMTP auth. If the password contains # or ;, then you have to wrap + it with triple quotes. + :vartype password: str + :ivar from_address: Address used when sending out emails `https://pkg.go.dev/net/mail#Address `_. - :vartype from_address: str - :ivar from_name: Name to be used when sending out emails. Default is "Azure Managed Grafana - Notification" + :vartype from_address: str + :ivar from_name: Name to be used when sending out emails. Default is "Azure Managed Grafana + Notification" `https://pkg.go.dev/net/mail#Address `_. - :vartype from_name: str - :ivar start_tls_policy: The StartTLSPolicy setting of the SMTP configuration + :vartype from_name: str + :ivar start_tls_policy: The StartTLSPolicy setting of the SMTP configuration `https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy - `_. Known values are: - "OpportunisticStartTLS", "MandatoryStartTLS", and "NoStartTLS". - :vartype start_tls_policy: str or ~azure.mgmt.dashboard.models.StartTLSPolicy - :ivar skip_verify: Verify SSL for SMTP server. Default is false + `_. Known values are: + "OpportunisticStartTLS", "MandatoryStartTLS", and "NoStartTLS". + :vartype start_tls_policy: str or ~azure.mgmt.dashboard.models.StartTLSPolicy + :ivar skip_verify: Verify SSL for SMTP server. Default is false `https://pkg.go.dev/crypto/tls#Config `_. - :vartype skip_verify: bool + :vartype skip_verify: bool """ enabled: Optional[bool] = rest_field(visibility=["read", "create", "update", "delete", "query"]) @@ -1869,22 +1901,22 @@ class Smtp(_Model): name="fromAddress", visibility=["read", "create", "update", "delete", "query"] ) """Address used when sending out emails - `https://pkg.go.dev/net/mail#Address `_.""" + `https://pkg.go.dev/net/mail#Address `_.""" from_name: Optional[str] = rest_field(name="fromName", visibility=["read", "create", "update", "delete", "query"]) """Name to be used when sending out emails. Default is \"Azure Managed Grafana Notification\" - `https://pkg.go.dev/net/mail#Address `_.""" + `https://pkg.go.dev/net/mail#Address `_.""" start_tls_policy: Optional[Union[str, "_models.StartTLSPolicy"]] = rest_field( name="startTLSPolicy", visibility=["read", "create", "update", "delete", "query"] ) """The StartTLSPolicy setting of the SMTP configuration - `https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy + `https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy `_. Known values are: \"OpportunisticStartTLS\", \"MandatoryStartTLS\", and \"NoStartTLS\".""" skip_verify: Optional[bool] = rest_field( name="skipVerify", visibility=["read", "create", "update", "delete", "query"] ) """Verify SSL for SMTP server. Default is false - `https://pkg.go.dev/crypto/tls#Config `_.""" + `https://pkg.go.dev/crypto/tls#Config `_.""" @overload def __init__( diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/models/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_operations.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_operations.py index 42b5edde66b9..a8dc72243ae1 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_operations.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_operations.py @@ -9,7 +9,7 @@ from collections.abc import MutableMapping from io import IOBase import json -from typing import Any, Callable, Dict, IO, Iterator, List, Optional, TypeVar, Union, cast, overload +from typing import Any, Callable, IO, Iterator, Optional, TypeVar, Union, cast, overload import urllib.parse from azure.core import PipelineClient @@ -38,8 +38,9 @@ from .._utils.serialization import Deserializer, Serializer T = TypeVar("T") -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, dict[str, Any]], Any]] JSON = MutableMapping[str, Any] +List = list _SERIALIZER = Serializer() _SERIALIZER.client_side_validation = False @@ -49,7 +50,7 @@ def build_operations_list_request(**kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -74,7 +75,7 @@ def build_private_endpoint_connections_get_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -110,7 +111,7 @@ def build_private_endpoint_connections_approve_request( # pylint: disable=name- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -144,12 +145,9 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}" path_format_arguments = { @@ -166,10 +164,7 @@ def build_private_endpoint_connections_delete_request( # pylint: disable=name-t # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_private_endpoint_connections_list_request( # pylint: disable=name-too-long @@ -178,7 +173,7 @@ def build_private_endpoint_connections_list_request( # pylint: disable=name-too _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -206,7 +201,7 @@ def build_private_link_resources_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -235,7 +230,7 @@ def build_private_link_resources_list_request( # pylint: disable=name-too-long _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -263,7 +258,7 @@ def build_integration_fabrics_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -293,7 +288,7 @@ def build_integration_fabrics_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -325,7 +320,7 @@ def build_integration_fabrics_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -353,12 +348,9 @@ def build_integration_fabrics_update_request( def build_integration_fabrics_delete_request( resource_group_name: str, workspace_name: str, integration_fabric_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/integrationFabrics/{integrationFabricName}" path_format_arguments = { @@ -373,10 +365,7 @@ def build_integration_fabrics_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_integration_fabrics_list_request( @@ -385,7 +374,7 @@ def build_integration_fabrics_list_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -413,7 +402,7 @@ def build_managed_dashboards_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -442,7 +431,7 @@ def build_managed_dashboards_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -473,7 +462,7 @@ def build_managed_dashboards_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -500,12 +489,9 @@ def build_managed_dashboards_update_request( def build_managed_dashboards_delete_request( resource_group_name: str, dashboard_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/dashboards/{dashboardName}" path_format_arguments = { @@ -519,17 +505,14 @@ def build_managed_dashboards_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_managed_dashboards_list_request(resource_group_name: str, subscription_id: str, **kwargs: Any) -> HttpRequest: _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -556,7 +539,7 @@ def build_managed_dashboards_list_by_subscription_request( # pylint: disable=na _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -582,7 +565,7 @@ def build_grafana_get_request( _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -611,7 +594,7 @@ def build_grafana_create_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -642,7 +625,7 @@ def build_grafana_update_request( _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -669,12 +652,9 @@ def build_grafana_update_request( def build_grafana_delete_request( resource_group_name: str, workspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}" path_format_arguments = { @@ -688,10 +668,7 @@ def build_grafana_delete_request( # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_grafana_list_by_resource_group_request( # pylint: disable=name-too-long @@ -700,7 +677,7 @@ def build_grafana_list_by_resource_group_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -725,7 +702,7 @@ def build_grafana_list_request(subscription_id: str, **kwargs: Any) -> HttpReque _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -751,7 +728,7 @@ def build_grafana_check_enterprise_details_request( # pylint: disable=name-too- _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -779,7 +756,7 @@ def build_grafana_fetch_available_plugins_request( # pylint: disable=name-too-l _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -804,12 +781,9 @@ def build_grafana_fetch_available_plugins_request( # pylint: disable=name-too-l def build_managed_private_endpoints_refresh_request( # pylint: disable=name-too-long resource_group_name: str, workspace_name: str, subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/refreshManagedPrivateEndpoints" path_format_arguments = { @@ -823,10 +797,7 @@ def build_managed_private_endpoints_refresh_request( # pylint: disable=name-too # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="POST", url=_url, params=_params, **kwargs) def build_managed_private_endpoints_get_request( # pylint: disable=name-too-long @@ -839,7 +810,7 @@ def build_managed_private_endpoints_get_request( # pylint: disable=name-too-lon _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -875,7 +846,7 @@ def build_managed_private_endpoints_create_request( # pylint: disable=name-too- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -913,7 +884,7 @@ def build_managed_private_endpoints_update_request( # pylint: disable=name-too- _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -947,12 +918,9 @@ def build_managed_private_endpoints_delete_request( # pylint: disable=name-too- subscription_id: str, **kwargs: Any ) -> HttpRequest: - _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) - accept = _headers.pop("Accept", "application/json") - + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) # Construct URL _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}/managedPrivateEndpoints/{managedPrivateEndpointName}" path_format_arguments = { @@ -969,10 +937,7 @@ def build_managed_private_endpoints_delete_request( # pylint: disable=name-too- # Construct parameters _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str") - # Construct headers - _headers["Accept"] = _SERIALIZER.header("accept", accept, "str") - - return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs) + return HttpRequest(method="DELETE", url=_url, params=_params, **kwargs) def build_managed_private_endpoints_list_request( # pylint: disable=name-too-long @@ -981,7 +946,7 @@ def build_managed_private_endpoints_list_request( # pylint: disable=name-too-lo _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {}) _params = case_insensitive_dict(kwargs.pop("params", {}) or {}) - api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-11-01-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-08-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -1096,7 +1061,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1181,7 +1146,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1214,9 +1179,10 @@ def _approve_initial( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None) - content_type = content_type or "application/json" + content_type = content_type or "application/json" if body else None _content = None if isinstance(body, (IOBase, bytes)): _content = body @@ -1255,7 +1221,7 @@ def _approve_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1398,6 +1364,7 @@ def begin_approve( _params = kwargs.pop("params", {}) or {} content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None)) + content_type = content_type if body else None cls: ClsType[_models.PrivateEndpointConnection] = kwargs.pop("cls", None) polling: Union[bool, PollingMethod] = kwargs.pop("polling", True) lro_delay = kwargs.pop("polling_interval", self._config.polling_interval) @@ -1496,7 +1463,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1662,7 +1629,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1745,7 +1712,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1844,7 +1811,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1927,7 +1894,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1998,7 +1965,7 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2246,7 +2213,7 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2255,6 +2222,7 @@ def _update_initial( "str", response.headers.get("Azure-AsyncOperation") ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) deserialized = response.iter_bytes() @@ -2479,7 +2447,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2488,6 +2456,7 @@ def _delete_initial( "str", response.headers.get("Azure-AsyncOperation") ) response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After")) + response_headers["location"] = self._deserialize("str", response.headers.get("location")) deserialized = response.iter_bytes() @@ -2644,7 +2613,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2722,7 +2691,7 @@ def get(self, resource_group_name: str, dashboard_name: str, **kwargs: Any) -> _ except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2791,7 +2760,7 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3126,7 +3095,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3189,7 +3158,7 @@ def delete( # pylint: disable=inconsistent-return-statements if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -3276,7 +3245,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3360,7 +3329,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -3438,7 +3407,7 @@ def get(self, resource_group_name: str, workspace_name: str, **kwargs: Any) -> _ except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -3507,7 +3476,7 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3743,7 +3712,7 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -3960,7 +3929,7 @@ def _delete_initial(self, resource_group_name: str, workspace_name: str, **kwarg except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4115,7 +4084,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4199,7 +4168,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -4261,7 +4230,7 @@ def check_enterprise_details( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4330,7 +4299,7 @@ def fetch_available_plugins( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4401,7 +4370,7 @@ def _refresh_initial(self, resource_group_name: str, workspace_name: str, **kwar except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4535,7 +4504,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -4606,7 +4575,7 @@ def _create_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -4861,7 +4830,7 @@ def _update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5103,7 +5072,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -5269,7 +5238,7 @@ def get_next(next_link=None): if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _failsafe_deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py index 8bcb627aa475..87676c65a8f0 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/azure/mgmt/dashboard/operations/_patch.py @@ -7,9 +7,9 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ -from typing import List -__all__: List[str] = [] # Add all objects you want publicly available to users at this package level + +__all__: list[str] = [] # Add all objects you want publicly available to users at this package level def patch_sdk(): diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_create.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_create.py index 48dd03feff4e..695a7928887c 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_create.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_create.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Dashboard_Create.json +# x-ms-original-file: 2025-08-01/Dashboard_Create.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_delete.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_delete.py index 3af88bcea99f..5e3e14357d31 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_delete.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_delete.py @@ -36,6 +36,6 @@ def main(): ) -# x-ms-original-file: 2024-11-01-preview/Dashboard_Delete.json +# x-ms-original-file: 2025-08-01/Dashboard_Delete.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_get.py index 00a96d6c9384..b4c0f02b01c6 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Dashboard_Get.json +# x-ms-original-file: 2025-08-01/Dashboard_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list.py index aca027270e7b..07212ece9b95 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/Dashboard_List.json +# x-ms-original-file: 2025-08-01/Dashboard_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list_by_resource_group.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list_by_resource_group.py index 0efce5f8b005..ae0abf94629f 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list_by_resource_group.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/Dashboard_ListByResourceGroup.json +# x-ms-original-file: 2025-08-01/Dashboard_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_update.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_update.py index 36b65ec4562e..eeb85aec901c 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_update.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/dashboard_update.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Dashboard_Update.json +# x-ms-original-file: 2025-08-01/Dashboard_Update.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/enterprise_details_post.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/enterprise_details_post.py index 683bc199e1f1..68b783cbac4c 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/enterprise_details_post.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/enterprise_details_post.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/EnterpriseDetails_Post.json +# x-ms-original-file: 2025-08-01/EnterpriseDetails_Post.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_create.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_create.py index 306d91f3116b..f49a1c610c8a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_create.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_create.py @@ -76,6 +76,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Grafana_Create.json +# x-ms-original-file: 2025-08-01/Grafana_Create.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_delete.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_delete.py index 54d80eab3b4c..4641c3296483 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_delete.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01-preview/Grafana_Delete.json +# x-ms-original-file: 2025-08-01/Grafana_Delete.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_fetch_available_plugins.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_fetch_available_plugins.py index 8d94c156f80d..4063ee344993 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_fetch_available_plugins.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_fetch_available_plugins.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Grafana_FetchAvailablePlugins.json +# x-ms-original-file: 2025-08-01/Grafana_FetchAvailablePlugins.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_get.py index 259cbd4c553e..de0fc3f791c4 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Grafana_Get.json +# x-ms-original-file: 2025-08-01/Grafana_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list.py index 731482d28833..d6b9196eca25 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/Grafana_List.json +# x-ms-original-file: 2025-08-01/Grafana_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list_by_resource_group.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list_by_resource_group.py index 25c5a9b4c127..8995f3cdc0b6 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list_by_resource_group.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/Grafana_ListByResourceGroup.json +# x-ms-original-file: 2025-08-01/Grafana_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_update.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_update.py index f10431b9a327..dc0b717c8f1b 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_update.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/grafana_update.py @@ -72,6 +72,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/Grafana_Update.json +# x-ms-original-file: 2025-08-01/Grafana_Update.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_create.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_create.py index 408347b226dd..bdd1606b83de 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_create.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_create.py @@ -47,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/IntegrationFabrics_Create.json +# x-ms-original-file: 2025-08-01/IntegrationFabrics_Create.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_delete.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_delete.py index d928404f9504..63a6b3575114 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_delete.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01-preview/IntegrationFabrics_Delete.json +# x-ms-original-file: 2025-08-01/IntegrationFabrics_Delete.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_get.py index 62d0a8b9b63f..d2f2c1041790 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/IntegrationFabrics_Get.json +# x-ms-original-file: 2025-08-01/IntegrationFabrics_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_list.py index 52c4b2118393..456c0ecc624c 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/IntegrationFabrics_List.json +# x-ms-original-file: 2025-08-01/IntegrationFabrics_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_update.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_update.py index 8952222f1cd3..ba121d97bc5b 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_update.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/integration_fabrics_update.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/IntegrationFabrics_Update.json +# x-ms-original-file: 2025-08-01/IntegrationFabrics_Update.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_create.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_create.py index 2da0d7e19df4..ed1f76b52fd7 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_create.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_create.py @@ -49,6 +49,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_Create.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Create.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_delete.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_delete.py index 1307ce414843..11cc16637326 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_delete.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_Delete.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Delete.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_get.py index 83ff2048d300..f61792818b3e 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_Get.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_list.py index 48f80a61a2b1..d09ebea22e41 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_List.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_patch.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_patch.py index 99da77eb70e7..e8f4df567560 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_patch.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_patch.py @@ -39,6 +39,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_Patch.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Patch.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_refresh.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_refresh.py index 1be8d49ebfa7..ccfc54381de1 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_refresh.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/managed_private_endpoints_refresh.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01-preview/ManagedPrivateEndpoints_Refresh.json +# x-ms-original-file: 2025-08-01/ManagedPrivateEndpoints_Refresh.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/operations_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/operations_list.py index b355e18a51e3..6ed39f197135 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/operations_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/operations_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/Operations_List.json +# x-ms-original-file: 2025-08-01/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_approve.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_approve.py index 4e0c5cc52835..a997eb774cc1 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_approve.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_approve.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/PrivateEndpointConnections_Approve.json +# x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Approve.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_delete.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_delete.py index 4065c23ac6a6..82101dcc40a7 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_delete.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_delete.py @@ -37,6 +37,6 @@ def main(): ).result() -# x-ms-original-file: 2024-11-01-preview/PrivateEndpointConnections_Delete.json +# x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Delete.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_get.py index ee8cfe910834..97172f67722b 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/PrivateEndpointConnections_Get.json +# x-ms-original-file: 2025-08-01/PrivateEndpointConnections_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_list.py index 59d0787cd31a..1318b1936711 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_endpoint_connections_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/PrivateEndpointConnections_List.json +# x-ms-original-file: 2025-08-01/PrivateEndpointConnections_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_get.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_get.py index 0d5c7494b7e2..f227e0732b82 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_get.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-11-01-preview/PrivateLinkResources_Get.json +# x-ms-original-file: 2025-08-01/PrivateLinkResources_Get.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_list.py b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_list.py index 5495395fcf25..91cdd3ea585e 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_list.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_samples/private_link_resources_list.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-11-01-preview/PrivateLinkResources_List.json +# x-ms-original-file: 2025-08-01/PrivateLinkResources_List.json if __name__ == "__main__": main() diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations.py b/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations.py index 186d21988c51..a62c5aec66ea 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations.py @@ -48,6 +48,7 @@ def test_grafana_begin_create(self, resource_group): "properties": { "apiKey": "str", "autoGeneratedDomainNameLabelScope": "str", + "creatorCanAdmin": "str", "deterministicOutboundIP": "str", "endpoint": "str", "enterpriseConfigurations": {"marketplaceAutoRenew": "str", "marketplacePlanId": "str"}, @@ -103,7 +104,7 @@ def test_grafana_begin_create(self, resource_group): "publicNetworkAccess": "str", "zoneRedundancy": "str", }, - "sku": {"name": "str"}, + "sku": {"name": "str", "size": "str"}, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -135,6 +136,7 @@ def test_grafana_begin_update(self, resource_group): }, "properties": { "apiKey": "str", + "creatorCanAdmin": "str", "deterministicOutboundIP": "str", "enterpriseConfigurations": {"marketplaceAutoRenew": "str", "marketplacePlanId": "str"}, "grafanaConfigurations": { @@ -161,7 +163,7 @@ def test_grafana_begin_update(self, resource_group): "publicNetworkAccess": "str", "zoneRedundancy": "str", }, - "sku": {"name": "str"}, + "sku": {"name": "str", "size": "str"}, "tags": {"str": "str"}, }, ).result() # call '.result()' to poll until service return final result diff --git a/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations_async.py b/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations_async.py index c8e575e1697b..83884e90ce9a 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations_async.py +++ b/sdk/dashboard/azure-mgmt-dashboard/generated_tests/test_dashboard_management_grafana_operations_async.py @@ -50,6 +50,7 @@ async def test_grafana_begin_create(self, resource_group): "properties": { "apiKey": "str", "autoGeneratedDomainNameLabelScope": "str", + "creatorCanAdmin": "str", "deterministicOutboundIP": "str", "endpoint": "str", "enterpriseConfigurations": {"marketplaceAutoRenew": "str", "marketplacePlanId": "str"}, @@ -105,7 +106,7 @@ async def test_grafana_begin_create(self, resource_group): "publicNetworkAccess": "str", "zoneRedundancy": "str", }, - "sku": {"name": "str"}, + "sku": {"name": "str", "size": "str"}, "systemData": { "createdAt": "2020-02-20 00:00:00", "createdBy": "str", @@ -139,6 +140,7 @@ async def test_grafana_begin_update(self, resource_group): }, "properties": { "apiKey": "str", + "creatorCanAdmin": "str", "deterministicOutboundIP": "str", "enterpriseConfigurations": {"marketplaceAutoRenew": "str", "marketplacePlanId": "str"}, "grafanaConfigurations": { @@ -165,7 +167,7 @@ async def test_grafana_begin_update(self, resource_group): "publicNetworkAccess": "str", "zoneRedundancy": "str", }, - "sku": {"name": "str"}, + "sku": {"name": "str", "size": "str"}, "tags": {"str": "str"}, }, ) diff --git a/sdk/dashboard/azure-mgmt-dashboard/pyproject.toml b/sdk/dashboard/azure-mgmt-dashboard/pyproject.toml index 540da07d41af..b243a2fda216 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/pyproject.toml +++ b/sdk/dashboard/azure-mgmt-dashboard/pyproject.toml @@ -1,6 +1,88 @@ +[build-system] +requires = [ + "setuptools>=77.0.3", + "wheel", +] +build-backend = "setuptools.build_meta" + +[project] +name = "azure-mgmt-dashboard" +authors = [ + { name = "Microsoft Corporation", email = "azpysdkhelp@microsoft.com" }, +] +description = "Microsoft Azure Dashboard Management Client Library for Python" +license = "MIT" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", +] +requires-python = ">=3.9" +keywords = [ + "azure", + "azure sdk", +] +dependencies = [ + "isodate>=0.6.1", + "azure-mgmt-core>=1.6.0", + "typing-extensions>=4.6.0", +] +dynamic = [ + "version", + "readme", +] + +[project.urls] +repository = "https://github.com/Azure/azure-sdk-for-python" + +[tool.setuptools.dynamic.version] +attr = "azure.mgmt.dashboard._version.VERSION" + +[tool.setuptools.dynamic.readme] +file = [ + "README.md", + "CHANGELOG.md", +] +content-type = "text/markdown" + +[tool.setuptools.packages.find] +exclude = [ + "tests*", + "generated_tests*", + "samples*", + "generated_samples*", + "doc*", + "azure", + "azure.mgmt", +] + +[tool.setuptools.package-data] +pytyped = [ + "py.typed", +] + [tool.azure-sdk-build] breaking = false mypy = false pyright = false type_check_samples = false verifytypes = false + +[packaging] +package_name = "azure-mgmt-dashboard" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Dashboard Management" +package_doc_id = "" +is_stable = true +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true +title = "DashboardManagementClient" +sample_link = "" +exclude_folders = "" diff --git a/sdk/dashboard/azure-mgmt-dashboard/sdk_packaging.toml b/sdk/dashboard/azure-mgmt-dashboard/sdk_packaging.toml deleted file mode 100644 index a79931b81c31..000000000000 --- a/sdk/dashboard/azure-mgmt-dashboard/sdk_packaging.toml +++ /dev/null @@ -1,10 +0,0 @@ -[packaging] -package_name = "azure-mgmt-dashboard" -package_nspkg = "azure-mgmt-nspkg" -package_pprint_name = "Dashboard Management" -package_doc_id = "" -is_stable = false -is_arm = true -need_msrestazure = false -need_azuremgmtcore = true -title = "DashboardManagementClient" diff --git a/sdk/dashboard/azure-mgmt-dashboard/setup.py b/sdk/dashboard/azure-mgmt-dashboard/setup.py deleted file mode 100644 index 2f4d2fa5e02d..000000000000 --- a/sdk/dashboard/azure-mgmt-dashboard/setup.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python - -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- - -import re -import os.path -from io import open -from setuptools import find_packages, setup - -# Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-dashboard" -PACKAGE_PPRINT_NAME = "Dashboard Management" - -# a-b-c => a/b/c -package_folder_path = PACKAGE_NAME.replace("-", "/") -# a-b-c => a.b.c -namespace_name = PACKAGE_NAME.replace("-", ".") - -# Version extraction inspired from 'requests' -with open( - os.path.join(package_folder_path, "version.py") - if os.path.exists(os.path.join(package_folder_path, "version.py")) - else os.path.join(package_folder_path, "_version.py"), - "r", -) as fd: - version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) - -if not version: - raise RuntimeError("Cannot find version information") - -with open("README.md", encoding="utf-8") as f: - readme = f.read() -with open("CHANGELOG.md", encoding="utf-8") as f: - changelog = f.read() - -setup( - name=PACKAGE_NAME, - version=version, - description="Microsoft Azure {} Client Library for Python".format(PACKAGE_PPRINT_NAME), - long_description=readme + "\n\n" + changelog, - long_description_content_type="text/markdown", - license="MIT License", - author="Microsoft Corporation", - author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python", - keywords="azure, azure sdk", # update with search keywords relevant to the azure service / product - classifiers=[ - "Development Status :: 4 - Beta", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "License :: OSI Approved :: MIT License", - ], - zip_safe=False, - packages=find_packages( - exclude=[ - "tests", - # Exclude packages that will be covered by PEP420 or nspkg - "azure", - "azure.mgmt", - ] - ), - include_package_data=True, - package_data={ - "pytyped": ["py.typed"], - }, - install_requires=[ - "isodate>=0.6.1", - "typing-extensions>=4.6.0", - "azure-common>=1.1", - "azure-mgmt-core>=1.5.0", - ], - python_requires=">=3.9", -) diff --git a/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_async_test.py b/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_async_test.py index c71f4442b400..f10324829620 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_async_test.py +++ b/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_async_test.py @@ -22,14 +22,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_dashboards_list_by_subscription(self, resource_group): - response = self.client.dashboards.list_by_subscription() + response = self.client.managed_dashboards.list_by_subscription() result = [r async for r in response] assert response @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy_async async def test_dashboards_list(self, resource_group): - response = self.client.dashboards.list( + response = self.client.managed_dashboards.list( resource_group_name=resource_group.name, ) result = [r async for r in response] diff --git a/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_test.py b/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_test.py index 911ebdbb7ff9..b1e0e7e3594e 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_test.py +++ b/sdk/dashboard/azure-mgmt-dashboard/tests/test_dashboard_management_dashboards_operations_test.py @@ -21,14 +21,14 @@ def setup_method(self, method): @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_dashboards_list_by_subscription(self, resource_group): - response = self.client.dashboards.list_by_subscription() + response = self.client.managed_dashboards.list_by_subscription() result = [r for r in response] assert response @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) @recorded_by_proxy def test_dashboards_list(self, resource_group): - response = self.client.dashboards.list( + response = self.client.managed_dashboards.list( resource_group_name=resource_group.name, ) result = [r for r in response] diff --git a/sdk/dashboard/azure-mgmt-dashboard/tsp-location.yaml b/sdk/dashboard/azure-mgmt-dashboard/tsp-location.yaml index 2df75ee8a6d0..029cf892a234 100644 --- a/sdk/dashboard/azure-mgmt-dashboard/tsp-location.yaml +++ b/sdk/dashboard/azure-mgmt-dashboard/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/dashboard/Dashboard.Management -commit: 0a8628b33f8e51b56304d616b8b50be6fa158fb3 +commit: b2965096067d6f8374b5485b0568fd36e7c9d099 repo: Azure/azure-rest-api-specs additionalDirectories: