diff --git a/sdk/standbypool/azure-mgmt-standbypool/CHANGELOG.md b/sdk/standbypool/azure-mgmt-standbypool/CHANGELOG.md index 017e4f65d61b..bf9da7f8f4b9 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/CHANGELOG.md +++ b/sdk/standbypool/azure-mgmt-standbypool/CHANGELOG.md @@ -1,5 +1,41 @@ # Release History +## 2.0.0 (2025-04-11) + +### Features Added + + - Model `ContainerGroupInstanceCountSummary` added property `zone` + - Model `StandbyContainerGroupPoolResourceProperties` added property `zones` + - Model `StandbyContainerGroupPoolResourceUpdateProperties` added property `zones` + - Model `StandbyContainerGroupPoolRuntimeViewResourceProperties` added property `status` + - Model `StandbyContainerGroupPoolRuntimeViewResourceProperties` added property `prediction` + - Model `StandbyVirtualMachinePoolRuntimeViewResourceProperties` added property `status` + - Model `StandbyVirtualMachinePoolRuntimeViewResourceProperties` added property `prediction` + - Enum `VirtualMachineState` added member `HIBERNATED` + - Added enum `HealthStateCode` + - Added enum `PoolContainerGroupState` + - Added model `PoolContainerGroupStateCount` + - Added model `PoolStatus` + - Added enum `PoolVirtualMachineState` + - Added model `PoolVirtualMachineStateCount` + - Added model `StandbyContainerGroupPoolForecastValues` + - Added model `StandbyContainerGroupPoolPrediction` + - Added model `StandbyVirtualMachinePoolForecastValues` + - Added model `StandbyVirtualMachinePoolPrediction` + - Method `ContainerGroupInstanceCountSummary.__init__` has a new overload `def __init__(self: None, instance_counts_by_state: List[_models.PoolContainerGroupStateCount], zone: Optional[int])` + - Method `Operation.__init__` has a new overload `def __init__(self: None, display: Optional[_models.OperationDisplay])` + - Method `StandbyContainerGroupPoolResourceProperties.__init__` has a new overload `def __init__(self: None, elasticity_profile: _models.StandbyContainerGroupPoolElasticityProfile, container_group_properties: _models.ContainerGroupProperties, zones: Optional[List[str]])` + - Method `StandbyContainerGroupPoolResourceUpdateProperties.__init__` has a new overload `def __init__(self: None, elasticity_profile: Optional[_models.StandbyContainerGroupPoolElasticityProfile], container_group_properties: Optional[_models.ContainerGroupProperties], zones: Optional[List[str]])` + - Method `VirtualMachineInstanceCountSummary.__init__` has a new overload `def __init__(self: None, instance_counts_by_state: List[_models.PoolVirtualMachineStateCount], zone: Optional[int])` + - Method `PoolContainerGroupStateCount.__init__` has a new overload `def __init__(self: None, state: Union[str, _models.PoolContainerGroupState], count: int)` + - Method `PoolContainerGroupStateCount.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + - Method `PoolVirtualMachineStateCount.__init__` has a new overload `def __init__(self: None, state: Union[str, _models.PoolVirtualMachineState], count: int)` + - Method `PoolVirtualMachineStateCount.__init__` has a new overload `def __init__(self: None, mapping: Mapping[str, Any])` + +### Breaking Changes + + - Deleted or renamed model `PoolResourceStateCount` + ## 1.0.0 (2024-09-25) ### Features Added diff --git a/sdk/standbypool/azure-mgmt-standbypool/README.md b/sdk/standbypool/azure-mgmt-standbypool/README.md index 2e4f1d586dcd..55b720ea1cf8 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/README.md +++ b/sdk/standbypool/azure-mgmt-standbypool/README.md @@ -24,7 +24,7 @@ pip install azure-identity ### Authentication -By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables. +By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. diff --git a/sdk/standbypool/azure-mgmt-standbypool/_meta.json b/sdk/standbypool/azure-mgmt-standbypool/_meta.json index 3e4fe5c69a6f..5bdc7eb4dc6f 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/_meta.json +++ b/sdk/standbypool/azure-mgmt-standbypool/_meta.json @@ -1,6 +1,6 @@ { - "commit": "e695076ad458a3eac3d6943f9e923544ff52b1e4", + "commit": "af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/standbypool/StandbyPool.Management", - "@azure-tools/typespec-python": "0.31.1" + "@azure-tools/typespec-python": "0.42.2" } \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json b/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json new file mode 100644 index 000000000000..58f8c68ef5d8 --- /dev/null +++ b/sdk/standbypool/azure-mgmt-standbypool/apiview-properties.json @@ -0,0 +1,70 @@ +{ + "CrossLanguagePackageId": "Microsoft.StandbyPool", + "CrossLanguageDefinitionId": { + "azure.mgmt.standbypool.models.ContainerGroupInstanceCountSummary": "Microsoft.StandbyPool.ContainerGroupInstanceCountSummary", + "azure.mgmt.standbypool.models.ContainerGroupProfile": "Microsoft.StandbyPool.ContainerGroupProfile", + "azure.mgmt.standbypool.models.ContainerGroupProperties": "Microsoft.StandbyPool.ContainerGroupProperties", + "azure.mgmt.standbypool.models.ErrorAdditionalInfo": "Azure.ResourceManager.CommonTypes.ErrorAdditionalInfo", + "azure.mgmt.standbypool.models.ErrorDetail": "Azure.ResourceManager.CommonTypes.ErrorDetail", + "azure.mgmt.standbypool.models.ErrorResponse": "Azure.ResourceManager.CommonTypes.ErrorResponse", + "azure.mgmt.standbypool.models.Operation": "Azure.ResourceManager.CommonTypes.Operation", + "azure.mgmt.standbypool.models.OperationDisplay": "Azure.ResourceManager.CommonTypes.OperationDisplay", + "azure.mgmt.standbypool.models.PoolContainerGroupStateCount": "Microsoft.StandbyPool.PoolContainerGroupStateCount", + "azure.mgmt.standbypool.models.PoolStatus": "Microsoft.StandbyPool.PoolStatus", + "azure.mgmt.standbypool.models.PoolVirtualMachineStateCount": "Microsoft.StandbyPool.PoolVirtualMachineStateCount", + "azure.mgmt.standbypool.models.Resource": "Azure.ResourceManager.CommonTypes.Resource", + "azure.mgmt.standbypool.models.ProxyResource": "Azure.ResourceManager.CommonTypes.ProxyResource", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolElasticityProfile": "Microsoft.StandbyPool.StandbyContainerGroupPoolElasticityProfile", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolForecastValues": "Microsoft.StandbyPool.StandbyContainerGroupPoolForecastValues", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolPrediction": "Microsoft.StandbyPool.StandbyContainerGroupPoolPrediction", + "azure.mgmt.standbypool.models.TrackedResource": "Azure.ResourceManager.CommonTypes.TrackedResource", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource": "Microsoft.StandbyPool.StandbyContainerGroupPoolResource", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceProperties": "Microsoft.StandbyPool.StandbyContainerGroupPoolResourceProperties", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResource": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResource", + "azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResourceProperties": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViewResourceProperties", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolElasticityProfile": "Microsoft.StandbyPool.StandbyVirtualMachinePoolElasticityProfile", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolForecastValues": "Microsoft.StandbyPool.StandbyVirtualMachinePoolForecastValues", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolPrediction": "Microsoft.StandbyPool.StandbyVirtualMachinePoolPrediction", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResource", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachinePoolResourceProperties", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceUpdate": "Azure.ResourceManager.Foundations.ResourceUpdateModel", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties": "Azure.ResourceManager.Foundations.ResourceUpdateModelProperties", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResource": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResource", + "azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViewResourceProperties", + "azure.mgmt.standbypool.models.StandbyVirtualMachineResource": "Microsoft.StandbyPool.StandbyVirtualMachineResource", + "azure.mgmt.standbypool.models.StandbyVirtualMachineResourceProperties": "Microsoft.StandbyPool.StandbyVirtualMachineResourceProperties", + "azure.mgmt.standbypool.models.Subnet": "Microsoft.StandbyPool.Subnet", + "azure.mgmt.standbypool.models.SystemData": "Azure.ResourceManager.CommonTypes.SystemData", + "azure.mgmt.standbypool.models.VirtualMachineInstanceCountSummary": "Microsoft.StandbyPool.VirtualMachineInstanceCountSummary", + "azure.mgmt.standbypool.models.Origin": "Azure.ResourceManager.CommonTypes.Origin", + "azure.mgmt.standbypool.models.ActionType": "Azure.ResourceManager.CommonTypes.ActionType", + "azure.mgmt.standbypool.models.CreatedByType": "Azure.ResourceManager.CommonTypes.createdByType", + "azure.mgmt.standbypool.models.VirtualMachineState": "Microsoft.StandbyPool.VirtualMachineState", + "azure.mgmt.standbypool.models.ProvisioningState": "Microsoft.StandbyPool.ProvisioningState", + "azure.mgmt.standbypool.models.PoolVirtualMachineState": "Microsoft.StandbyPool.PoolVirtualMachineState", + "azure.mgmt.standbypool.models.HealthStateCode": "Microsoft.StandbyPool.HealthStateCode", + "azure.mgmt.standbypool.models.RefillPolicy": "Microsoft.StandbyPool.RefillPolicy", + "azure.mgmt.standbypool.models.PoolContainerGroupState": "Microsoft.StandbyPool.PoolContainerGroupState", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.operations.list": "Azure.ResourceManager.Operations.list", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.get": "Microsoft.StandbyPool.StandbyVirtualMachinePools.get", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.createOrUpdate", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.begin_delete": "Microsoft.StandbyPool.StandbyVirtualMachinePools.delete", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.update": "Microsoft.StandbyPool.StandbyVirtualMachinePools.update", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listByResourceGroup", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyVirtualMachinePools.listBySubscription", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.get": "Microsoft.StandbyPool.StandbyVirtualMachines.get", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machines.list_by_standby_virtual_machine_pool_resource": "Microsoft.StandbyPool.StandbyVirtualMachines.listByStandbyVirtualMachinePoolResource", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.get", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_virtual_machine_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyVirtualMachinePoolRuntimeViews.listByStandbyPool", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.get": "Microsoft.StandbyPool.StandbyContainerGroupPools.get", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_create_or_update": "Microsoft.StandbyPool.StandbyContainerGroupPools.createOrUpdate", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.begin_delete": "Microsoft.StandbyPool.StandbyContainerGroupPools.delete", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.update": "Microsoft.StandbyPool.StandbyContainerGroupPools.update", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_resource_group": "Microsoft.StandbyPool.StandbyContainerGroupPools.listByResourceGroup", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pools.list_by_subscription": "Microsoft.StandbyPool.StandbyContainerGroupPools.listBySubscription", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.get": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.get", + "azure.mgmt.standbypool.StandbyPoolMgmtClient.standby_container_group_pool_runtime_views.list_by_standby_pool": "Microsoft.StandbyPool.StandbyContainerGroupPoolRuntimeViews.listByStandbyPool" + } +} \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/__init__.py index a3ea11613bb0..74bce6678210 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/__init__.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/__init__.py @@ -5,15 +5,21 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._client import StandbyPoolMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import StandbyPoolMgmtClient # type: ignore from ._version import VERSION __version__ = VERSION try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -21,6 +27,6 @@ __all__ = [ "StandbyPoolMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py index 7aa263829c91..838d5a06be96 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class StandbyPoolMgmtClient: """StandbyPoolMgmtClient. :ivar operations: Operations operations @@ -59,7 +58,7 @@ class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keywo :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-03-01". + :keyword api_version: The API version to use for this operation. Default value is "2025-03-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 diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_configuration.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_configuration.py index e8956f714462..8d17b6ced765 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_configuration.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_configuration.py @@ -14,11 +14,10 @@ from ._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StandbyPoolMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -30,7 +29,7 @@ class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-a :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-03-01". + :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-03-01") + api_version: str = kwargs.pop("api_version", "2025-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py index 12ad7f29c71e..065b17f67c46 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_model_base.py @@ -1,10 +1,12 @@ +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines +# pylint: disable=protected-access, broad-except import copy import calendar @@ -372,15 +374,34 @@ def __ne__(self, other: typing.Any) -> bool: return not self.__eq__(other) def keys(self) -> typing.KeysView[str]: + """ + :returns: a set-like object providing a view on D's keys + :rtype: ~typing.KeysView + """ return self._data.keys() def values(self) -> typing.ValuesView[typing.Any]: + """ + :returns: an object providing a view on D's values + :rtype: ~typing.ValuesView + """ return self._data.values() def items(self) -> typing.ItemsView[str, typing.Any]: + """ + :returns: set-like object providing a view on D's items + :rtype: ~typing.ItemsView + """ return self._data.items() def get(self, key: str, default: typing.Any = None) -> typing.Any: + """ + Get the value for key if key is in the dictionary, else default. + :param str key: The key to look up. + :param any default: The value to return if key is not in the dictionary. Defaults to None + :returns: D[k] if k in D, else d. + :rtype: any + """ try: return self[key] except KeyError: @@ -396,17 +417,38 @@ def pop(self, key: str, default: _T) -> _T: ... def pop(self, key: str, default: typing.Any) -> typing.Any: ... def pop(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Removes specified key and return the corresponding value. + :param str key: The key to pop. + :param any default: The value to return if key is not in the dictionary + :returns: The value corresponding to the key. + :rtype: any + :raises KeyError: If key is not found and default is not given. + """ if default is _UNSET: return self._data.pop(key) return self._data.pop(key, default) def popitem(self) -> typing.Tuple[str, typing.Any]: + """ + Removes and returns some (key, value) pair + :returns: The (key, value) pair. + :rtype: tuple + :raises KeyError: if D is empty. + """ return self._data.popitem() def clear(self) -> None: + """ + Remove all items from D. + """ self._data.clear() def update(self, *args: typing.Any, **kwargs: typing.Any) -> None: + """ + Updates D from mapping/iterable E and F. + :param any args: Either a mapping object or an iterable of key-value pairs. + """ self._data.update(*args, **kwargs) @typing.overload @@ -416,6 +458,13 @@ def setdefault(self, key: str, default: None = None) -> None: ... def setdefault(self, key: str, default: typing.Any) -> typing.Any: ... def setdefault(self, key: str, default: typing.Any = _UNSET) -> typing.Any: + """ + Same as calling D.get(k, d), and setting D[k]=d if k not found + :param str key: The key to look up. + :param any default: The value to set if key is not in the dictionary + :returns: D[k] if k in D, else d. + :rtype: any + """ if default is _UNSET: return self._data.setdefault(key) return self._data.setdefault(key, default) @@ -573,7 +622,7 @@ def __init__(self, *args: typing.Any, **kwargs: typing.Any) -> None: def copy(self) -> "Model": return Model(self.__dict__) - def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: disable=unused-argument + def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: if f"{cls.__module__}.{cls.__qualname__}" not in cls._calculated: # we know the last nine classes in mro are going to be 'Model', '_MyMutableMapping', 'MutableMapping', # 'Mapping', 'Collection', 'Sized', 'Iterable', 'Container' and 'object' @@ -584,8 +633,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di annotations = { k: v for mro_class in mros - if hasattr(mro_class, "__annotations__") # pylint: disable=no-member - for k, v in mro_class.__annotations__.items() # pylint: disable=no-member + if hasattr(mro_class, "__annotations__") + for k, v in mro_class.__annotations__.items() } for attr, rf in attr_to_rest_field.items(): rf._module = cls.__module__ @@ -600,8 +649,8 @@ def __new__(cls, *args: typing.Any, **kwargs: typing.Any) -> Self: # pylint: di def __init_subclass__(cls, discriminator: typing.Optional[str] = None) -> None: for base in cls.__bases__: - if hasattr(base, "__mapping__"): # pylint: disable=no-member - base.__mapping__[discriminator or cls.__name__] = cls # type: ignore # pylint: disable=no-member + if hasattr(base, "__mapping__"): + base.__mapping__[discriminator or cls.__name__] = cls # type: ignore @classmethod def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField"]: @@ -612,7 +661,7 @@ def _get_discriminator(cls, exist_discriminators) -> typing.Optional["_RestField @classmethod def _deserialize(cls, data, exist_discriminators): - if not hasattr(cls, "__mapping__"): # pylint: disable=no-member + if not hasattr(cls, "__mapping__"): return cls(data) discriminator = cls._get_discriminator(exist_discriminators) if discriminator is None: @@ -632,11 +681,11 @@ def _deserialize(cls, data, exist_discriminators): discriminator_value = data.find(xml_name).text # pyright: ignore else: discriminator_value = data.get(discriminator._rest_name) - mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore # pylint: disable=no-member + mapped_cls = cls.__mapping__.get(discriminator_value, cls) # pyright: ignore return mapped_cls._deserialize(data, exist_discriminators) def as_dict(self, *, exclude_readonly: bool = False) -> typing.Dict[str, typing.Any]: - """Return a dict that can be JSONify using json.dump. + """Return a dict that can be turned into json using json.dump. :keyword bool exclude_readonly: Whether to remove the readonly properties. :returns: A dict JSON compatible object @@ -733,7 +782,7 @@ def _sorted_annotations(types: typing.List[typing.Any]) -> typing.List[typing.An ) -def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, R0912 +def _get_deserialize_callable_from_annotation( # pylint: disable=too-many-return-statements, too-many-branches annotation: typing.Any, module: typing.Optional[str], rf: typing.Optional["_RestField"] = None, @@ -753,7 +802,7 @@ def _get_deserialize_callable_from_annotation( # pylint: disable=R0911, R0915, except AttributeError: model_name = annotation if module is not None: - annotation = _get_model(module, model_name) + annotation = _get_model(module, model_name) # type: ignore try: if module and _is_model(annotation): @@ -893,6 +942,35 @@ def _deserialize( return _deserialize_with_callable(deserializer, value) +def _failsafe_deserialize( + deserializer: typing.Any, + value: typing.Any, + 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) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + +def _failsafe_deserialize_xml( + deserializer: typing.Any, + value: typing.Any, +) -> typing.Any: + try: + return _deserialize_xml(deserializer, value) + except DeserializationError: + _LOGGER.warning( + "Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True + ) + return None + + class _RestField: def __init__( self, diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py index 01a226bd7f14..eb86ea23c965 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_serialization.py @@ -1,28 +1,10 @@ -# 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. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) Python Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pyright: reportUnnecessaryTypeIgnoreComment=false @@ -48,9 +30,7 @@ IO, Mapping, Callable, - TypeVar, MutableMapping, - Type, List, ) @@ -61,13 +41,13 @@ 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 _BOM = codecs.BOM_UTF8.decode(encoding="utf-8") -ModelType = TypeVar("ModelType", bound="Model") JSON = MutableMapping[str, Any] @@ -185,73 +165,7 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]], except NameError: _long_type = int - -class UTC(datetime.tzinfo): - """Time Zone info for handling UTC""" - - def utcoffset(self, dt): - """UTF offset for UTC is 0. - - :param datetime.datetime dt: The datetime - :returns: The offset - :rtype: datetime.timedelta - """ - return datetime.timedelta(0) - - def tzname(self, dt): - """Timestamp representation. - - :param datetime.datetime dt: The datetime - :returns: The timestamp representation - :rtype: str - """ - return "Z" - - def dst(self, dt): - """No daylight saving for UTC. - - :param datetime.datetime dt: The datetime - :returns: The daylight saving time - :rtype: datetime.timedelta - """ - return datetime.timedelta(hours=1) - - -try: - from datetime import timezone as _FixedOffset # type: ignore -except ImportError: # Python 2.7 - - class _FixedOffset(datetime.tzinfo): # type: ignore - """Fixed offset in minutes east from UTC. - Copy/pasted from Python doc - :param datetime.timedelta offset: offset in timedelta format - """ - - def __init__(self, offset): - self.__offset = offset - - def utcoffset(self, dt): - return self.__offset - - def tzname(self, dt): - return str(self.__offset.total_seconds() / 3600) - - def __repr__(self): - return "".format(self.tzname(None)) - - def dst(self, dt): - return datetime.timedelta(0) - - def __getinitargs__(self): - return (self.__offset,) - - -try: - from datetime import timezone - - TZ_UTC = timezone.utc -except ImportError: - TZ_UTC = UTC() # type: ignore +TZ_UTC = datetime.timezone.utc _FLATTEN = re.compile(r"(? ModelType: + def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self: """Parse a str using the RestAPI syntax and return a model. :param str data: A str using RestAPI structure. JSON by default. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) return deserializer(cls.__name__, data, content_type=content_type) # type: ignore @classmethod def from_dict( - cls: Type[ModelType], + cls, data: Any, key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None, content_type: Optional[str] = None, - ) -> ModelType: + ) -> Self: """Parse a dict using given key extractor return a model. By default consider key @@ -479,8 +393,8 @@ def from_dict( :param function key_extractors: A key extractor function. :param str content_type: JSON by default, set application/xml if XML. :returns: An instance of this model - :raises: DeserializationError if something went wrong - :rtype: ModelType + :raises DeserializationError: if something went wrong + :rtype: Self """ deserializer = Deserializer(cls._infer_class_models()) deserializer.key_extractors = ( # type: ignore @@ -507,7 +421,6 @@ def _flatten_subtype(cls, key, objects): def _classify(cls, response, objects): """Check the class _subtype_map for any child classes. We want to ignore any inherited _subtype_maps. - Remove the polymorphic key from the initial data. :param dict response: The initial data :param dict objects: The class objects @@ -519,7 +432,7 @@ def _classify(cls, response, objects): if not isinstance(response, ET.Element): rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1] - subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None) + subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None) else: subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response) if subtype_value: @@ -564,7 +477,7 @@ def _decode_attribute_map_key(key): return key.replace("\\.", ".") -class Serializer(object): # pylint: disable=too-many-public-methods +class Serializer: # pylint: disable=too-many-public-methods """Request object model serializer.""" basic_types = {str: "str", int: "int", bool: "bool", float: "float"} @@ -599,7 +512,7 @@ class Serializer(object): # pylint: disable=too-many-public-methods "multiple": lambda x, y: x % y != 0, } - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.serialize_type = { "iso-8601": Serializer.serialize_iso, "rfc-1123": Serializer.serialize_rfc, @@ -627,7 +540,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to :param object target_obj: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, dict - :raises: SerializationError if serialization fails. + :raises SerializationError: if serialization fails. :returns: The serialized data. """ key_transformer = kwargs.get("key_transformer", self.key_transformer) @@ -737,8 +650,8 @@ def body(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: dict - :raises: SerializationError if serialization fails. - :raises: ValueError if data is None + :raises SerializationError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized request body """ @@ -782,8 +695,8 @@ def url(self, name, data, data_type, **kwargs): :param str data_type: The type to be serialized from. :rtype: str :returns: The serialized URL path - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None """ try: output = self.serialize_data(data, data_type, **kwargs) @@ -806,8 +719,8 @@ def query(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str, list - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized query parameter """ try: @@ -836,8 +749,8 @@ def header(self, name, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. :rtype: str - :raises: TypeError if serialization fails. - :raises: ValueError if data is None + :raises TypeError: if serialization fails. + :raises ValueError: if data is None :returns: The serialized header """ try: @@ -856,9 +769,9 @@ def serialize_data(self, data, data_type, **kwargs): :param object data: The data to be serialized. :param str data_type: The type to be serialized from. - :raises: AttributeError if required data is None. - :raises: ValueError if data is None - :raises: SerializationError if serialization fails. + :raises AttributeError: if required data is None. + :raises ValueError: if data is None + :raises SerializationError: if serialization fails. :returns: The serialized data. :rtype: str, int, float, bool, dict, list """ @@ -1193,7 +1106,7 @@ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: TypeError if format invalid. + :raises TypeError: if format invalid. :return: serialized rfc """ try: @@ -1219,7 +1132,7 @@ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: str - :raises: SerializationError if format invalid. + :raises SerializationError: if format invalid. :return: serialized iso """ if isinstance(attr, str): @@ -1252,7 +1165,7 @@ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument :param Datetime attr: Object to be serialized. :rtype: int - :raises: SerializationError if format invalid + :raises SerializationError: if format invalid :return: serialied unix """ if isinstance(attr, int): @@ -1430,7 +1343,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument # Iter and wrapped, should have found one node only (the wrap one) if len(children) != 1: raise DeserializationError( - "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long + "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( xml_name ) ) @@ -1442,7 +1355,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument return children[0] -class Deserializer(object): +class Deserializer: """Response object model deserializer. :param dict classes: Class type dictionary for deserializing complex types. @@ -1453,7 +1366,7 @@ class Deserializer(object): valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?") - def __init__(self, classes: Optional[Mapping[str, type]] = None): + def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None: self.deserialize_type = { "iso-8601": Deserializer.deserialize_iso, "rfc-1123": Deserializer.deserialize_rfc, @@ -1489,7 +1402,7 @@ def __call__(self, target_obj, response_data, content_type=None): :param str target_obj: Target data type to deserialize to. :param requests.Response response_data: REST response object. :param str content_type: Swagger "produces" if available. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1503,7 +1416,7 @@ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return :param str target_obj: Target data type to deserialize to. :param object data: Object to deserialize. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1684,17 +1597,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None): subtype = getattr(response, "_subtype_map", {}) try: readonly = [ - k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("readonly") ] const = [ - k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access + k + for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore + if v.get("constant") ] kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const} response_obj = response(**kwargs) for attr in readonly: setattr(response_obj, attr, attrs.get(attr)) if additional_properties: - response_obj.additional_properties = additional_properties + response_obj.additional_properties = additional_properties # type: ignore return response_obj except TypeError as err: msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore @@ -1714,7 +1631,7 @@ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return- :param str data: The response string to be deserialized. :param str data_type: The type to deserialize to. - :raises: DeserializationError if deserialization fails. + :raises DeserializationError: if deserialization fails. :return: Deserialized object. :rtype: object """ @@ -1796,7 +1713,7 @@ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return :param dict attr: Dictionary to be deserialized. :return: Deserialized object. :rtype: dict - :raises: TypeError if non-builtin datatype encountered. + :raises TypeError: if non-builtin datatype encountered. """ if attr is None: return None @@ -1842,7 +1759,7 @@ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return :param str data_type: deserialization data type. :return: Deserialized basic type. :rtype: str, int, float or bool - :raises: TypeError if string format is not valid. + :raises TypeError: if string format is not valid. """ # If we're here, data is supposed to be a basic type. # If it's still an XML node, take the text @@ -1933,7 +1850,7 @@ def deserialize_bytearray(attr): :param str attr: response string to be deserialized. :return: Deserialized bytearray :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1946,7 +1863,7 @@ def deserialize_base64(attr): :param str attr: response string to be deserialized. :return: Deserialized base64 string :rtype: bytearray - :raises: TypeError if string format invalid. + :raises TypeError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1961,7 +1878,7 @@ def deserialize_decimal(attr): :param str attr: response string to be deserialized. :return: Deserialized decimal - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. :rtype: decimal """ if isinstance(attr, ET.Element): @@ -1979,7 +1896,7 @@ def deserialize_long(attr): :param str attr: response string to be deserialized. :return: Deserialized int :rtype: long or int - :raises: ValueError if string format invalid. + :raises ValueError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -1992,7 +1909,7 @@ def deserialize_duration(attr): :param str attr: response string to be deserialized. :return: Deserialized duration :rtype: TimeDelta - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2010,7 +1927,7 @@ def deserialize_date(attr): :param str attr: response string to be deserialized. :return: Deserialized date :rtype: Date - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2026,7 +1943,7 @@ def deserialize_time(attr): :param str attr: response string to be deserialized. :return: Deserialized time :rtype: datetime.time - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2041,14 +1958,14 @@ def deserialize_rfc(attr): :param str attr: response string to be deserialized. :return: Deserialized RFC datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text try: parsed_date = email.utils.parsedate_tz(attr) # type: ignore date_obj = datetime.datetime( - *parsed_date[:6], tzinfo=_FixedOffset(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) + *parsed_date[:6], tzinfo=datetime.timezone(datetime.timedelta(minutes=(parsed_date[9] or 0) / 60)) ) if not date_obj.tzinfo: date_obj = date_obj.astimezone(tz=TZ_UTC) @@ -2064,7 +1981,7 @@ def deserialize_iso(attr): :param str attr: response string to be deserialized. :return: Deserialized ISO datetime :rtype: Datetime - :raises: DeserializationError if string format invalid. + :raises DeserializationError: if string format invalid. """ if isinstance(attr, ET.Element): attr = attr.text @@ -2102,7 +2019,7 @@ def deserialize_unix(attr): :param int attr: Object to be serialized. :return: Deserialized datetime :rtype: Datetime - :raises: DeserializationError if format invalid + :raises DeserializationError: if format invalid """ if isinstance(attr, ET.Element): attr = int(attr.text) # type: ignore diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py index 0ec13ea52bbf..8f2350dd3b0c 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "2.0.0" diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/__init__.py index 91b6ee862656..87a5f090533e 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/__init__.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/__init__.py @@ -5,12 +5,18 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._client import StandbyPoolMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import StandbyPoolMgmtClient # type: ignore try: from ._patch import __all__ as _patch_all - from ._patch import * # pylint: disable=unused-wildcard-import + from ._patch import * except ImportError: _patch_all = [] from ._patch import patch_sdk as _patch_sdk @@ -18,6 +24,6 @@ __all__ = [ "StandbyPoolMgmtClient", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py index 68015b82e8d6..36c987258b90 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_client.py @@ -27,11 +27,10 @@ ) if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class StandbyPoolMgmtClient: """StandbyPoolMgmtClient. :ivar operations: Operations operations @@ -59,7 +58,7 @@ class StandbyPoolMgmtClient: # pylint: disable=client-accepts-api-version-keywo :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-03-01". + :keyword api_version: The API version to use for this operation. Default value is "2025-03-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 diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_configuration.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_configuration.py index 5125e06ebbb8..c81d9bafc16c 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_configuration.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_configuration.py @@ -14,11 +14,10 @@ from .._version import VERSION if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for StandbyPoolMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -30,7 +29,7 @@ class StandbyPoolMgmtClientConfiguration: # pylint: disable=too-many-instance-a :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-03-01". + :keyword api_version: The API version to use for this operation. Default value is "2025-03-01". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -42,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-03-01") + api_version: str = kwargs.pop("api_version", "2025-03-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/__init__.py index 12acea673adc..71fe7806df8e 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/__init__.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/__init__.py @@ -5,16 +5,22 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._operations import StandbyVirtualMachinePoolsOperations -from ._operations import StandbyVirtualMachinesOperations -from ._operations import StandbyVirtualMachinePoolRuntimeViewsOperations -from ._operations import StandbyContainerGroupPoolsOperations -from ._operations import StandbyContainerGroupPoolRuntimeViewsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import StandbyVirtualMachinePoolsOperations # type: ignore +from ._operations import StandbyVirtualMachinesOperations # type: ignore +from ._operations import StandbyVirtualMachinePoolRuntimeViewsOperations # type: ignore +from ._operations import StandbyContainerGroupPoolsOperations # type: ignore +from ._operations import StandbyContainerGroupPoolRuntimeViewsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -25,5 +31,5 @@ "StandbyContainerGroupPoolsOperations", "StandbyContainerGroupPoolRuntimeViewsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py index f8bd49760400..069d8577bce7 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,23 +9,10 @@ from io import IOBase import json import sys -from typing import ( - Any, - AsyncIterable, - AsyncIterator, - Callable, - Dict, - IO, - List, - Optional, - Type, - TypeVar, - Union, - cast, - overload, -) +from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import AsyncPipelineClient from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ( ClientAuthenticationError, @@ -47,7 +34,8 @@ from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from ..._serialization import Deserializer, Serializer from ..._validation import api_version_validation from ...operations._operations import ( build_operations_list_request, @@ -70,11 +58,12 @@ build_standby_virtual_machines_get_request, build_standby_virtual_machines_list_by_standby_virtual_machine_pool_resource_request, ) +from .._configuration import StandbyPoolMgmtClientConfiguration if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -92,16 +81,12 @@ class Operations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "accept"]}, - ) def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: """List the operations for the provider. @@ -114,7 +99,7 @@ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]: cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -161,7 +146,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -177,7 +162,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -197,24 +182,12 @@ class StandbyVirtualMachinePoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) async def get( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> _models.StandbyVirtualMachinePoolResource: @@ -230,7 +203,7 @@ async def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -270,7 +243,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -283,19 +256,6 @@ async def get( return deserialized # type: ignore - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) async def _create_or_update_initial( self, resource_group_name: str, @@ -303,7 +263,7 @@ async def _create_or_update_initial( resource: Union[_models.StandbyVirtualMachinePoolResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -352,7 +312,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -454,19 +414,6 @@ async def begin_create_or_update( """ @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) async def begin_create_or_update( self, resource_group_name: str, @@ -543,22 +490,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) async def _delete_initial( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -597,7 +532,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -613,18 +548,6 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) async def begin_delete( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -768,19 +691,6 @@ async def update( """ @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) async def update( self, resource_group_name: str, @@ -804,7 +714,7 @@ async def update( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -854,7 +764,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -868,10 +778,6 @@ async def update( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.StandbyVirtualMachinePoolResource"]: @@ -890,7 +796,7 @@ def list_by_resource_group( cls: ClsType[List[_models.StandbyVirtualMachinePoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -939,7 +845,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -955,7 +861,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -963,10 +869,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "accept"]}, - ) def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.StandbyVirtualMachinePoolResource"]: """List StandbyVirtualMachinePoolResource resources by subscription ID. @@ -980,7 +882,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.StandbyV cls: ClsType[List[_models.StandbyVirtualMachinePoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1028,7 +930,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1044,7 +946,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1064,25 +966,12 @@ class StandbyVirtualMachinesOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "standby_virtual_machine_name", - "accept", - ] - }, - ) async def get( self, resource_group_name: str, @@ -1104,7 +993,7 @@ async def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachineResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1145,7 +1034,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1159,18 +1048,6 @@ async def get( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) # pylint: disable=name-too-long def list_by_standby_virtual_machine_pool_resource( # pylint: disable=name-too-long self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> AsyncIterable["_models.StandbyVirtualMachineResource"]: @@ -1191,7 +1068,7 @@ def list_by_standby_virtual_machine_pool_resource( # pylint: disable=name-too-l cls: ClsType[List[_models.StandbyVirtualMachineResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1241,7 +1118,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachineResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachineResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -1257,7 +1134,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1277,12 +1154,25 @@ class StandbyVirtualMachinePoolRuntimeViewsOperations: # pylint: disable=name-t def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_virtual_machine_pool_name", + "runtime_view", + "accept", + ] + }, + ) async def get( self, resource_group_name: str, standby_virtual_machine_pool_name: str, runtime_view: str, **kwargs: Any ) -> _models.StandbyVirtualMachinePoolRuntimeViewResource: @@ -1302,7 +1192,7 @@ async def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1343,7 +1233,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1357,6 +1247,18 @@ async def get( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_virtual_machine_pool_name", + "accept", + ] + }, + ) def list_by_standby_pool( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> AsyncIterable["_models.StandbyVirtualMachinePoolRuntimeViewResource"]: @@ -1378,7 +1280,7 @@ def list_by_standby_pool( cls: ClsType[List[_models.StandbyVirtualMachinePoolRuntimeViewResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1429,7 +1331,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.StandbyVirtualMachinePoolRuntimeViewResource], deserialized["value"] + List[_models.StandbyVirtualMachinePoolRuntimeViewResource], deserialized.get("value", []) ) if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -1446,7 +1348,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1466,24 +1368,12 @@ class StandbyContainerGroupPoolsOperations: def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) async def get( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> _models.StandbyContainerGroupPoolResource: @@ -1499,7 +1389,7 @@ async def get( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1539,7 +1429,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1552,19 +1442,6 @@ async def get( return deserialized # type: ignore - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) async def _create_or_update_initial( self, resource_group_name: str, @@ -1572,7 +1449,7 @@ async def _create_or_update_initial( resource: Union[_models.StandbyContainerGroupPoolResource, JSON, IO[bytes]], **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1621,7 +1498,7 @@ async def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1723,19 +1600,6 @@ async def begin_create_or_update( """ @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) async def begin_create_or_update( self, resource_group_name: str, @@ -1812,22 +1676,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) async def _delete_initial( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> AsyncIterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1866,7 +1718,7 @@ async def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1882,18 +1734,6 @@ async def _delete_initial( return deserialized # type: ignore @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) async def begin_delete( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: @@ -2037,19 +1877,6 @@ async def update( """ @distributed_trace_async - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) async def update( self, resource_group_name: str, @@ -2073,7 +1900,7 @@ async def update( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2123,7 +1950,7 @@ async def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2137,10 +1964,6 @@ async def update( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> AsyncIterable["_models.StandbyContainerGroupPoolResource"]: @@ -2159,7 +1982,7 @@ def list_by_resource_group( cls: ClsType[List[_models.StandbyContainerGroupPoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2208,7 +2031,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2224,7 +2047,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2232,10 +2055,6 @@ async def get_next(next_link=None): return AsyncItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "accept"]}, - ) def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.StandbyContainerGroupPoolResource"]: """List StandbyContainerGroupPoolResource resources by subscription ID. @@ -2249,7 +2068,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.StandbyC cls: ClsType[List[_models.StandbyContainerGroupPoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2297,7 +2116,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, AsyncList(list_of_elem) @@ -2313,7 +2132,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2333,12 +2152,25 @@ class StandbyContainerGroupPoolRuntimeViewsOperations: # pylint: disable=name-t def __init__(self, *args, **kwargs) -> None: input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace_async + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_container_group_pool_name", + "runtime_view", + "accept", + ] + }, + ) async def get( self, resource_group_name: str, standby_container_group_pool_name: str, runtime_view: str, **kwargs: Any ) -> _models.StandbyContainerGroupPoolRuntimeViewResource: @@ -2358,7 +2190,7 @@ async def get( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2399,7 +2231,7 @@ async def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2413,6 +2245,18 @@ async def get( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_container_group_pool_name", + "accept", + ] + }, + ) def list_by_standby_pool( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> AsyncIterable["_models.StandbyContainerGroupPoolRuntimeViewResource"]: @@ -2434,7 +2278,7 @@ def list_by_standby_pool( cls: ClsType[List[_models.StandbyContainerGroupPoolRuntimeViewResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2485,7 +2329,7 @@ def prepare_request(next_link=None): async def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.StandbyContainerGroupPoolRuntimeViewResource], deserialized["value"] + List[_models.StandbyContainerGroupPoolRuntimeViewResource], deserialized.get("value", []) ) if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -2502,7 +2346,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/aio/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/__init__.py index 5e5cac3af9c9..cad271ee49cf 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/__init__.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/__init__.py @@ -5,47 +5,67 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._models import ContainerGroupInstanceCountSummary -from ._models import ContainerGroupProfile -from ._models import ContainerGroupProperties -from ._models import ErrorAdditionalInfo -from ._models import ErrorDetail -from ._models import ErrorResponse -from ._models import Operation -from ._models import OperationDisplay -from ._models import PoolResourceStateCount -from ._models import ProxyResource -from ._models import Resource -from ._models import StandbyContainerGroupPoolElasticityProfile -from ._models import StandbyContainerGroupPoolResource -from ._models import StandbyContainerGroupPoolResourceProperties -from ._models import StandbyContainerGroupPoolResourceUpdate -from ._models import StandbyContainerGroupPoolResourceUpdateProperties -from ._models import StandbyContainerGroupPoolRuntimeViewResource -from ._models import StandbyContainerGroupPoolRuntimeViewResourceProperties -from ._models import StandbyVirtualMachinePoolElasticityProfile -from ._models import StandbyVirtualMachinePoolResource -from ._models import StandbyVirtualMachinePoolResourceProperties -from ._models import StandbyVirtualMachinePoolResourceUpdate -from ._models import StandbyVirtualMachinePoolResourceUpdateProperties -from ._models import StandbyVirtualMachinePoolRuntimeViewResource -from ._models import StandbyVirtualMachinePoolRuntimeViewResourceProperties -from ._models import StandbyVirtualMachineResource -from ._models import StandbyVirtualMachineResourceProperties -from ._models import Subnet -from ._models import SystemData -from ._models import TrackedResource -from ._models import VirtualMachineInstanceCountSummary +from typing import TYPE_CHECKING -from ._enums import ActionType -from ._enums import CreatedByType -from ._enums import Origin -from ._enums import ProvisioningState -from ._enums import RefillPolicy -from ._enums import VirtualMachineState +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + ContainerGroupInstanceCountSummary, + ContainerGroupProfile, + ContainerGroupProperties, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + Operation, + OperationDisplay, + PoolContainerGroupStateCount, + PoolStatus, + PoolVirtualMachineStateCount, + ProxyResource, + Resource, + StandbyContainerGroupPoolElasticityProfile, + StandbyContainerGroupPoolForecastValues, + StandbyContainerGroupPoolPrediction, + StandbyContainerGroupPoolResource, + StandbyContainerGroupPoolResourceProperties, + StandbyContainerGroupPoolResourceUpdate, + StandbyContainerGroupPoolResourceUpdateProperties, + StandbyContainerGroupPoolRuntimeViewResource, + StandbyContainerGroupPoolRuntimeViewResourceProperties, + StandbyVirtualMachinePoolElasticityProfile, + StandbyVirtualMachinePoolForecastValues, + StandbyVirtualMachinePoolPrediction, + StandbyVirtualMachinePoolResource, + StandbyVirtualMachinePoolResourceProperties, + StandbyVirtualMachinePoolResourceUpdate, + StandbyVirtualMachinePoolResourceUpdateProperties, + StandbyVirtualMachinePoolRuntimeViewResource, + StandbyVirtualMachinePoolRuntimeViewResourceProperties, + StandbyVirtualMachineResource, + StandbyVirtualMachineResourceProperties, + Subnet, + SystemData, + TrackedResource, + VirtualMachineInstanceCountSummary, +) + +from ._enums import ( # type: ignore + ActionType, + CreatedByType, + HealthStateCode, + Origin, + PoolContainerGroupState, + PoolVirtualMachineState, + ProvisioningState, + RefillPolicy, + VirtualMachineState, +) from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -57,10 +77,14 @@ "ErrorResponse", "Operation", "OperationDisplay", - "PoolResourceStateCount", + "PoolContainerGroupStateCount", + "PoolStatus", + "PoolVirtualMachineStateCount", "ProxyResource", "Resource", "StandbyContainerGroupPoolElasticityProfile", + "StandbyContainerGroupPoolForecastValues", + "StandbyContainerGroupPoolPrediction", "StandbyContainerGroupPoolResource", "StandbyContainerGroupPoolResourceProperties", "StandbyContainerGroupPoolResourceUpdate", @@ -68,6 +92,8 @@ "StandbyContainerGroupPoolRuntimeViewResource", "StandbyContainerGroupPoolRuntimeViewResourceProperties", "StandbyVirtualMachinePoolElasticityProfile", + "StandbyVirtualMachinePoolForecastValues", + "StandbyVirtualMachinePoolPrediction", "StandbyVirtualMachinePoolResource", "StandbyVirtualMachinePoolResourceProperties", "StandbyVirtualMachinePoolResourceUpdate", @@ -82,10 +108,13 @@ "VirtualMachineInstanceCountSummary", "ActionType", "CreatedByType", + "HealthStateCode", "Origin", + "PoolContainerGroupState", + "PoolVirtualMachineState", "ProvisioningState", "RefillPolicy", "VirtualMachineState", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_enums.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_enums.py index 3e364defa277..c09dca865a4c 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_enums.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_enums.py @@ -32,6 +32,15 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The entity was created by a key.""" +class HealthStateCode(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """StandbyPool health state.""" + + HEALTHY = "HealthState/healthy" + """StandbyPool is in healthy state.""" + DEGRADED = "HealthState/degraded" + """StandbyPool is in degraded state.""" + + class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system". @@ -45,6 +54,40 @@ class Origin(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Indicates the operation is initiated by a user or system.""" +class PoolContainerGroupState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The state of the pooled container groups.""" + + RUNNING = "Running" + """The container group is up and running.""" + CREATING = "Creating" + """The container group is creating.""" + DELETING = "Deleting" + """The container group is deleting.""" + + +class PoolVirtualMachineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): + """The state of the pooled virtual machines.""" + + RUNNING = "Running" + """The virtual machine is up and running.""" + CREATING = "Creating" + """The virtual machine is creating.""" + STARTING = "Starting" + """The virtual machine is starting.""" + DELETING = "Deleting" + """The virtual machine is deleting.""" + DEALLOCATED = "Deallocated" + """The virtual machine has released the lease on the underlying hardware and is powered off.""" + DEALLOCATING = "Deallocating" + """The virtual machine is releasing the lease on the underlying hardware and is powered off.""" + HIBERNATED = "Hibernated" + """The virtual machine has released the lease on the underlying hardware and is powered off. + Memory contents of the VM are stored in the OS disk. When started again, applications and + processes that were previously running in your VM resume from the state prior to hibernation.""" + HIBERNATING = "Hibernating" + """The virtual machine is hibernating.""" + + class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """Provisioning state.""" @@ -72,3 +115,7 @@ class VirtualMachineState(str, Enum, metaclass=CaseInsensitiveEnumMeta): """The virtual machine is up and running.""" DEALLOCATED = "Deallocated" """The virtual machine has released the lease on the underlying hardware and is powered off.""" + HIBERNATED = "Hibernated" + """The virtual machine has released the lease on the underlying hardware and is powered off. + Memory contents of the VM are stored in the OS disk. When started again, applications and + processes that were previously running in your VM resume from the state prior to hibernation.""" diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py index d502d546afec..9d41de57dab7 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_models.py @@ -1,11 +1,12 @@ +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 -# pylint: disable=too-many-lines # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=useless-super-delegation import datetime from typing import Any, Dict, List, Mapping, Optional, TYPE_CHECKING, Union, overload @@ -14,7 +15,6 @@ from .._model_base import rest_field if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from .. import models as _models @@ -22,45 +22,53 @@ class ContainerGroupInstanceCountSummary(_model_base.Model): """Displays the counts of container groups in each state, as known by the StandbyPool resource provider. - - :ivar instance_counts_by_state: The count of pooled resources in each state. Required. - :vartype instance_counts_by_state: list[~azure.mgmt.standbypool.models.PoolResourceStateCount] + :ivar zone: The zone that the provided counts are in. It will not have a value if zones are not + enabled. + :vartype zone: int + :ivar instance_counts_by_state: The count of pooled container groups in each state for the + given zone. Required. + :vartype instance_counts_by_state: + list[~azure.mgmt.standbypool.models.PoolContainerGroupStateCount] """ - instance_counts_by_state: List["_models.PoolResourceStateCount"] = rest_field(name="instanceCountsByState") - """The count of pooled resources in each state. Required.""" + zone: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zone that the provided counts are in. It will not have a value if zones are not enabled.""" + instance_counts_by_state: List["_models.PoolContainerGroupStateCount"] = rest_field( + name="instanceCountsByState", visibility=["read", "create", "update", "delete", "query"] + ) + """The count of pooled container groups in each state for the given zone. Required.""" @overload def __init__( self, *, - instance_counts_by_state: List["_models.PoolResourceStateCount"], - ): ... + instance_counts_by_state: List["_models.PoolContainerGroupStateCount"], + zone: Optional[int] = None, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class ContainerGroupProfile(_model_base.Model): """Details of the ContainerGroupProfile. - :ivar id: Specifies container group profile id of standby container groups. Required. :vartype id: str :ivar revision: Specifies revision of container group profile. :vartype revision: int """ - id: str = rest_field() + id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies container group profile id of standby container groups. Required.""" - revision: Optional[int] = rest_field() + revision: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies revision of container group profile.""" @overload @@ -69,23 +77,22 @@ def __init__( *, id: str, # pylint: disable=redefined-builtin revision: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class ContainerGroupProperties(_model_base.Model): """Details of the ContainerGroupProperties. - :ivar container_group_profile: Specifies container group profile of standby container groups. Required. :vartype container_group_profile: ~azure.mgmt.standbypool.models.ContainerGroupProfile @@ -93,9 +100,13 @@ class ContainerGroupProperties(_model_base.Model): :vartype subnet_ids: list[~azure.mgmt.standbypool.models.Subnet] """ - container_group_profile: "_models.ContainerGroupProfile" = rest_field(name="containerGroupProfile") + container_group_profile: "_models.ContainerGroupProfile" = rest_field( + name="containerGroupProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies container group profile of standby container groups. Required.""" - subnet_ids: Optional[List["_models.Subnet"]] = rest_field(name="subnetIds") + subnet_ids: Optional[List["_models.Subnet"]] = rest_field( + name="subnetIds", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies subnet Ids for container group.""" @overload @@ -104,24 +115,22 @@ def __init__( *, container_group_profile: "_models.ContainerGroupProfile", subnet_ids: Optional[List["_models.Subnet"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class ErrorAdditionalInfo(_model_base.Model): """The resource management error additional info. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. @@ -137,8 +146,6 @@ class ErrorAdditionalInfo(_model_base.Model): class ErrorDetail(_model_base.Model): """The error detail. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar code: The error code. :vartype code: str :ivar message: The error message. @@ -173,7 +180,7 @@ class ErrorResponse(_model_base.Model): :vartype error: ~azure.mgmt.standbypool.models.ErrorDetail """ - error: Optional["_models.ErrorDetail"] = rest_field() + error: Optional["_models.ErrorDetail"] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """The error object.""" @overload @@ -181,24 +188,22 @@ def __init__( self, *, error: Optional["_models.ErrorDetail"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class Operation(_model_base.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str @@ -223,13 +228,15 @@ class Operation(_model_base.Model): is_data_action: Optional[bool] = rest_field(name="isDataAction", visibility=["read"]) """Whether the operation applies to data-plane. This is \"true\" for data-plane operations and \"false\" for Azure Resource Manager/control-plane operations.""" - display: Optional["_models.OperationDisplay"] = rest_field(visibility=["read"]) + display: Optional["_models.OperationDisplay"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """Localized display information for this particular operation.""" origin: Optional[Union[str, "_models.Origin"]] = rest_field(visibility=["read"]) """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is \"user,system\". Known values are: \"user\", \"system\", and \"user,system\".""" - action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType") + action_type: Optional[Union[str, "_models.ActionType"]] = rest_field(name="actionType", visibility=["read"]) """Extensible enum. Indicates the action type. \"Internal\" refers to actions that are for internal only APIs. \"Internal\"""" @@ -237,25 +244,23 @@ class Operation(_model_base.Model): def __init__( self, *, - action_type: Optional[Union[str, "_models.ActionType"]] = None, - ): ... + display: Optional["_models.OperationDisplay"] = None, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class OperationDisplay(_model_base.Model): """Localized display information for and operation. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". :vartype provider: str @@ -284,48 +289,106 @@ class OperationDisplay(_model_base.Model): views.""" -class PoolResourceStateCount(_model_base.Model): - """Displays the counts of pooled resources in each state, as known by the StandbyPool resource - provider. +class PoolContainerGroupStateCount(_model_base.Model): + """Displays the counts of pooled container groups in each state, as known by the StandbyPool + resource provider. + + :ivar state: The state that the pooled container groups count is for. Required. Known values + are: "Running", "Creating", and "Deleting". + :vartype state: str or ~azure.mgmt.standbypool.models.PoolContainerGroupState + :ivar count: The count of pooled container groups in the given state. Required. + :vartype count: int + """ + + state: Union[str, "_models.PoolContainerGroupState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The state that the pooled container groups count is for. Required. Known values are: + \"Running\", \"Creating\", and \"Deleting\".""" + count: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The count of pooled container groups in the given state. Required.""" + + @overload + def __init__( + self, + *, + state: Union[str, "_models.PoolContainerGroupState"], + count: int, + ) -> None: ... + + @overload + def __init__(self, mapping: Mapping[str, Any]) -> None: + """ + :param mapping: raw JSON to initialize the model. + :type mapping: Mapping[str, Any] + """ + + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) - :ivar state: The state that the pooled resources count is for. Required. - :vartype state: str - :ivar count: The count of pooled resources in the given state. Required. +class PoolStatus(_model_base.Model): + """Displays StandbyPool status. + + :ivar code: Displays the healthy state of the StandbyPool. Required. Known values are: + "HealthState/healthy" and "HealthState/degraded". + :vartype code: str or ~azure.mgmt.standbypool.models.HealthStateCode + :ivar message: Displays the StandbyPool health state details. + :vartype message: str + """ + + code: Union[str, "_models.HealthStateCode"] = rest_field(visibility=["read"]) + """Displays the healthy state of the StandbyPool. Required. Known values are: + \"HealthState/healthy\" and \"HealthState/degraded\".""" + message: Optional[str] = rest_field(visibility=["read"]) + """Displays the StandbyPool health state details.""" + + +class PoolVirtualMachineStateCount(_model_base.Model): + """Displays the counts of pooled virtual machines in each state, as known by the StandbyPool + resource provider. + + :ivar state: The state that the pooled virtual machines count is for. Required. Known values + are: "Running", "Creating", "Starting", "Deleting", "Deallocated", "Deallocating", + "Hibernated", and "Hibernating". + :vartype state: str or ~azure.mgmt.standbypool.models.PoolVirtualMachineState + :ivar count: The count of pooled virtual machines in the given state. Required. :vartype count: int """ - state: str = rest_field() - """The state that the pooled resources count is for. Required.""" - count: int = rest_field() - """The count of pooled resources in the given state. Required.""" + state: Union[str, "_models.PoolVirtualMachineState"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) + """The state that the pooled virtual machines count is for. Required. Known values are: + \"Running\", \"Creating\", \"Starting\", \"Deleting\", \"Deallocated\", \"Deallocating\", + \"Hibernated\", and \"Hibernating\".""" + count: int = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The count of pooled virtual machines in the given state. Required.""" @overload def __init__( self, *, - state: str, + state: Union[str, "_models.PoolVirtualMachineState"], count: int, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class Resource(_model_base.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -339,7 +402,7 @@ class Resource(_model_base.Model): id: Optional[str] = rest_field(visibility=["read"]) """Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long""" + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.""" name: Optional[str] = rest_field(visibility=["read"]) """The name of the resource.""" type: Optional[str] = rest_field(visibility=["read"]) @@ -353,10 +416,8 @@ class ProxyResource(Resource): """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -372,7 +433,6 @@ class ProxyResource(Resource): class StandbyContainerGroupPoolElasticityProfile(_model_base.Model): # pylint: disable=name-too-long """Specifies the elasticity profile of the standby container group pools. - :ivar max_ready_capacity: Specifies maximum number of standby container groups in the standby pool. Required. :vartype max_ready_capacity: int @@ -380,9 +440,13 @@ class StandbyContainerGroupPoolElasticityProfile(_model_base.Model): # pylint: :vartype refill_policy: str or ~azure.mgmt.standbypool.models.RefillPolicy """ - max_ready_capacity: int = rest_field(name="maxReadyCapacity") + max_ready_capacity: int = rest_field( + name="maxReadyCapacity", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies maximum number of standby container groups in the standby pool. Required.""" - refill_policy: Optional[Union[str, "_models.RefillPolicy"]] = rest_field(name="refillPolicy") + refill_policy: Optional[Union[str, "_models.RefillPolicy"]] = rest_field( + name="refillPolicy", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies refill policy of the pool. \"always\"""" @overload @@ -391,28 +455,61 @@ def __init__( *, max_ready_capacity: int, refill_policy: Optional[Union[str, "_models.RefillPolicy"]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) +class StandbyContainerGroupPoolForecastValues(_model_base.Model): + """Displays the forecast information of the standby pool. + + :ivar instances_requested_count: Displays the predicted count of instances to be requested from + the standby pool. Required. + :vartype instances_requested_count: list[int] + """ + + instances_requested_count: List[int] = rest_field(name="instancesRequestedCount", visibility=["read"]) + """Displays the predicted count of instances to be requested from the standby pool. Required.""" + + +class StandbyContainerGroupPoolPrediction(_model_base.Model): + """Displays prediction information of the standby pool. + + :ivar forecast_values: Displays the forecast information of the standby pool. Required. + :vartype forecast_values: + ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolForecastValues + :ivar forecast_start_time: Displays the UTC timestamp of when the prediction was retrieved for + the standby pool. Required. + :vartype forecast_start_time: ~datetime.datetime + :ivar forecast_info: Displays additional information for the prediction of the standby pool. + Required. + :vartype forecast_info: str + """ + + forecast_values: "_models.StandbyContainerGroupPoolForecastValues" = rest_field( + name="forecastValues", visibility=["read"] + ) + """Displays the forecast information of the standby pool. Required.""" + forecast_start_time: datetime.datetime = rest_field(name="forecastStartTime", visibility=["read"], format="rfc3339") + """Displays the UTC timestamp of when the prediction was retrieved for the standby pool. Required.""" + forecast_info: str = rest_field(name="forecastInfo", visibility=["read"]) + """Displays additional information for the prediction of the standby pool. Required.""" + + class TrackedResource(Resource): """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -428,7 +525,7 @@ class TrackedResource(Resource): :vartype location: str """ - tags: Optional[Dict[str, str]] = rest_field() + 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.""" @@ -439,27 +536,24 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyContainerGroupPoolResource(TrackedResource): """A StandbyContainerGroupPoolResource. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -477,7 +571,9 @@ class StandbyContainerGroupPoolResource(TrackedResource): :vartype properties: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceProperties """ - properties: Optional["_models.StandbyContainerGroupPoolResourceProperties"] = rest_field() + properties: Optional["_models.StandbyContainerGroupPoolResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -487,25 +583,22 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, properties: Optional["_models.StandbyContainerGroupPoolResourceProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyContainerGroupPoolResourceProperties(_model_base.Model): # pylint: disable=name-too-long """Details of the StandbyContainerGroupPool. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar elasticity_profile: Specifies elasticity profile of standby container group pools. Required. :vartype elasticity_profile: @@ -513,15 +606,23 @@ class StandbyContainerGroupPoolResourceProperties(_model_base.Model): # pylint: :ivar container_group_properties: Specifies container group properties of standby container group pools. Required. :vartype container_group_properties: ~azure.mgmt.standbypool.models.ContainerGroupProperties + :ivar zones: Specifies zones of standby container group pools. + :vartype zones: list[str] :ivar provisioning_state: The status of the last operation. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.standbypool.models.ProvisioningState """ - elasticity_profile: "_models.StandbyContainerGroupPoolElasticityProfile" = rest_field(name="elasticityProfile") + elasticity_profile: "_models.StandbyContainerGroupPoolElasticityProfile" = rest_field( + name="elasticityProfile", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies elasticity profile of standby container group pools. Required.""" - container_group_properties: "_models.ContainerGroupProperties" = rest_field(name="containerGroupProperties") + container_group_properties: "_models.ContainerGroupProperties" = rest_field( + name="containerGroupProperties", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies container group properties of standby container group pools. Required.""" + zones: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies zones of standby container group pools.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( name="provisioningState", visibility=["read"] ) @@ -534,16 +635,17 @@ def __init__( *, elasticity_profile: "_models.StandbyContainerGroupPoolElasticityProfile", container_group_properties: "_models.ContainerGroupProperties", - ): ... + zones: Optional[List[str]] = None, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -557,9 +659,11 @@ class StandbyContainerGroupPoolResourceUpdate(_model_base.Model): ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResourceUpdateProperties """ - tags: Optional[Dict[str, str]] = rest_field() + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.StandbyContainerGroupPoolResourceUpdateProperties"] = rest_field() + properties: Optional["_models.StandbyContainerGroupPoolResourceUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -568,16 +672,16 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, properties: Optional["_models.StandbyContainerGroupPoolResourceUpdateProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -590,16 +694,20 @@ class StandbyContainerGroupPoolResourceUpdateProperties(_model_base.Model): # p :ivar container_group_properties: Specifies container group properties of standby container group pools. :vartype container_group_properties: ~azure.mgmt.standbypool.models.ContainerGroupProperties + :ivar zones: Specifies zones of standby container group pools. + :vartype zones: list[str] """ elasticity_profile: Optional["_models.StandbyContainerGroupPoolElasticityProfile"] = rest_field( - name="elasticityProfile" + name="elasticityProfile", visibility=["read", "create", "update", "delete", "query"] ) """Specifies elasticity profile of standby container group pools.""" container_group_properties: Optional["_models.ContainerGroupProperties"] = rest_field( - name="containerGroupProperties" + name="containerGroupProperties", visibility=["read", "create", "update", "delete", "query"] ) """Specifies container group properties of standby container group pools.""" + zones: Optional[List[str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """Specifies zones of standby container group pools.""" @overload def __init__( @@ -607,16 +715,17 @@ def __init__( *, elasticity_profile: Optional["_models.StandbyContainerGroupPoolElasticityProfile"] = None, container_group_properties: Optional["_models.ContainerGroupProperties"] = None, - ): ... + zones: Optional[List[str]] = None, + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -624,10 +733,8 @@ class StandbyContainerGroupPoolRuntimeViewResource(ProxyResource): # pylint: di """Contains information about a standby container group pool as last known by the StandbyPool resource provider. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -642,7 +749,9 @@ class StandbyContainerGroupPoolRuntimeViewResource(ProxyResource): # pylint: di ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResourceProperties """ - properties: Optional["_models.StandbyContainerGroupPoolRuntimeViewResourceProperties"] = rest_field() + properties: Optional["_models.StandbyContainerGroupPoolRuntimeViewResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -650,32 +759,33 @@ def __init__( self, *, properties: Optional["_models.StandbyContainerGroupPoolRuntimeViewResourceProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyContainerGroupPoolRuntimeViewResourceProperties(_model_base.Model): # pylint: disable=name-too-long """Contains information about a standby pool as last known by the StandbyPool resource provider. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar instance_count_summary: A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. Required. :vartype instance_count_summary: list[~azure.mgmt.standbypool.models.ContainerGroupInstanceCountSummary] + :ivar status: Display status of the standby pool. + :vartype status: ~azure.mgmt.standbypool.models.PoolStatus :ivar provisioning_state: Displays the provisioning state of the standby pool. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.standbypool.models.ProvisioningState + :ivar prediction: Displays prediction information of the standby pool. + :vartype prediction: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolPrediction """ instance_count_summary: List["_models.ContainerGroupInstanceCountSummary"] = rest_field( @@ -683,17 +793,20 @@ class StandbyContainerGroupPoolRuntimeViewResourceProperties(_model_base.Model): ) """A list containing the counts of container groups in each possible state, as known by the StandbyPool resource provider. Required.""" + status: Optional["_models.PoolStatus"] = rest_field(visibility=["read"]) + """Display status of the standby pool.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( name="provisioningState", visibility=["read"] ) """Displays the provisioning state of the standby pool. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + prediction: Optional["_models.StandbyContainerGroupPoolPrediction"] = rest_field(visibility=["read"]) + """Displays prediction information of the standby pool.""" class StandbyVirtualMachinePoolElasticityProfile(_model_base.Model): # pylint: disable=name-too-long """Details of the elasticity profile. - :ivar max_ready_capacity: Specifies the maximum number of virtual machines in the standby virtual machine pool. Required. :vartype max_ready_capacity: int @@ -702,9 +815,13 @@ class StandbyVirtualMachinePoolElasticityProfile(_model_base.Model): # pylint: :vartype min_ready_capacity: int """ - max_ready_capacity: int = rest_field(name="maxReadyCapacity") + max_ready_capacity: int = rest_field( + name="maxReadyCapacity", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the maximum number of virtual machines in the standby virtual machine pool. Required.""" - min_ready_capacity: Optional[int] = rest_field(name="minReadyCapacity") + min_ready_capacity: Optional[int] = rest_field( + name="minReadyCapacity", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the desired minimum number of virtual machines in the standby virtual machine pool. MinReadyCapacity cannot exceed MaxReadyCapacity.""" @@ -714,27 +831,60 @@ def __init__( *, max_ready_capacity: int, min_ready_capacity: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) -class StandbyVirtualMachinePoolResource(TrackedResource): - """A StandbyVirtualMachinePoolResource. +class StandbyVirtualMachinePoolForecastValues(_model_base.Model): + """Displays the forecast information of the standby pool. + + :ivar instances_requested_count: Displays the predicted count of instances to be requested from + the standby pool. Required. + :vartype instances_requested_count: list[int] + """ + + instances_requested_count: List[int] = rest_field(name="instancesRequestedCount", visibility=["read"]) + """Displays the predicted count of instances to be requested from the standby pool. Required.""" - Readonly variables are only populated by the server, and will be ignored when sending a request. +class StandbyVirtualMachinePoolPrediction(_model_base.Model): + """Displays prediction information of the standby pool. + + :ivar forecast_values: Displays the forecast information of the standby pool. Required. + :vartype forecast_values: + ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolForecastValues + :ivar forecast_start_time: Displays the UTC timestamp of when the prediction was retrieved for + the standby pool. Required. + :vartype forecast_start_time: ~datetime.datetime + :ivar forecast_info: Displays additional information for the prediction of the standby pool. + Required. + :vartype forecast_info: str + """ + + forecast_values: "_models.StandbyVirtualMachinePoolForecastValues" = rest_field( + name="forecastValues", visibility=["read"] + ) + """Displays the forecast information of the standby pool. Required.""" + forecast_start_time: datetime.datetime = rest_field(name="forecastStartTime", visibility=["read"], format="rfc3339") + """Displays the UTC timestamp of when the prediction was retrieved for the standby pool. Required.""" + forecast_info: str = rest_field(name="forecastInfo", visibility=["read"]) + """Displays additional information for the prediction of the standby pool. Required.""" + + +class StandbyVirtualMachinePoolResource(TrackedResource): + """A StandbyVirtualMachinePoolResource. :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -752,7 +902,9 @@ class StandbyVirtualMachinePoolResource(TrackedResource): :vartype properties: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceProperties """ - properties: Optional["_models.StandbyVirtualMachinePoolResourceProperties"] = rest_field() + properties: Optional["_models.StandbyVirtualMachinePoolResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -762,31 +914,28 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, properties: Optional["_models.StandbyVirtualMachinePoolResourceProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyVirtualMachinePoolResourceProperties(_model_base.Model): # pylint: disable=name-too-long """Details of the StandbyVirtualMachinePool. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar elasticity_profile: Specifies the elasticity profile of the standby virtual machine pools. :vartype elasticity_profile: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolElasticityProfile :ivar virtual_machine_state: Specifies the desired state of virtual machines in the pool. - Required. Known values are: "Running" and "Deallocated". + Required. Known values are: "Running", "Deallocated", and "Hibernated". :vartype virtual_machine_state: str or ~azure.mgmt.standbypool.models.VirtualMachineState :ivar attached_virtual_machine_scale_set_id: Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. @@ -797,13 +946,17 @@ class StandbyVirtualMachinePoolResourceProperties(_model_base.Model): # pylint: """ elasticity_profile: Optional["_models.StandbyVirtualMachinePoolElasticityProfile"] = rest_field( - name="elasticityProfile" + name="elasticityProfile", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the elasticity profile of the standby virtual machine pools.""" - virtual_machine_state: Union[str, "_models.VirtualMachineState"] = rest_field(name="virtualMachineState") + virtual_machine_state: Union[str, "_models.VirtualMachineState"] = rest_field( + name="virtualMachineState", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the desired state of virtual machines in the pool. Required. Known values are: - \"Running\" and \"Deallocated\".""" - attached_virtual_machine_scale_set_id: Optional[str] = rest_field(name="attachedVirtualMachineScaleSetId") + \"Running\", \"Deallocated\", and \"Hibernated\".""" + attached_virtual_machine_scale_set_id: Optional[str] = rest_field( + name="attachedVirtualMachineScaleSetId", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( @@ -819,16 +972,16 @@ def __init__( virtual_machine_state: Union[str, "_models.VirtualMachineState"], elasticity_profile: Optional["_models.StandbyVirtualMachinePoolElasticityProfile"] = None, attached_virtual_machine_scale_set_id: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -842,9 +995,11 @@ class StandbyVirtualMachinePoolResourceUpdate(_model_base.Model): ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResourceUpdateProperties """ - tags: Optional[Dict[str, str]] = rest_field() + tags: Optional[Dict[str, str]] = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Resource tags.""" - properties: Optional["_models.StandbyVirtualMachinePoolResourceUpdateProperties"] = rest_field() + properties: Optional["_models.StandbyVirtualMachinePoolResourceUpdateProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -853,16 +1008,16 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, properties: Optional["_models.StandbyVirtualMachinePoolResourceUpdateProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -874,7 +1029,7 @@ class StandbyVirtualMachinePoolResourceUpdateProperties(_model_base.Model): # p :vartype elasticity_profile: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolElasticityProfile :ivar virtual_machine_state: Specifies the desired state of virtual machines in the pool. Known - values are: "Running" and "Deallocated". + values are: "Running", "Deallocated", and "Hibernated". :vartype virtual_machine_state: str or ~azure.mgmt.standbypool.models.VirtualMachineState :ivar attached_virtual_machine_scale_set_id: Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to. @@ -882,13 +1037,17 @@ class StandbyVirtualMachinePoolResourceUpdateProperties(_model_base.Model): # p """ elasticity_profile: Optional["_models.StandbyVirtualMachinePoolElasticityProfile"] = rest_field( - name="elasticityProfile" + name="elasticityProfile", visibility=["read", "create", "update", "delete", "query"] ) """Specifies the elasticity profile of the standby virtual machine pools.""" - virtual_machine_state: Optional[Union[str, "_models.VirtualMachineState"]] = rest_field(name="virtualMachineState") - """Specifies the desired state of virtual machines in the pool. Known values are: \"Running\" and - \"Deallocated\".""" - attached_virtual_machine_scale_set_id: Optional[str] = rest_field(name="attachedVirtualMachineScaleSetId") + virtual_machine_state: Optional[Union[str, "_models.VirtualMachineState"]] = rest_field( + name="virtualMachineState", visibility=["read", "create", "update", "delete", "query"] + ) + """Specifies the desired state of virtual machines in the pool. Known values are: \"Running\", + \"Deallocated\", and \"Hibernated\".""" + attached_virtual_machine_scale_set_id: Optional[str] = rest_field( + name="attachedVirtualMachineScaleSetId", visibility=["read", "create", "update", "delete", "query"] + ) """Specifies the fully qualified resource ID of a virtual machine scale set the pool is attached to.""" @@ -899,16 +1058,16 @@ def __init__( elasticity_profile: Optional["_models.StandbyVirtualMachinePoolElasticityProfile"] = None, virtual_machine_state: Optional[Union[str, "_models.VirtualMachineState"]] = None, attached_virtual_machine_scale_set_id: Optional[str] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -916,10 +1075,8 @@ class StandbyVirtualMachinePoolRuntimeViewResource(ProxyResource): # pylint: di """Contains information about a standby virtual machine pool as last known by the StandbyPool resource provider. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -934,7 +1091,9 @@ class StandbyVirtualMachinePoolRuntimeViewResource(ProxyResource): # pylint: di ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResourceProperties """ - properties: Optional["_models.StandbyVirtualMachinePoolRuntimeViewResourceProperties"] = rest_field() + properties: Optional["_models.StandbyVirtualMachinePoolRuntimeViewResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -942,66 +1101,62 @@ def __init__( self, *, properties: Optional["_models.StandbyVirtualMachinePoolRuntimeViewResourceProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyVirtualMachinePoolRuntimeViewResourceProperties(_model_base.Model): # pylint: disable=name-too-long """Contains information about a standby pool as last known by the StandbyPool resource provider. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar instance_count_summary: A list containing the counts of virtual machines in each possible - power state for each zone if enabled, as known by the StandbyPool resource provider. - If zones are not enabled on the attached VMSS, the list will contain a single entry with null - zone values. - Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through - portal) are not reflected here. + power state for each zone if enabled, as known by the StandbyPool resource provider. If zones + are not enabled on the attached VMSS, the list will contain a single entry without zone values. Note: any resources in the Running state may still be installing extensions / not fully provisioned. Required. :vartype instance_count_summary: list[~azure.mgmt.standbypool.models.VirtualMachineInstanceCountSummary] + :ivar status: Display status of the standby pool. + :vartype status: ~azure.mgmt.standbypool.models.PoolStatus :ivar provisioning_state: Displays the provisioning state of the standby pool. Known values are: "Succeeded", "Failed", "Canceled", and "Deleting". :vartype provisioning_state: str or ~azure.mgmt.standbypool.models.ProvisioningState + :ivar prediction: Displays prediction information of the standby pool. + :vartype prediction: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolPrediction """ instance_count_summary: List["_models.VirtualMachineInstanceCountSummary"] = rest_field( name="instanceCountSummary", visibility=["read"] ) """A list containing the counts of virtual machines in each possible power state for each zone if - enabled, as known by the StandbyPool resource provider. - If zones are not enabled on the attached VMSS, the list will contain a single entry with null - zone values. - Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) - are not reflected here. - Note: any resources in the Running state may still be installing extensions / not fully - provisioned. Required.""" + enabled, as known by the StandbyPool resource provider. If zones are not enabled on the + attached VMSS, the list will contain a single entry without zone values. Note: any resources in + the Running state may still be installing extensions / not fully provisioned. Required.""" + status: Optional["_models.PoolStatus"] = rest_field(visibility=["read"]) + """Display status of the standby pool.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( name="provisioningState", visibility=["read"] ) """Displays the provisioning state of the standby pool. Known values are: \"Succeeded\", \"Failed\", \"Canceled\", and \"Deleting\".""" + prediction: Optional["_models.StandbyVirtualMachinePoolPrediction"] = rest_field(visibility=["read"]) + """Displays prediction information of the standby pool.""" class StandbyVirtualMachineResource(ProxyResource): """Concrete proxy resource types can be created by aliasing this type using a specific property type. - Readonly variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource ID for the resource. Ex - - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. # pylint: disable=line-too-long + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str @@ -1015,7 +1170,9 @@ class StandbyVirtualMachineResource(ProxyResource): :vartype properties: ~azure.mgmt.standbypool.models.StandbyVirtualMachineResourceProperties """ - properties: Optional["_models.StandbyVirtualMachineResourceProperties"] = rest_field() + properties: Optional["_models.StandbyVirtualMachineResourceProperties"] = rest_field( + visibility=["read", "create", "update", "delete", "query"] + ) """The resource-specific properties for this resource.""" @overload @@ -1023,25 +1180,22 @@ def __init__( self, *, properties: Optional["_models.StandbyVirtualMachineResourceProperties"] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class StandbyVirtualMachineResourceProperties(_model_base.Model): """Details of the StandbyVirtualMachine. - Readonly variables are only populated by the server, and will be ignored when sending a request. - - :ivar virtual_machine_resource_id: Resource id of the virtual machine. Required. :vartype virtual_machine_resource_id: str :ivar provisioning_state: The status of the last operation. Known values are: "Succeeded", @@ -1049,7 +1203,9 @@ class StandbyVirtualMachineResourceProperties(_model_base.Model): :vartype provisioning_state: str or ~azure.mgmt.standbypool.models.ProvisioningState """ - virtual_machine_resource_id: str = rest_field(name="virtualMachineResourceId") + virtual_machine_resource_id: str = rest_field( + name="virtualMachineResourceId", visibility=["read", "create", "update", "delete", "query"] + ) """Resource id of the virtual machine. Required.""" provisioning_state: Optional[Union[str, "_models.ProvisioningState"]] = rest_field( name="provisioningState", visibility=["read"] @@ -1062,28 +1218,27 @@ def __init__( self, *, virtual_machine_resource_id: str, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class Subnet(_model_base.Model): """Subnet of container group. - :ivar id: Specifies ARM resource id of the subnet. Required. :vartype id: str """ - id: str = rest_field() + id: str = rest_field(visibility=["read", "create", "update", "delete", "query"]) """Specifies ARM resource id of the subnet. Required.""" @overload @@ -1091,16 +1246,16 @@ def __init__( self, *, id: str, # pylint: disable=redefined-builtin - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) @@ -1123,19 +1278,29 @@ class SystemData(_model_base.Model): :vartype last_modified_at: ~datetime.datetime """ - created_by: Optional[str] = rest_field(name="createdBy") + created_by: Optional[str] = rest_field(name="createdBy", visibility=["read", "create", "update", "delete", "query"]) """The identity that created the resource.""" - created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="createdByType") + created_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="createdByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that created the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - created_at: Optional[datetime.datetime] = rest_field(name="createdAt", format="rfc3339") + created_at: Optional[datetime.datetime] = rest_field( + name="createdAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource creation (UTC).""" - last_modified_by: Optional[str] = rest_field(name="lastModifiedBy") + last_modified_by: Optional[str] = rest_field( + name="lastModifiedBy", visibility=["read", "create", "update", "delete", "query"] + ) """The identity that last modified the resource.""" - last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field(name="lastModifiedByType") + last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = rest_field( + name="lastModifiedByType", visibility=["read", "create", "update", "delete", "query"] + ) """The type of identity that last modified the resource. Known values are: \"User\", \"Application\", \"ManagedIdentity\", and \"Key\".""" - last_modified_at: Optional[datetime.datetime] = rest_field(name="lastModifiedAt", format="rfc3339") + last_modified_at: Optional[datetime.datetime] = rest_field( + name="lastModifiedAt", visibility=["read", "create", "update", "delete", "query"], format="rfc3339" + ) """The timestamp of resource last modification (UTC).""" @overload @@ -1148,56 +1313,55 @@ def __init__( last_modified_by: Optional[str] = None, last_modified_by_type: Optional[Union[str, "_models.CreatedByType"]] = None, last_modified_at: Optional[datetime.datetime] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) class VirtualMachineInstanceCountSummary(_model_base.Model): """Contains the counts of VMs in each power state in a given zone, fault domain, as known by the - StandbyPool resource provider. - Note: any updates to pool resources outside of StandbyPoolRP (i.e deleting a VM through portal) - are not reflected here. - Note: any resources in the Running state may still be installing extensions / not fully - provisioned. + StandbyPool resource provider. Note: any resources in the Running state may still be installing + extensions / not fully provisioned. - - :ivar zone: The zone that the provided counts are in. This is null if zones are not enabled on - the attached VMSS. + :ivar zone: The zone that the provided counts are in. It will not have a value if zones are not + enabled on the attached VMSS. :vartype zone: int - :ivar instance_counts_by_state: The count of pooled resources in each state for the given zone. - Required. - :vartype instance_counts_by_state: list[~azure.mgmt.standbypool.models.PoolResourceStateCount] + :ivar instance_counts_by_state: The count of pooled virtual machines in each state for the + given zone. Required. + :vartype instance_counts_by_state: + list[~azure.mgmt.standbypool.models.PoolVirtualMachineStateCount] """ - zone: Optional[int] = rest_field() - """The zone that the provided counts are in. This is null if zones are not enabled on the attached - VMSS.""" - instance_counts_by_state: List["_models.PoolResourceStateCount"] = rest_field(name="instanceCountsByState") - """The count of pooled resources in each state for the given zone. Required.""" + zone: Optional[int] = rest_field(visibility=["read", "create", "update", "delete", "query"]) + """The zone that the provided counts are in. It will not have a value if zones are not enabled on + the attached VMSS.""" + instance_counts_by_state: List["_models.PoolVirtualMachineStateCount"] = rest_field( + name="instanceCountsByState", visibility=["read", "create", "update", "delete", "query"] + ) + """The count of pooled virtual machines in each state for the given zone. Required.""" @overload def __init__( self, *, - instance_counts_by_state: List["_models.PoolResourceStateCount"], + instance_counts_by_state: List["_models.PoolVirtualMachineStateCount"], zone: Optional[int] = None, - ): ... + ) -> None: ... @overload - def __init__(self, mapping: Mapping[str, Any]): + def __init__(self, mapping: Mapping[str, Any]) -> None: """ :param mapping: raw JSON to initialize the model. :type mapping: Mapping[str, Any] """ - def __init__(self, *args: Any, **kwargs: Any) -> None: # pylint: disable=useless-super-delegation + def __init__(self, *args: Any, **kwargs: Any) -> None: super().__init__(*args, **kwargs) diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/models/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/__init__.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/__init__.py index 12acea673adc..71fe7806df8e 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/__init__.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/__init__.py @@ -5,16 +5,22 @@ # Code generated by Microsoft (R) Python Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +# pylint: disable=wrong-import-position -from ._operations import Operations -from ._operations import StandbyVirtualMachinePoolsOperations -from ._operations import StandbyVirtualMachinesOperations -from ._operations import StandbyVirtualMachinePoolRuntimeViewsOperations -from ._operations import StandbyContainerGroupPoolsOperations -from ._operations import StandbyContainerGroupPoolRuntimeViewsOperations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._operations import Operations # type: ignore +from ._operations import StandbyVirtualMachinePoolsOperations # type: ignore +from ._operations import StandbyVirtualMachinesOperations # type: ignore +from ._operations import StandbyVirtualMachinePoolRuntimeViewsOperations # type: ignore +from ._operations import StandbyContainerGroupPoolsOperations # type: ignore +from ._operations import StandbyContainerGroupPoolRuntimeViewsOperations # type: ignore from ._patch import __all__ as _patch_all -from ._patch import * # pylint: disable=unused-wildcard-import +from ._patch import * from ._patch import patch_sdk as _patch_sdk __all__ = [ @@ -25,5 +31,5 @@ "StandbyContainerGroupPoolsOperations", "StandbyContainerGroupPoolRuntimeViewsOperations", ] -__all__.extend([p for p in _patch_all if p not in __all__]) +__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore _patch_sdk() diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py index 3fb867658d96..79a86634ca3a 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=line-too-long,useless-suppression,too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,9 +9,10 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, Type, TypeVar, Union, cast, overload +from typing import Any, Callable, Dict, IO, Iterable, Iterator, List, Optional, TypeVar, Union, cast, overload import urllib.parse +from azure.core import PipelineClient from azure.core.exceptions import ( ClientAuthenticationError, HttpResponseError, @@ -32,14 +33,15 @@ from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models -from .._model_base import SdkJSONEncoder, _deserialize -from .._serialization import Serializer +from .._configuration import StandbyPoolMgmtClientConfiguration +from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize +from .._serialization import Deserializer, Serializer from .._validation import api_version_validation if sys.version_info >= (3, 9): from collections.abc import MutableMapping else: - from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports + from typing import MutableMapping # type: ignore T = TypeVar("T") ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object @@ -52,7 +54,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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -73,11 +75,11 @@ def build_standby_virtual_machine_pools_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -104,11 +106,11 @@ def build_standby_virtual_machine_pools_create_or_update_request( # pylint: dis _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -136,11 +138,11 @@ def build_standby_virtual_machine_pools_delete_request( # pylint: disable=name- _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -167,11 +169,11 @@ def build_standby_virtual_machine_pools_update_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -199,11 +201,11 @@ def build_standby_virtual_machine_pools_list_by_resource_group_request( # pylin _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -226,7 +228,7 @@ def build_standby_virtual_machine_pools_list_by_subscription_request( # pylint: _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -256,11 +258,11 @@ def build_standby_virtual_machines_get_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines/{standbyVirtualMachineName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -289,11 +291,11 @@ def build_standby_virtual_machines_list_by_standby_virtual_machine_pool_resource _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/standbyVirtualMachines" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -323,11 +325,11 @@ def build_standby_virtual_machine_pool_runtime_views_get_request( # pylint: dis _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews/{runtimeView}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -354,11 +356,11 @@ def build_standby_virtual_machine_pool_runtime_views_list_by_standby_pool_reques _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyVirtualMachinePools/{standbyVirtualMachinePoolName}/runtimeViews" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -384,11 +386,11 @@ def build_standby_container_group_pools_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -415,11 +417,11 @@ def build_standby_container_group_pools_create_or_update_request( # pylint: dis _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -447,11 +449,11 @@ def build_standby_container_group_pools_delete_request( # pylint: disable=name- _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -478,11 +480,11 @@ def build_standby_container_group_pools_update_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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -510,11 +512,11 @@ def build_standby_container_group_pools_list_by_resource_group_request( # pylin _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -537,7 +539,7 @@ def build_standby_container_group_pools_list_by_subscription_request( # pylint: _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -567,11 +569,11 @@ def build_standby_container_group_pool_runtime_views_get_request( # pylint: dis _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews/{runtimeView}" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -598,11 +600,11 @@ def build_standby_container_group_pool_runtime_views_list_by_standby_pool_reques _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-03-01")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-03-01")) accept = _headers.pop("Accept", "application/json") # Construct URL - _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews" # pylint: disable=line-too-long + _url = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StandbyPool/standbyContainerGroupPools/{standbyContainerGroupPoolName}/runtimeViews" path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"), "resourceGroupName": _SERIALIZER.url("resource_group_name", resource_group_name, "str"), @@ -634,16 +636,12 @@ class Operations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "accept"]}, - ) def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: """List the operations for the provider. @@ -656,7 +654,7 @@ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]: cls: ClsType[List[_models.Operation]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -703,7 +701,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.Operation], deserialized["value"]) + list_of_elem = _deserialize(List[_models.Operation], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -719,7 +717,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -739,24 +737,12 @@ class StandbyVirtualMachinePoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) def get( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> _models.StandbyVirtualMachinePoolResource: @@ -772,7 +758,7 @@ def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -812,7 +798,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -825,19 +811,6 @@ def get( return deserialized # type: ignore - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) def _create_or_update_initial( self, resource_group_name: str, @@ -845,7 +818,7 @@ def _create_or_update_initial( resource: Union[_models.StandbyVirtualMachinePoolResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -894,7 +867,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -996,19 +969,6 @@ def begin_create_or_update( """ @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) def begin_create_or_update( self, resource_group_name: str, @@ -1085,22 +1045,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) def _delete_initial( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1139,7 +1087,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1155,18 +1103,6 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) def begin_delete( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> LROPoller[None]: @@ -1310,19 +1246,6 @@ def update( """ @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "content_type", - "accept", - ] - }, - ) def update( self, resource_group_name: str, @@ -1346,7 +1269,7 @@ def update( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1396,7 +1319,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1410,10 +1333,6 @@ def update( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> Iterable["_models.StandbyVirtualMachinePoolResource"]: @@ -1432,7 +1351,7 @@ def list_by_resource_group( cls: ClsType[List[_models.StandbyVirtualMachinePoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1481,7 +1400,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1497,7 +1416,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1505,10 +1424,6 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "accept"]}, - ) def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.StandbyVirtualMachinePoolResource"]: """List StandbyVirtualMachinePoolResource resources by subscription ID. @@ -1522,7 +1437,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.StandbyVirtua cls: ClsType[List[_models.StandbyVirtualMachinePoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1570,7 +1485,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachinePoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1586,7 +1501,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1606,25 +1521,12 @@ class StandbyVirtualMachinesOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "standby_virtual_machine_name", - "accept", - ] - }, - ) def get( self, resource_group_name: str, @@ -1646,7 +1548,7 @@ def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachineResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1687,7 +1589,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1701,18 +1603,6 @@ def get( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_virtual_machine_pool_name", - "accept", - ] - }, - ) # pylint: disable=name-too-long def list_by_standby_virtual_machine_pool_resource( # pylint: disable=name-too-long self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> Iterable["_models.StandbyVirtualMachineResource"]: @@ -1733,7 +1623,7 @@ def list_by_standby_virtual_machine_pool_resource( # pylint: disable=name-too-l cls: ClsType[List[_models.StandbyVirtualMachineResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1783,7 +1673,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyVirtualMachineResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyVirtualMachineResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -1799,7 +1689,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -1819,12 +1709,25 @@ class StandbyVirtualMachinePoolRuntimeViewsOperations: # pylint: disable=name-t def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_virtual_machine_pool_name", + "runtime_view", + "accept", + ] + }, + ) def get( self, resource_group_name: str, standby_virtual_machine_pool_name: str, runtime_view: str, **kwargs: Any ) -> _models.StandbyVirtualMachinePoolRuntimeViewResource: @@ -1844,7 +1747,7 @@ def get( :rtype: ~azure.mgmt.standbypool.models.StandbyVirtualMachinePoolRuntimeViewResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1885,7 +1788,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -1899,6 +1802,18 @@ def get( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_virtual_machine_pool_name", + "accept", + ] + }, + ) def list_by_standby_pool( self, resource_group_name: str, standby_virtual_machine_pool_name: str, **kwargs: Any ) -> Iterable["_models.StandbyVirtualMachinePoolRuntimeViewResource"]: @@ -1920,7 +1835,7 @@ def list_by_standby_pool( cls: ClsType[List[_models.StandbyVirtualMachinePoolRuntimeViewResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1971,7 +1886,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.StandbyVirtualMachinePoolRuntimeViewResource], deserialized["value"] + List[_models.StandbyVirtualMachinePoolRuntimeViewResource], deserialized.get("value", []) ) if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -1988,7 +1903,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2008,24 +1923,12 @@ class StandbyContainerGroupPoolsOperations: def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) def get( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> _models.StandbyContainerGroupPoolResource: @@ -2041,7 +1944,7 @@ def get( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2081,7 +1984,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2094,19 +1997,6 @@ def get( return deserialized # type: ignore - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) def _create_or_update_initial( self, resource_group_name: str, @@ -2114,7 +2004,7 @@ def _create_or_update_initial( resource: Union[_models.StandbyContainerGroupPoolResource, JSON, IO[bytes]], **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2163,7 +2053,7 @@ def _create_or_update_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2265,19 +2155,6 @@ def begin_create_or_update( """ @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) def begin_create_or_update( self, resource_group_name: str, @@ -2354,22 +2231,10 @@ def get_long_running_output(pipeline_response): self._client, raw_result, get_long_running_output, polling_method # type: ignore ) - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) def _delete_initial( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> Iterator[bytes]: - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2408,7 +2273,7 @@ def _delete_initial( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -2424,18 +2289,6 @@ def _delete_initial( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "accept", - ] - }, - ) def begin_delete( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> LROPoller[None]: @@ -2579,19 +2432,6 @@ def update( """ @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={ - "2023-12-01-preview": [ - "api_version", - "subscription_id", - "resource_group_name", - "standby_container_group_pool_name", - "content_type", - "accept", - ] - }, - ) def update( self, resource_group_name: str, @@ -2615,7 +2455,7 @@ def update( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2665,7 +2505,7 @@ def update( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2679,10 +2519,6 @@ def update( return deserialized # type: ignore @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "resource_group_name", "accept"]}, - ) def list_by_resource_group( self, resource_group_name: str, **kwargs: Any ) -> Iterable["_models.StandbyContainerGroupPoolResource"]: @@ -2701,7 +2537,7 @@ def list_by_resource_group( cls: ClsType[List[_models.StandbyContainerGroupPoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2750,7 +2586,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2766,7 +2602,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2774,10 +2610,6 @@ def get_next(next_link=None): return ItemPaged(get_next, extract_data) @distributed_trace - @api_version_validation( - method_added_on="2023-12-01-preview", - params_added_on={"2023-12-01-preview": ["api_version", "subscription_id", "accept"]}, - ) def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.StandbyContainerGroupPoolResource"]: """List StandbyContainerGroupPoolResource resources by subscription ID. @@ -2791,7 +2623,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.StandbyContai cls: ClsType[List[_models.StandbyContainerGroupPoolResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2839,7 +2671,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() - list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized["value"]) + list_of_elem = _deserialize(List[_models.StandbyContainerGroupPoolResource], deserialized.get("value", [])) if cls: list_of_elem = cls(list_of_elem) # type: ignore return deserialized.get("nextLink") or None, iter(list_of_elem) @@ -2855,7 +2687,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -2875,12 +2707,25 @@ class StandbyContainerGroupPoolRuntimeViewsOperations: # pylint: disable=name-t def __init__(self, *args, **kwargs): input_args = list(args) - self._client = input_args.pop(0) if input_args else kwargs.pop("client") - self._config = input_args.pop(0) if input_args else kwargs.pop("config") - self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer") - self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer") + self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client") + self._config: StandbyPoolMgmtClientConfiguration = input_args.pop(0) if input_args else kwargs.pop("config") + self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer") + self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer") @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_container_group_pool_name", + "runtime_view", + "accept", + ] + }, + ) def get( self, resource_group_name: str, standby_container_group_pool_name: str, runtime_view: str, **kwargs: Any ) -> _models.StandbyContainerGroupPoolRuntimeViewResource: @@ -2900,7 +2745,7 @@ def get( :rtype: ~azure.mgmt.standbypool.models.StandbyContainerGroupPoolRuntimeViewResource :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -2941,7 +2786,7 @@ def get( except (StreamConsumedError, StreamClosedError): pass map_error(status_code=response.status_code, response=response, error_map=error_map) - error = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if _stream: @@ -2955,6 +2800,18 @@ def get( return deserialized # type: ignore @distributed_trace + @api_version_validation( + method_added_on="2024-03-01-preview", + params_added_on={ + "2024-03-01-preview": [ + "api_version", + "subscription_id", + "resource_group_name", + "standby_container_group_pool_name", + "accept", + ] + }, + ) def list_by_standby_pool( self, resource_group_name: str, standby_container_group_pool_name: str, **kwargs: Any ) -> Iterable["_models.StandbyContainerGroupPoolRuntimeViewResource"]: @@ -2976,7 +2833,7 @@ def list_by_standby_pool( cls: ClsType[List[_models.StandbyContainerGroupPoolRuntimeViewResource]] = kwargs.pop("cls", None) - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -3027,7 +2884,7 @@ def prepare_request(next_link=None): def extract_data(pipeline_response): deserialized = pipeline_response.http_response.json() list_of_elem = _deserialize( - List[_models.StandbyContainerGroupPoolRuntimeViewResource], deserialized["value"] + List[_models.StandbyContainerGroupPoolRuntimeViewResource], deserialized.get("value", []) ) if cls: list_of_elem = cls(list_of_elem) # type: ignore @@ -3044,7 +2901,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 = _deserialize(_models.ErrorResponse, response.json()) + error = _failsafe_deserialize(_models.ErrorResponse, response.json()) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py index f7dd32510333..8bcb627aa475 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py +++ b/sdk/standbypool/azure-mgmt-standbypool/azure/mgmt/standbypool/operations/_patch.py @@ -1,7 +1,8 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- """Customize generated code here. Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/operations_list.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/operations_list.py index e8b1e7bff918..f839954cf55b 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/operations_list.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/operations_list.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/Operations_List.json +# x-ms-original-file: 2025-03-01/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_get.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_get.py index e284d62f4506..40f52f7a7291 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_get.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_list_by_standby_pool.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_list_by_standby_pool.py index 1cb6bd6d947f..9fd207ba8f31 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_list_by_standby_pool.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pool_runtime_views_list_by_standby_pool.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_create_or_update.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_create_or_update.py index ac0b79d29e31..a690eb43a07c 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_create_or_update.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -48,6 +49,7 @@ def main(): ], }, "elasticityProfile": {"maxReadyCapacity": 688, "refillPolicy": "always"}, + "zones": ["1", "2", "3"], }, "tags": {}, }, @@ -55,6 +57,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_delete.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_delete.py index 12d85df1b96c..7824aefdcfa8 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_delete.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_Delete.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_get.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_get.py index eb1bbc623596..8d3092a652ab 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_get.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_Get.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_resource_group.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_resource_group.py index c729a6a2e089..5ba3f0f9b3e3 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_resource_group.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_subscription.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_subscription.py index b875bcdcc447..9da3cee45276 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_subscription.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_update.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_update.py index 37adaaef3a94..72d3cf49f042 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_update.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_container_group_pools_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -47,6 +48,7 @@ def main(): ], }, "elasticityProfile": {"maxReadyCapacity": 1743, "refillPolicy": "always"}, + "zones": ["1", "2", "3"], }, "tags": {}, }, @@ -54,6 +56,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json +# x-ms-original-file: 2025-03-01/StandbyContainerGroupPools_Update.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_get.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_get.py index 588cf79db1ea..5d589b5b18b4 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_get.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_list_by_standby_pool.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_list_by_standby_pool.py index b330f5f93ee4..8ed5a3d01d81 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_list_by_standby_pool.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pool_runtime_views_list_by_standby_pool.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_create_or_update.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_create_or_update.py index 9a0425b5cd9d..b188605c2ddd 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_create_or_update.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_create_or_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -46,6 +47,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_delete.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_delete.py index 8c97ad9fdce4..4a015df45a2c 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_delete.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_delete.py @@ -36,6 +36,6 @@ def main(): ).result() -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_Delete.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_get.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_get.py index ed33e9f42073..60a51171b542 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_get.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_get.py @@ -37,6 +37,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_Get.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_resource_group.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_resource_group.py index b64b3b8a1ac4..6bd661c23086 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_resource_group.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_resource_group.py @@ -37,6 +37,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_subscription.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_subscription.py index 5f481597af2c..065efd166993 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_subscription.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_list_by_subscription.py @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_ListBySubscription.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_update.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_update.py index 3402366f8507..010673df31ab 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_update.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machine_pools_update.py @@ -1,3 +1,4 @@ +# pylint: disable=line-too-long,useless-suppression # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -45,6 +46,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachinePools_Update.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_get.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_get.py index 616164e0c3c5..5543ba6df820 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_get.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_get.py @@ -38,6 +38,6 @@ def main(): print(response) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachines_Get.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_list_by_standby_virtual_machine_pool_resource.py b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_list_by_standby_virtual_machine_pool_resource.py index 6aad32a48ad3..8256d53b560d 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_list_by_standby_virtual_machine_pool_resource.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_samples/standby_virtual_machines_list_by_standby_virtual_machine_pool_resource.py @@ -38,6 +38,6 @@ def main(): print(item) -# x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json +# x-ms-original-file: 2025-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json if __name__ == "__main__": main() diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/conftest.py b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/conftest.py index 80945e8ce12b..4c351c014dbf 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/conftest.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/conftest.py @@ -18,7 +18,7 @@ load_dotenv() -# aovid record sensitive identity information in recordings +# For security, please avoid record sensitive identity information in recordings @pytest.fixture(scope="session", autouse=True) def add_sanitizers(test_proxy): standbypoolmgmt_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000") diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations.py b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations.py index b93e4cfda2f5..8d4d8873b3ad 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations.py @@ -46,6 +46,7 @@ def test_standby_container_group_pools_begin_create_or_update(self, resource_gro }, "elasticityProfile": {"maxReadyCapacity": 0, "refillPolicy": "str"}, "provisioningState": "str", + "zones": ["str"], }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -87,6 +88,7 @@ def test_standby_container_group_pools_update(self, resource_group): "subnetIds": [{"id": "str"}], }, "elasticityProfile": {"maxReadyCapacity": 0, "refillPolicy": "str"}, + "zones": ["str"], }, "tags": {"str": "str"}, }, diff --git a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations_async.py b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations_async.py index 2fac342bd87e..6623ea478f57 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations_async.py +++ b/sdk/standbypool/azure-mgmt-standbypool/generated_tests/test_standby_pool_mgmt_standby_container_group_pools_operations_async.py @@ -48,6 +48,7 @@ async def test_standby_container_group_pools_begin_create_or_update(self, resour }, "elasticityProfile": {"maxReadyCapacity": 0, "refillPolicy": "str"}, "provisioningState": "str", + "zones": ["str"], }, "systemData": { "createdAt": "2020-02-20 00:00:00", @@ -92,6 +93,7 @@ async def test_standby_container_group_pools_update(self, resource_group): "subnetIds": [{"id": "str"}], }, "elasticityProfile": {"maxReadyCapacity": 0, "refillPolicy": "str"}, + "zones": ["str"], }, "tags": {"str": "str"}, }, diff --git a/sdk/standbypool/azure-mgmt-standbypool/sdk_packaging.toml b/sdk/standbypool/azure-mgmt-standbypool/sdk_packaging.toml index fcdee76c613b..8bc9e445a342 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/sdk_packaging.toml +++ b/sdk/standbypool/azure-mgmt-standbypool/sdk_packaging.toml @@ -3,7 +3,7 @@ package_name = "azure-mgmt-standbypool" package_nspkg = "azure-mgmt-nspkg" package_pprint_name = "Standbypool Management" package_doc_id = "" -is_stable = false +is_stable = true is_arm = true need_msrestazure = false need_azuremgmtcore = true diff --git a/sdk/standbypool/azure-mgmt-standbypool/setup.py b/sdk/standbypool/azure-mgmt-standbypool/setup.py index 710f6c4b14ce..d97620b611d2 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/setup.py +++ b/sdk/standbypool/azure-mgmt-standbypool/setup.py @@ -49,7 +49,7 @@ 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", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", diff --git a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_async_test.py b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_async_test.py index a1daf5b0e706..39e3c18194b2 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_async_test.py +++ b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_async_test.py @@ -25,4 +25,3 @@ async def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r async for r in response] assert result - diff --git a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_test.py b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_test.py index 69788a00a400..98d944308665 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_test.py +++ b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_operations_test.py @@ -24,4 +24,3 @@ def test_operations_list(self, resource_group): response = self.client.operations.list() result = [r for r in response] assert result - diff --git a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_async_test.py b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_async_test.py index b2b3a1821d27..6e142f1bff2a 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_async_test.py +++ b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_async_test.py @@ -27,4 +27,3 @@ async def test_standby_virtual_machine_pools_list_by_resource_group(self, resour ) result = [r async for r in response] assert result == [] - \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_test.py b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_test.py index 85ea698d3c97..2bfec7afd334 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_test.py +++ b/sdk/standbypool/azure-mgmt-standbypool/tests/test_standby_pool_mgmt_standby_virtual_machine_pools_operations_test.py @@ -26,4 +26,3 @@ def test_standby_virtual_machine_pools_list_by_resource_group(self, resource_gro ) result = [r for r in response] assert result == [] - \ No newline at end of file diff --git a/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml b/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml index 555c0f7f3a08..936a49c51d54 100644 --- a/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml +++ b/sdk/standbypool/azure-mgmt-standbypool/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/standbypool/StandbyPool.Management -commit: e695076ad458a3eac3d6943f9e923544ff52b1e4 +commit: af51fab0cc00ba3eaee7e4710e8fec5894d4bb0c repo: Azure/azure-rest-api-specs additionalDirectories: