diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/CHANGELOG.md b/sdk/servicegroups/azure-mgmt-servicegroups/CHANGELOG.md index 350052d75a09..bac3db42f99e 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/CHANGELOG.md +++ b/sdk/servicegroups/azure-mgmt-servicegroups/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 1.0.0b2 (2026-05-20) + +tool can't generate changelog for this release, please update manually. + ## 1.0.0b1 (2026-03-31) ### Other Changes diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/README.md b/sdk/servicegroups/azure-mgmt-servicegroups/README.md index 3a16d6afe685..dae1c194b5eb 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/README.md +++ b/sdk/servicegroups/azure-mgmt-servicegroups/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Service Groups Management Client Library. -This package has been tested with Python 3.9+. +This package has been tested with Python 3.10+. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). ## _Disclaimer_ @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For ### Prerequisites -- Python 3.9+ is required to use this package. +- Python 3.10+ is required to use this package. - [Azure subscription](https://azure.microsoft.com/free/) ### Install the package diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/_metadata.json b/sdk/servicegroups/azure-mgmt-servicegroups/_metadata.json index d310469b2f17..739b2c6af97c 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/_metadata.json +++ b/sdk/servicegroups/azure-mgmt-servicegroups/_metadata.json @@ -3,8 +3,8 @@ "apiVersions": { "Microsoft.Management": "2024-02-01-preview" }, - "commit": "75b0c9a8539f7c64386ff6ff10cb6c75711bdefc", + "commit": "6d50d64d3eeca46ecf1b4af80e9994bac920a7d0", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/management/resource-manager/Microsoft.Management/ServiceGroups", - "emitterVersion": "0.61.2" + "emitterVersion": "0.62.1" } \ No newline at end of file diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/apiview-properties.json b/sdk/servicegroups/azure-mgmt-servicegroups/apiview-properties.json index 94456dd34d68..af0fec6fa96c 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/apiview-properties.json +++ b/sdk/servicegroups/azure-mgmt-servicegroups/apiview-properties.json @@ -23,5 +23,6 @@ "azure.mgmt.servicegroups.aio.ServiceGroupsMgmtClient.begin_update_service_group": "Microsoft.Management.ServiceGroups.updateServiceGroup", "azure.mgmt.servicegroups.ServiceGroupsMgmtClient.begin_delete_service_group": "Microsoft.Management.ServiceGroups.deleteServiceGroup", "azure.mgmt.servicegroups.aio.ServiceGroupsMgmtClient.begin_delete_service_group": "Microsoft.Management.ServiceGroups.deleteServiceGroup" - } + }, + "CrossLanguageVersion": "c5308d55a0d6" } \ No newline at end of file diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_client.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_client.py index ffa05610c18b..cce6a1231d87 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_client.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_client.py @@ -7,8 +7,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import HttpRequest, HttpResponse @@ -21,15 +21,18 @@ from ._utils.serialization import Deserializer, Serializer from .operations import ServiceGroupsOperations, _ServiceGroupsMgmtClientOperationsMixin +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials import TokenCredential class ServiceGroupsMgmtClient(_ServiceGroupsMgmtClientOperationsMixin): - """The Groups RP provides Service Groups as a construct to group multiple resources, resource - groups, subscriptions and other service groups into an organizational hierarchy and centrally - manage access control, policies, alerting and reporting for those resources. + """ServiceGroupsMgmtClient. :ivar service_groups: ServiceGroupsOperations operations :vartype service_groups: azure.mgmt.servicegroups.operations.ServiceGroupsOperations @@ -41,8 +44,9 @@ class ServiceGroupsMgmtClient(_ServiceGroupsMgmtClientOperationsMixin): None. :paramtype cloud_setting: ~azure.core.AzureClouds :keyword api_version: The API version to use for this operation. Known values are - "2024-02-01-preview". Default value is "2024-02-01-preview". Note that overriding this default - value may result in unsupported behavior. + "2024-02-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. 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. diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_configuration.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_configuration.py index 1ced88dd286a..eb41db5d5a2a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_configuration.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_configuration.py @@ -32,8 +32,9 @@ class ServiceGroupsMgmtClientConfiguration: # pylint: disable=too-many-instance None. :type cloud_setting: ~azure.core.AzureClouds :keyword api_version: The API version to use for this operation. Known values are - "2024-02-01-preview". Default value is "2024-02-01-preview". Note that overriding this default - value may result in unsupported behavior. + "2024-02-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_patch.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_patch.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/model_base.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/model_base.py index 7b7f8ba67b53..4102784f9a85 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/model_base.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/model_base.py @@ -23,14 +23,19 @@ from json import JSONEncoder import xml.etree.ElementTree as ET from collections.abc import MutableMapping -from typing_extensions import Self import isodate from azure.core.exceptions import DeserializationError from azure.core import CaseInsensitiveEnumMeta from azure.core.pipeline import PipelineResponse from azure.core.serialization import _Null + from azure.core.rest import HttpResponse +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _LOGGER = logging.getLogger(__name__) __all__ = ["SdkJSONEncoder", "Model", "rest_field", "rest_discriminator"] @@ -595,62 +600,10 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: class_name = self.__class__.__name__ if len(args) > 1: raise TypeError(f"{class_name}.__init__() takes 2 positional arguments but {len(args) + 1} were given") - dict_to_pass = { - rest_field._rest_name: rest_field._default - for rest_field in self._attr_to_rest_field.values() - if rest_field._default is not _UNSET - } - if args: # pylint: disable=too-many-nested-blocks + dict_to_pass: dict[str, typing.Any] = {} + if args: if isinstance(args[0], ET.Element): - existed_attr_keys = [] - model_meta = getattr(self, "_xml", {}) - - for rf in self._attr_to_rest_field.values(): - prop_meta = getattr(rf, "_xml", {}) - xml_name = prop_meta.get("name", rf._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - - # attribute - if prop_meta.get("attribute", False) and args[0].get(xml_name) is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].get(xml_name)) - continue - - # unwrapped element is array - if prop_meta.get("unwrapped", False): - # unwrapped array could either use prop items meta/prop meta - if prop_meta.get("itemsName"): - xml_name = prop_meta.get("itemsName") - xml_ns = prop_meta.get("itemNs") - if xml_ns: - xml_name = "{" + xml_ns + "}" + xml_name - items = args[0].findall(xml_name) # pyright: ignore - if len(items) > 0: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, items) - elif not rf._is_optional: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = [] - continue - - # text element is primitive type - if prop_meta.get("text", False): - if args[0].text is not None: - dict_to_pass[rf._rest_name] = _deserialize(rf._type, args[0].text) - continue - - # wrapped element could be normal property or array, it should only have one element - item = args[0].find(xml_name) - if item is not None: - existed_attr_keys.append(xml_name) - dict_to_pass[rf._rest_name] = _deserialize(rf._type, item) - - # rest thing is additional properties - for e in args[0]: - if e.tag not in existed_attr_keys: - dict_to_pass[e.tag] = _convert_element(e) + dict_to_pass.update(self._init_from_xml(args[0])) else: dict_to_pass.update( {k: _create_value(_get_rest_field(self._attr_to_rest_field, k), v) for k, v in args[0].items()} @@ -667,8 +620,79 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: if v is not None } ) + # Apply client default values for fields the caller didn't set so that + # defaults are part of `_data` and therefore included during serialization. + for rf in self._attr_to_rest_field.values(): + if rf._default is _UNSET: + continue + if rf._rest_name in dict_to_pass: + continue + dict_to_pass[rf._rest_name] = _create_value(rf, rf._default) super().__init__(dict_to_pass) + def _init_from_xml(self, element: ET.Element) -> dict[str, typing.Any]: + """Deserialize an XML element into a dict mapping rest field names to values. + + :param ET.Element element: The XML element to deserialize from. + :returns: A dictionary of rest_name to deserialized value pairs. + :rtype: dict + """ + result: dict[str, typing.Any] = {} + model_meta = getattr(self, "_xml", {}) + existed_attr_keys: list[str] = [] + + for rf in self._attr_to_rest_field.values(): + prop_meta = getattr(rf, "_xml", {}) + xml_name = prop_meta.get("name", rf._rest_name) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + + # attribute + if prop_meta.get("attribute", False) and element.get(xml_name) is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, element.get(xml_name)) + continue + + # unwrapped element is array + if prop_meta.get("unwrapped", False): + # unwrapped array could either use prop items meta/prop meta + _items_name = prop_meta.get("itemsName") + if _items_name: + xml_name = _items_name + _items_ns = prop_meta.get("itemsNs") + if _items_ns is not None: + xml_ns = _items_ns + if xml_ns: + xml_name = "{" + xml_ns + "}" + xml_name + items = element.findall(xml_name) # pyright: ignore + if len(items) > 0: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, items) + elif not rf._is_optional: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = [] + continue + + # text element is primitive type + if prop_meta.get("text", False): + if element.text is not None: + result[rf._rest_name] = _deserialize(rf._type, element.text) + continue + + # wrapped element could be normal property or array, it should only have one element + item = element.find(xml_name) + if item is not None: + existed_attr_keys.append(xml_name) + result[rf._rest_name] = _deserialize(rf._type, item) + + # rest thing is additional properties + for e in element: + if e.tag not in existed_attr_keys: + result[e.tag] = _convert_element(e) + + return result + def copy(self) -> "Model": return Model(self.__dict__) @@ -721,7 +745,7 @@ def _deserialize(cls, data, exist_discriminators): model_meta = getattr(cls, "_xml", {}) prop_meta = getattr(discriminator, "_xml", {}) xml_name = prop_meta.get("name", discriminator._rest_name) - xml_ns = prop_meta.get("ns", model_meta.get("ns", None)) + xml_ns = _resolve_xml_ns(prop_meta, model_meta) if xml_ns: xml_name = "{" + xml_ns + "}" + xml_name @@ -1098,7 +1122,10 @@ def __get__(self, obj: Model, type=None): # pylint: disable=redefined-builtin # by this point, type and rest_name will have a value bc we default # them in __new__ of the Model class # Use _data.get() directly to avoid triggering __getitem__ which clears the cache - item = obj._data.get(self._rest_name) + item = obj._data.get(self._rest_name, _UNSET) + if item is _UNSET: + # Field not set by user; return the client default if one exists, otherwise None + return self._default if self._default is not _UNSET else None if item is None: return item if self._is_model: @@ -1190,6 +1217,56 @@ def serialize_xml(model: Model, exclude_readonly: bool = False) -> str: return ET.tostring(_get_element(model, exclude_readonly), encoding="unicode") # type: ignore +def _get_xml_ns(meta: dict[str, typing.Any]) -> typing.Optional[str]: + """Return the XML namespace from a metadata dict, checking both 'ns' (old-style) and 'namespace' (DPG) keys. + + :param dict meta: The metadata dictionary to extract namespace from. + :returns: The namespace string if 'ns' or 'namespace' key is present, None otherwise. + :rtype: str or None + """ + ns = meta.get("ns") + if ns is None: + ns = meta.get("namespace") + return ns + + +def _resolve_xml_ns( + prop_meta: dict[str, typing.Any], model_meta: typing.Optional[dict[str, typing.Any]] = None +) -> typing.Optional[str]: + """Resolve XML namespace for a property, falling back to model namespace when appropriate. + + Checks the property metadata first; if no namespace is found and the model does not declare + an explicit prefix, falls back to the model-level namespace. + + :param dict prop_meta: The property metadata dictionary. + :param dict model_meta: The model metadata dictionary, used as fallback. + :returns: The resolved namespace string, or None. + :rtype: str or None + """ + ns = _get_xml_ns(prop_meta) + if ns is None and model_meta is not None and not model_meta.get("prefix"): + ns = _get_xml_ns(model_meta) + return ns + + +def _set_xml_attribute(element: ET.Element, name: str, value: typing.Any, prop_meta: dict[str, typing.Any]) -> None: + """Set an XML attribute on an element, handling namespace prefix registration. + + :param ET.Element element: The element to set the attribute on. + :param str name: The default attribute name (wire name). + :param any value: The attribute value. + :param dict prop_meta: The property metadata dictionary. + """ + xml_name = prop_meta.get("name", name) + _attr_ns = _get_xml_ns(prop_meta) + if _attr_ns: + _attr_prefix = prop_meta.get("prefix") + if _attr_prefix: + _safe_register_namespace(_attr_prefix, _attr_ns) + xml_name = "{" + _attr_ns + "}" + xml_name + element.set(xml_name, _get_primitive_type_value(value)) + + def _get_element( o: typing.Any, exclude_readonly: bool = False, @@ -1201,10 +1278,16 @@ def _get_element( # if prop is a model, then use the prop element directly, else generate a wrapper of model if wrapped_element is None: + # When serializing as an array item (parent_meta is set), check if the parent has an + # explicit itemsName. This ensures correct element names for unwrapped arrays (where + # the element tag is the property/items name, not the model type name). + _items_name = parent_meta.get("itemsName") if parent_meta is not None else None + element_name = _items_name if _items_name else (model_meta.get("name") or o.__class__.__name__) + _model_ns = _get_xml_ns(model_meta) wrapped_element = _create_xml_element( - model_meta.get("name", o.__class__.__name__), + element_name, model_meta.get("prefix"), - model_meta.get("ns"), + _model_ns, ) readonly_props = [] @@ -1226,7 +1309,9 @@ def _get_element( # additional properties will not have rest field, use the wire name as xml name prop_meta = {"name": k} - # if no ns for prop, use model's + # Propagate model namespace to properties only for old-style "ns"-keyed models. + # DPG-generated models use the "namespace" key and explicitly declare namespace on + # each property that needs it, so propagation is intentionally skipped for them. if prop_meta.get("ns") is None and model_meta.get("ns"): prop_meta["ns"] = model_meta.get("ns") prop_meta["prefix"] = model_meta.get("prefix") @@ -1238,12 +1323,7 @@ def _get_element( # text could only set on primitive type wrapped_element.text = _get_primitive_type_value(v) elif prop_meta.get("attribute", False): - xml_name = prop_meta.get("name", k) - if prop_meta.get("ns"): - ET.register_namespace(prop_meta.get("prefix"), prop_meta.get("ns")) # pyright: ignore - xml_name = "{" + prop_meta.get("ns") + "}" + xml_name # pyright: ignore - # attribute should be primitive type - wrapped_element.set(xml_name, _get_primitive_type_value(v)) + _set_xml_attribute(wrapped_element, k, v, prop_meta) else: # other wrapped prop element wrapped_element.append(_get_wrapped_element(v, exclude_readonly, prop_meta)) @@ -1252,6 +1332,7 @@ def _get_element( return [_get_element(x, exclude_readonly, parent_meta) for x in o] # type: ignore if isinstance(o, dict): result = [] + _dict_ns = _get_xml_ns(parent_meta) if parent_meta else None for k, v in o.items(): result.append( _get_wrapped_element( @@ -1259,7 +1340,7 @@ def _get_element( exclude_readonly, { "name": k, - "ns": parent_meta.get("ns") if parent_meta else None, + "ns": _dict_ns, "prefix": parent_meta.get("prefix") if parent_meta else None, }, ) @@ -1268,13 +1349,16 @@ def _get_element( # primitive case need to create element based on parent_meta if parent_meta: + _items_ns = parent_meta.get("itemsNs") + if _items_ns is None: + _items_ns = _get_xml_ns(parent_meta) return _get_wrapped_element( o, exclude_readonly, { "name": parent_meta.get("itemsName", parent_meta.get("name")), "prefix": parent_meta.get("itemsPrefix", parent_meta.get("prefix")), - "ns": parent_meta.get("itemsNs", parent_meta.get("ns")), + "ns": _items_ns, }, ) @@ -1286,8 +1370,9 @@ def _get_wrapped_element( exclude_readonly: bool, meta: typing.Optional[dict[str, typing.Any]], ) -> ET.Element: + _meta_ns = _get_xml_ns(meta) if meta else None 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 + meta.get("name") if meta else None, meta.get("prefix") if meta else None, _meta_ns ) if isinstance(v, (dict, list)): wrapped_element.extend(_get_element(v, exclude_readonly, meta)) @@ -1308,11 +1393,29 @@ def _get_primitive_type_value(v) -> str: return str(v) +def _safe_register_namespace(prefix: str, ns: str) -> None: + """Register an XML namespace prefix, handling reserved prefix patterns. + + Some prefixes (e.g. 'ns2') match Python's reserved 'ns\\d+' pattern used for + auto-generated prefixes, causing register_namespace to raise ValueError. + Falls back to directly registering in the internal namespace map. + + :param str prefix: The namespace prefix to register. + :param str ns: The namespace URI. + """ + try: + ET.register_namespace(prefix, ns) + except ValueError: + _ns_map = getattr(ET, "_namespace_map", None) + if _ns_map is not None: + _ns_map[ns] = prefix + + def _create_xml_element( tag: typing.Any, prefix: typing.Optional[str] = None, ns: typing.Optional[str] = None ) -> ET.Element: if prefix and ns: - ET.register_namespace(prefix, ns) + _safe_register_namespace(prefix, ns) if ns: return ET.Element("{" + ns + "}" + tag) return ET.Element(tag) diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/serialization.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/serialization.py index 81ec1de5922b..954bf7ebffa7 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/serialization.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_utils/serialization.py @@ -39,11 +39,15 @@ import xml.etree.ElementTree as ET import isodate # type: ignore -from typing_extensions import Self from azure.core.exceptions import DeserializationError, SerializationError from azure.core.serialization import NULL as CoreNull +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self + _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") JSON = MutableMapping[str, Any] diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_version.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_version.py index be71c81bd282..bbcd28b4aa67 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_version.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_client.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_client.py index 34821eb1b1d9..accc73650697 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_client.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_client.py @@ -7,8 +7,8 @@ # -------------------------------------------------------------------------- from copy import deepcopy +import sys from typing import Any, Awaitable, Optional, TYPE_CHECKING, cast -from typing_extensions import Self from azure.core.pipeline import policies from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -21,15 +21,18 @@ from ._configuration import ServiceGroupsMgmtClientConfiguration from .operations import ServiceGroupsOperations, _ServiceGroupsMgmtClientOperationsMixin +if sys.version_info >= (3, 11): + from typing import Self +else: + from typing_extensions import Self # type: ignore + if TYPE_CHECKING: from azure.core import AzureClouds from azure.core.credentials_async import AsyncTokenCredential class ServiceGroupsMgmtClient(_ServiceGroupsMgmtClientOperationsMixin): - """The Groups RP provides Service Groups as a construct to group multiple resources, resource - groups, subscriptions and other service groups into an organizational hierarchy and centrally - manage access control, policies, alerting and reporting for those resources. + """ServiceGroupsMgmtClient. :ivar service_groups: ServiceGroupsOperations operations :vartype service_groups: azure.mgmt.servicegroups.aio.operations.ServiceGroupsOperations @@ -41,8 +44,9 @@ class ServiceGroupsMgmtClient(_ServiceGroupsMgmtClientOperationsMixin): None. :paramtype cloud_setting: ~azure.core.AzureClouds :keyword api_version: The API version to use for this operation. Known values are - "2024-02-01-preview". Default value is "2024-02-01-preview". Note that overriding this default - value may result in unsupported behavior. + "2024-02-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. 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. diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_configuration.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_configuration.py index 1d8e60691da7..b2ff566deb10 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_configuration.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_configuration.py @@ -32,8 +32,9 @@ class ServiceGroupsMgmtClientConfiguration: # pylint: disable=too-many-instance None. :type cloud_setting: ~azure.core.AzureClouds :keyword api_version: The API version to use for this operation. Known values are - "2024-02-01-preview". Default value is "2024-02-01-preview". Note that overriding this default - value may result in unsupported behavior. + "2024-02-01-preview" and None. Default value is None. If not set, the operation's default API + version will be used. Note that overriding this default value may result in unsupported + behavior. :paramtype api_version: str """ diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_patch.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_patch.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/operations/_patch.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/operations/_patch.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/aio/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/models/_patch.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/models/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/models/_patch.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/models/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/operations/_patch.py b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/operations/_patch.py index 87676c65a8f0..ea765788358a 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/operations/_patch.py +++ b/sdk/servicegroups/azure-mgmt-servicegroups/azure/mgmt/servicegroups/operations/_patch.py @@ -8,7 +8,6 @@ Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize """ - __all__: list[str] = [] # Add all objects you want publicly available to users at this package level diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/pyproject.toml b/sdk/servicegroups/azure-mgmt-servicegroups/pyproject.toml index 4c3a437b9e55..3fd62875e6fa 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/pyproject.toml +++ b/sdk/servicegroups/azure-mgmt-servicegroups/pyproject.toml @@ -17,13 +17,12 @@ classifiers = [ "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" +requires-python = ">=3.10" keywords = [ "azure", "azure sdk", diff --git a/sdk/servicegroups/azure-mgmt-servicegroups/tsp-location.yaml b/sdk/servicegroups/azure-mgmt-servicegroups/tsp-location.yaml index 5be3a9bd3bff..68b0e419c7fe 100644 --- a/sdk/servicegroups/azure-mgmt-servicegroups/tsp-location.yaml +++ b/sdk/servicegroups/azure-mgmt-servicegroups/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/management/resource-manager/Microsoft.Management/ServiceGroups -commit: 75b0c9a8539f7c64386ff6ff10cb6c75711bdefc +commit: 6d50d64d3eeca46ecf1b4af80e9994bac920a7d0 repo: Azure/azure-rest-api-specs additionalDirectories: