diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json index b2c662c901a2..0e16f7b462cf 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json +++ b/sdk/computeschedule/azure-mgmt-computeschedule/_meta.json @@ -1,6 +1,6 @@ { - "commit": "4883fa5dbf6f2c9093fac8ce334547e9dfac68fa", + "commit": "5c9c8e3bfdcf71f5dafa59571ac6890bb579426a", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "typespec_src": "specification/computeschedule/ComputeSchedule.Management", - "@azure-tools/typespec-python": "0.33.0" + "@azure-tools/typespec-python": "0.37.0" } \ No newline at end of file diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py index 8cec50265ad7..085e611df3da 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/__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 ComputeScheduleMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ComputeScheduleMgmtClient # 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__ = [ "ComputeScheduleMgmtClient", ] -__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/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py index a050f7c069da..3847c339c628 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_client.py @@ -20,11 +20,10 @@ from .operations import Operations, ScheduledActionsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials import TokenCredential -class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeScheduleMgmtClient: """Microsoft.ComputeSchedule Resource Provider management API. :ivar operations: Operations operations @@ -37,9 +36,8 @@ class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-k :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-08-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-10-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py index 271cb819f5a3..bc325d903761 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_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 ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeScheduleMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -30,9 +29,8 @@ class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-08-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-10-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-08-15-preview") + api_version: str = kwargs.pop("api_version", "2024-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py index 12ad7f29c71e..7f73b97b23ef 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_model_base.py @@ -1,10 +1,11 @@ +# 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. # -------------------------------------------------------------------------- -# pylint: disable=protected-access, arguments-differ, signature-differs, broad-except, too-many-lines +# pylint: disable=protected-access, broad-except import copy import calendar @@ -573,7 +574,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 +585,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 +601,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 +613,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 +633,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 +734,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 +754,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 +894,22 @@ 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 + + class _RestField: def __init__( self, diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py index 01a226bd7f14..b24ab2885450 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/_serialization.py @@ -227,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore :param datetime.timedelta offset: offset in timedelta format """ - def __init__(self, offset): + def __init__(self, offset) -> None: self.__offset = offset def utcoffset(self, dt): @@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None): return ET.Element(tag) -class Model(object): +class Model: """Mixin for all client request body/response body models to support serialization and deserialization. """ @@ -507,7 +507,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 +518,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 +563,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 +598,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, @@ -1442,7 +1441,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 +1452,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, @@ -1684,17 +1683,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 diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py index 94312ca9b1aa..3286b1d3ec23 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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 ComputeScheduleMgmtClient +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + +from ._client import ComputeScheduleMgmtClient # 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__ = [ "ComputeScheduleMgmtClient", ] -__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/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py index 4594ec5d1690..e26f96eccb14 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_client.py @@ -20,11 +20,10 @@ from .operations import Operations, ScheduledActionsOperations if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-keyword +class ComputeScheduleMgmtClient: """Microsoft.ComputeSchedule Resource Provider management API. :ivar operations: Operations operations @@ -38,9 +37,8 @@ class ComputeScheduleMgmtClient: # pylint: disable=client-accepts-api-version-k :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-08-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-10-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py index c661c7bcc36f..8518e2689031 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/_configuration.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/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 ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long +class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instance-attributes """Configuration for ComputeScheduleMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -30,9 +29,8 @@ class ComputeScheduleMgmtClientConfiguration: # pylint: disable=too-many-instan :type subscription_id: str :param base_url: Service host. Default value is "https://management.azure.com". :type base_url: str - :keyword api_version: The API version to use for this operation. Default value is - "2024-08-15-preview". Note that overriding this default value may result in unsupported - behavior. + :keyword api_version: The API version to use for this operation. Default value is "2024-10-01". + Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -43,7 +41,7 @@ def __init__( base_url: str = "https://management.azure.com", **kwargs: Any ) -> None: - api_version: str = kwargs.pop("api_version", "2024-08-15-preview") + api_version: str = kwargs.pop("api_version", "2024-10-01") if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py index 39cb4fb555d4..1b073f3da1b0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/__init__.py @@ -5,17 +5,23 @@ # 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 ScheduledActionsOperations +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 ScheduledActionsOperations # 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__ = [ "Operations", "ScheduledActionsOperations", ] -__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/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py index 11ed53ea0da1..7408944cf3a3 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/aio/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, Type, TypeVar, Union, overload +from typing import Any, AsyncIterable, Callable, Dict, IO, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -31,7 +31,7 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models -from ..._model_base import SdkJSONEncoder, _deserialize +from ..._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from ...operations._operations import ( build_operations_list_request, build_scheduled_actions_virtual_machines_cancel_operations_request, @@ -48,7 +48,7 @@ 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 @@ -84,7 +84,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, @@ -147,7 +147,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 @@ -181,7 +181,8 @@ async def virtual_machines_submit_deallocate( content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -200,7 +201,8 @@ async def virtual_machines_submit_deallocate( async def virtual_machines_submit_deallocate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -219,7 +221,8 @@ async def virtual_machines_submit_deallocate( async def virtual_machines_submit_deallocate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -241,7 +244,8 @@ async def virtual_machines_submit_deallocate( request_body: Union[_models.SubmitDeallocateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -254,7 +258,7 @@ async def virtual_machines_submit_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -303,7 +307,7 @@ async def virtual_machines_submit_deallocate( 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: @@ -325,7 +329,8 @@ async def virtual_machines_submit_hibernate( content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -344,7 +349,8 @@ async def virtual_machines_submit_hibernate( async def virtual_machines_submit_hibernate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -363,7 +369,8 @@ async def virtual_machines_submit_hibernate( async def virtual_machines_submit_hibernate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -385,7 +392,8 @@ async def virtual_machines_submit_hibernate( request_body: Union[_models.SubmitHibernateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -398,7 +406,7 @@ async def virtual_machines_submit_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -447,7 +455,7 @@ async def virtual_machines_submit_hibernate( 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: @@ -469,7 +477,8 @@ async def virtual_machines_submit_start( content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -488,7 +497,8 @@ async def virtual_machines_submit_start( async def virtual_machines_submit_start( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -507,7 +517,8 @@ async def virtual_machines_submit_start( async def virtual_machines_submit_start( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -526,7 +537,8 @@ async def virtual_machines_submit_start( async def virtual_machines_submit_start( self, locationparameter: str, request_body: Union[_models.SubmitStartRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -538,7 +550,7 @@ async def virtual_machines_submit_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -587,7 +599,7 @@ async def virtual_machines_submit_start( 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: @@ -609,7 +621,8 @@ async def virtual_machines_execute_deallocate( content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -628,7 +641,8 @@ async def virtual_machines_execute_deallocate( async def virtual_machines_execute_deallocate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -647,7 +661,8 @@ async def virtual_machines_execute_deallocate( async def virtual_machines_execute_deallocate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -669,7 +684,8 @@ async def virtual_machines_execute_deallocate( request_body: Union[_models.ExecuteDeallocateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -682,7 +698,7 @@ async def virtual_machines_execute_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -731,7 +747,7 @@ async def virtual_machines_execute_deallocate( 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: @@ -753,7 +769,8 @@ async def virtual_machines_execute_hibernate( content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -772,7 +789,8 @@ async def virtual_machines_execute_hibernate( async def virtual_machines_execute_hibernate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -791,7 +809,8 @@ async def virtual_machines_execute_hibernate( async def virtual_machines_execute_hibernate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -813,7 +832,8 @@ async def virtual_machines_execute_hibernate( request_body: Union[_models.ExecuteHibernateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -826,7 +846,7 @@ async def virtual_machines_execute_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -875,7 +895,7 @@ async def virtual_machines_execute_hibernate( 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: @@ -897,7 +917,8 @@ async def virtual_machines_execute_start( content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -916,7 +937,8 @@ async def virtual_machines_execute_start( async def virtual_machines_execute_start( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -935,7 +957,8 @@ async def virtual_machines_execute_start( async def virtual_machines_execute_start( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -954,7 +977,8 @@ async def virtual_machines_execute_start( async def virtual_machines_execute_start( self, locationparameter: str, request_body: Union[_models.ExecuteStartRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -966,7 +990,7 @@ async def virtual_machines_execute_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1015,7 +1039,7 @@ async def virtual_machines_execute_start( 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: @@ -1037,7 +1061,8 @@ async def virtual_machines_get_operation_status( content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1056,7 +1081,8 @@ async def virtual_machines_get_operation_status( async def virtual_machines_get_operation_status( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1075,7 +1101,8 @@ async def virtual_machines_get_operation_status( async def virtual_machines_get_operation_status( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1097,7 +1124,8 @@ async def virtual_machines_get_operation_status( request_body: Union[_models.GetOperationStatusRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1110,7 +1138,7 @@ async def virtual_machines_get_operation_status( :rtype: ~azure.mgmt.computeschedule.models.GetOperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1159,7 +1187,7 @@ async def virtual_machines_get_operation_status( 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: @@ -1181,7 +1209,8 @@ async def virtual_machines_cancel_operations( content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1200,7 +1229,8 @@ async def virtual_machines_cancel_operations( async def virtual_machines_cancel_operations( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1219,7 +1249,8 @@ async def virtual_machines_cancel_operations( async def virtual_machines_cancel_operations( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1241,7 +1272,8 @@ async def virtual_machines_cancel_operations( request_body: Union[_models.CancelOperationsRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1254,7 +1286,7 @@ async def virtual_machines_cancel_operations( :rtype: ~azure.mgmt.computeschedule.models.CancelOperationsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1303,7 +1335,7 @@ async def virtual_machines_cancel_operations( 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: @@ -1325,8 +1357,8 @@ async def virtual_machines_get_operation_errors( content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1345,8 +1377,8 @@ async def virtual_machines_get_operation_errors( async def virtual_machines_get_operation_errors( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1365,8 +1397,8 @@ async def virtual_machines_get_operation_errors( async def virtual_machines_get_operation_errors( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1388,8 +1420,8 @@ async def virtual_machines_get_operation_errors( request_body: Union[_models.GetOperationErrorsRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1402,7 +1434,7 @@ async def virtual_machines_get_operation_errors( :rtype: ~azure.mgmt.computeschedule.models.GetOperationErrorsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1451,7 +1483,7 @@ async def virtual_machines_get_operation_errors( 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: diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py index 6858308956a7..9db04f67ddae 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/__init__.py @@ -5,45 +5,56 @@ # 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 CancelOperationsRequest -from ._models import CancelOperationsResponse -from ._models import DeallocateResourceOperationResponse -from ._models import ErrorAdditionalInfo -from ._models import ErrorDetail -from ._models import ErrorResponse -from ._models import ExecuteDeallocateRequest -from ._models import ExecuteHibernateRequest -from ._models import ExecuteStartRequest -from ._models import ExecutionParameters -from ._models import GetOperationErrorsRequest -from ._models import GetOperationErrorsResponse -from ._models import GetOperationStatusRequest -from ._models import GetOperationStatusResponse -from ._models import HibernateResourceOperationResponse -from ._models import Operation -from ._models import OperationDisplay -from ._models import OperationErrorDetails -from ._models import OperationErrorsResult -from ._models import ResourceOperation -from ._models import ResourceOperationDetails -from ._models import ResourceOperationError -from ._models import Resources -from ._models import RetryPolicy -from ._models import Schedule -from ._models import StartResourceOperationResponse -from ._models import SubmitDeallocateRequest -from ._models import SubmitHibernateRequest -from ._models import SubmitStartRequest +from typing import TYPE_CHECKING -from ._enums import ActionType -from ._enums import DeadlineType -from ._enums import OperationState -from ._enums import OptimizationPreference -from ._enums import Origin -from ._enums import ResourceOperationType +if TYPE_CHECKING: + from ._patch import * # pylint: disable=unused-wildcard-import + + +from ._models import ( # type: ignore + CancelOperationsRequest, + CancelOperationsResponse, + DeallocateResourceOperationResponse, + ErrorAdditionalInfo, + ErrorDetail, + ErrorResponse, + ExecuteDeallocateRequest, + ExecuteHibernateRequest, + ExecuteStartRequest, + ExecutionParameters, + GetOperationErrorsRequest, + GetOperationErrorsResponse, + GetOperationStatusRequest, + GetOperationStatusResponse, + HibernateResourceOperationResponse, + Operation, + OperationDisplay, + OperationErrorDetails, + OperationErrorsResult, + ResourceOperation, + ResourceOperationDetails, + ResourceOperationError, + Resources, + RetryPolicy, + Schedule, + StartResourceOperationResponse, + SubmitDeallocateRequest, + SubmitHibernateRequest, + SubmitStartRequest, +) + +from ._enums import ( # type: ignore + ActionType, + DeadlineType, + OperationState, + OptimizationPreference, + Origin, + ResourceOperationType, +) 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__ = [ @@ -83,5 +94,5 @@ "Origin", "ResourceOperationType", ] -__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/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py index 76678d1217e0..9334d3fda700 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_enums.py @@ -48,7 +48,7 @@ class OperationState(str, Enum, metaclass=CaseInsensitiveEnumMeta): FAILED = "Failed" """Operations that have failed""" CANCELLED = "Cancelled" - """Operations that have been cancelled by the user""" + """Operations that have been Cancelled by the user""" BLOCKED = "Blocked" """Operations that are blocked""" diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py index cbc2b702c556..fecc351b9c30 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/models/_models.py @@ -1,11 +1,12 @@ -# coding=utf-8 # 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. # 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, 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 @@ -25,14 +25,14 @@ class CancelOperationsRequest(_model_base.Model): :ivar operation_ids: The list of operation ids to cancel operations on. Required. :vartype operation_ids: list[str] - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ operation_ids: List[str] = rest_field(name="operationIds") """The list of operation ids to cancel operations on. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -40,16 +40,16 @@ def __init__( *, operation_ids: List[str], correlationid: 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) @@ -69,16 +69,16 @@ def __init__( self, *, results: List["_models.ResourceOperation"], - ): ... + ) -> 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) @@ -113,16 +113,16 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = 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) @@ -190,16 +190,16 @@ 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) @@ -212,7 +212,7 @@ class ExecuteDeallocateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -221,7 +221,7 @@ class ExecuteDeallocateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -230,16 +230,16 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) @@ -252,7 +252,7 @@ class ExecuteHibernateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -261,7 +261,7 @@ class ExecuteHibernateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -270,16 +270,16 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) @@ -292,7 +292,7 @@ class ExecuteStartRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -301,7 +301,7 @@ class ExecuteStartRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -310,16 +310,16 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) @@ -348,16 +348,16 @@ def __init__( *, optimization_preference: Optional[Union[str, "_models.OptimizationPreference"]] = None, retry_policy: Optional["_models.RetryPolicy"] = 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) @@ -378,16 +378,16 @@ def __init__( self, *, operation_ids: List[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) @@ -407,16 +407,16 @@ def __init__( self, *, results: List["_models.OperationErrorsResult"], - ): ... + ) -> 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) @@ -427,14 +427,14 @@ class GetOperationStatusRequest(_model_base.Model): :ivar operation_ids: The list of operation ids to get the status of. Required. :vartype operation_ids: list[str] - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ operation_ids: List[str] = rest_field(name="operationIds") """The list of operation ids to get the status of. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -442,16 +442,16 @@ def __init__( *, operation_ids: List[str], correlationid: 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) @@ -471,16 +471,16 @@ def __init__( self, *, results: List["_models.ResourceOperation"], - ): ... + ) -> 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) @@ -515,16 +515,16 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = 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) @@ -572,16 +572,16 @@ def __init__( self, *, action_type: Optional[Union[str, "_models.ActionType"]] = 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) @@ -625,40 +625,50 @@ class OperationErrorDetails(_model_base.Model): :ivar error_code: The error code of the operation. Required. :vartype error_code: str :ivar error_details: The error details of the operation. Required. - :vartype error_details: ~datetime.datetime - :ivar time_stamp: The timestamp of the error occurence. Required. + :vartype error_details: str + :ivar timestamp: The timestamp of the error occurence. + :vartype timestamp: ~datetime.datetime + :ivar time_stamp: The timestamp of the error occurence. :vartype time_stamp: ~datetime.datetime - :ivar crp_operation_id: CRP operationid of the operation for deeper analysis. Required. + :ivar azure_operation_name: The compute operationid of the Start/Deallocate/Hibernate request. + :vartype azure_operation_name: str + :ivar crp_operation_id: The compute operationid of the Start/Deallocate/Hibernate request. :vartype crp_operation_id: str """ error_code: str = rest_field(name="errorCode") """The error code of the operation. Required.""" - error_details: datetime.datetime = rest_field(name="errorDetails", format="rfc3339") + error_details: str = rest_field(name="errorDetails") """The error details of the operation. Required.""" - time_stamp: datetime.datetime = rest_field(name="timeStamp", format="rfc3339") - """The timestamp of the error occurence. Required.""" - crp_operation_id: str = rest_field(name="crpOperationId") - """CRP operationid of the operation for deeper analysis. Required.""" + timestamp: Optional[datetime.datetime] = rest_field(format="rfc3339") + """The timestamp of the error occurence.""" + time_stamp: Optional[datetime.datetime] = rest_field(name="timeStamp", format="rfc3339") + """The timestamp of the error occurence.""" + azure_operation_name: Optional[str] = rest_field(name="azureOperationName") + """The compute operationid of the Start/Deallocate/Hibernate request.""" + crp_operation_id: Optional[str] = rest_field(name="crpOperationId") + """The compute operationid of the Start/Deallocate/Hibernate request.""" @overload def __init__( self, *, error_code: str, - error_details: datetime.datetime, - time_stamp: datetime.datetime, - crp_operation_id: str, - ): ... + error_details: str, + timestamp: Optional[datetime.datetime] = None, + time_stamp: Optional[datetime.datetime] = None, + azure_operation_name: Optional[str] = None, + crp_operation_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) @@ -708,16 +718,16 @@ def __init__( operation_errors: Optional[List["_models.OperationErrorDetails"]] = None, request_error_code: Optional[str] = None, request_error_details: 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) @@ -751,42 +761,43 @@ def __init__( error_code: Optional[str] = None, error_details: Optional[str] = None, operation: Optional["_models.ResourceOperationDetails"] = 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 ResourceOperationDetails(_model_base.Model): # pylint: disable=too-many-instance-attributes +class ResourceOperationDetails(_model_base.Model): """The details of a response from an operation on a resource. :ivar operation_id: Operation identifier for the unique operation. Required. :vartype operation_id: str :ivar resource_id: Unique identifier for the resource involved in the operation, eg ArmId. - Required. :vartype resource_id: str - :ivar op_type: Type of operation performed on the resources. Required. Known values are: - "Unknown", "Start", "Deallocate", and "Hibernate". + :ivar op_type: Type of operation performed on the resources. Known values are: "Unknown", + "Start", "Deallocate", and "Hibernate". :vartype op_type: str or ~azure.mgmt.computeschedule.models.ResourceOperationType - :ivar subscription_id: Subscription id attached to the request. Required. + :ivar subscription_id: Subscription id attached to the request. :vartype subscription_id: str - :ivar deadline: Deadline for the operation. Required. + :ivar deadline: Deadline for the operation. :vartype deadline: ~datetime.datetime - :ivar deadline_type: Type of deadline of the operation. Required. Known values are: "Unknown", + :ivar deadline_type: Type of deadline of the operation. Known values are: "Unknown", "InitiateAt", and "CompleteBy". :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType - :ivar state: Current state of the operation. Required. Known values are: "Unknown", - "PendingScheduling", "Scheduled", "PendingExecution", "Executing", "Succeeded", "Failed", - "Cancelled", and "Blocked". + :ivar state: Current state of the operation. Known values are: "Unknown", "PendingScheduling", + "Scheduled", "PendingExecution", "Executing", "Succeeded", "Failed", "Cancelled", and + "Blocked". :vartype state: str or ~azure.mgmt.computeschedule.models.OperationState + :ivar timezone: Timezone for the operation. + :vartype timezone: str :ivar time_zone: Timezone for the operation. :vartype time_zone: str :ivar resource_operation_error: Operation level errors if they exist. @@ -799,22 +810,24 @@ class ResourceOperationDetails(_model_base.Model): # pylint: disable=too-many-i operation_id: str = rest_field(name="operationId") """Operation identifier for the unique operation. Required.""" - resource_id: str = rest_field(name="resourceId") - """Unique identifier for the resource involved in the operation, eg ArmId. Required.""" - op_type: Union[str, "_models.ResourceOperationType"] = rest_field(name="opType") - """Type of operation performed on the resources. Required. Known values are: \"Unknown\", - \"Start\", \"Deallocate\", and \"Hibernate\".""" - subscription_id: str = rest_field(name="subscriptionId") - """Subscription id attached to the request. Required.""" - deadline: datetime.datetime = rest_field(format="rfc3339") - """Deadline for the operation. Required.""" - deadline_type: Union[str, "_models.DeadlineType"] = rest_field(name="deadlineType") - """Type of deadline of the operation. Required. Known values are: \"Unknown\", \"InitiateAt\", and + resource_id: Optional[str] = rest_field(name="resourceId") + """Unique identifier for the resource involved in the operation, eg ArmId.""" + op_type: Optional[Union[str, "_models.ResourceOperationType"]] = rest_field(name="opType") + """Type of operation performed on the resources. Known values are: \"Unknown\", \"Start\", + \"Deallocate\", and \"Hibernate\".""" + subscription_id: Optional[str] = rest_field(name="subscriptionId") + """Subscription id attached to the request.""" + deadline: Optional[datetime.datetime] = rest_field(format="rfc3339") + """Deadline for the operation.""" + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = rest_field(name="deadlineType") + """Type of deadline of the operation. Known values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" - state: Union[str, "_models.OperationState"] = rest_field() - """Current state of the operation. Required. Known values are: \"Unknown\", \"PendingScheduling\", + state: Optional[Union[str, "_models.OperationState"]] = rest_field() + """Current state of the operation. Known values are: \"Unknown\", \"PendingScheduling\", \"Scheduled\", \"PendingExecution\", \"Executing\", \"Succeeded\", \"Failed\", \"Cancelled\", and \"Blocked\".""" + timezone: Optional[str] = rest_field() + """Timezone for the operation.""" time_zone: Optional[str] = rest_field(name="timeZone") """Timezone for the operation.""" resource_operation_error: Optional["_models.ResourceOperationError"] = rest_field(name="resourceOperationError") @@ -829,26 +842,27 @@ def __init__( self, *, operation_id: str, - resource_id: str, - op_type: Union[str, "_models.ResourceOperationType"], - subscription_id: str, - deadline: datetime.datetime, - deadline_type: Union[str, "_models.DeadlineType"], - state: Union[str, "_models.OperationState"], + resource_id: Optional[str] = None, + op_type: Optional[Union[str, "_models.ResourceOperationType"]] = None, + subscription_id: Optional[str] = None, + deadline: Optional[datetime.datetime] = None, + deadline_type: Optional[Union[str, "_models.DeadlineType"]] = None, + state: Optional[Union[str, "_models.OperationState"]] = None, + timezone: Optional[str] = None, time_zone: Optional[str] = None, resource_operation_error: Optional["_models.ResourceOperationError"] = None, completed_at: Optional[datetime.datetime] = None, retry_policy: Optional["_models.RetryPolicy"] = 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) @@ -873,16 +887,16 @@ def __init__( *, error_code: str, error_details: 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) @@ -903,16 +917,16 @@ def __init__( self, *, ids: List[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) @@ -936,16 +950,16 @@ def __init__( *, retry_count: Optional[int] = None, retry_window_in_minutes: 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) @@ -954,19 +968,27 @@ class Schedule(_model_base.Model): All required parameters must be populated in order to send to server. - :ivar dead_line: The deadline for the operation. Required. + :ivar deadline: The deadline for the operation. + :vartype deadline: ~datetime.datetime + :ivar dead_line: The deadline for the operation. :vartype dead_line: ~datetime.datetime - :ivar time_zone: The timezone for the operation. Required. + :ivar timezone: The timezone for the operation. + :vartype timezone: str + :ivar time_zone: The timezone for the operation. :vartype time_zone: str :ivar deadline_type: The deadlinetype of the operation, this can either be InitiateAt or CompleteBy. Required. Known values are: "Unknown", "InitiateAt", and "CompleteBy". :vartype deadline_type: str or ~azure.mgmt.computeschedule.models.DeadlineType """ - dead_line: datetime.datetime = rest_field(name="deadLine", format="rfc3339") - """The deadline for the operation. Required.""" - time_zone: str = rest_field(name="timeZone") - """The timezone for the operation. Required.""" + deadline: Optional[datetime.datetime] = rest_field(format="rfc3339") + """The deadline for the operation.""" + dead_line: Optional[datetime.datetime] = rest_field(name="deadLine", format="rfc3339") + """The deadline for the operation.""" + timezone: Optional[str] = rest_field() + """The timezone for the operation.""" + time_zone: Optional[str] = rest_field(name="timeZone") + """The timezone for the operation.""" deadline_type: Union[str, "_models.DeadlineType"] = rest_field(name="deadlineType") """The deadlinetype of the operation, this can either be InitiateAt or CompleteBy. Required. Known values are: \"Unknown\", \"InitiateAt\", and \"CompleteBy\".""" @@ -975,19 +997,21 @@ class Schedule(_model_base.Model): def __init__( self, *, - dead_line: datetime.datetime, - time_zone: str, deadline_type: Union[str, "_models.DeadlineType"], - ): ... + deadline: Optional[datetime.datetime] = None, + dead_line: Optional[datetime.datetime] = None, + timezone: Optional[str] = None, + time_zone: 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) @@ -1022,16 +1046,16 @@ def __init__( type: str, location: str, results: Optional[List["_models.ResourceOperation"]] = 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) @@ -1046,7 +1070,7 @@ class SubmitDeallocateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1057,7 +1081,7 @@ class SubmitDeallocateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1067,16 +1091,16 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) @@ -1091,7 +1115,7 @@ class SubmitHibernateRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1102,7 +1126,7 @@ class SubmitHibernateRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1112,16 +1136,16 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) @@ -1136,7 +1160,7 @@ class SubmitStartRequest(_model_base.Model): :vartype execution_parameters: ~azure.mgmt.computeschedule.models.ExecutionParameters :ivar resources: The resources for the request. Required. :vartype resources: ~azure.mgmt.computeschedule.models.Resources - :ivar correlationid: Correlationid item. Required. + :ivar correlationid: CorrelationId item. Required. :vartype correlationid: str """ @@ -1147,7 +1171,7 @@ class SubmitStartRequest(_model_base.Model): resources: "_models.Resources" = rest_field() """The resources for the request. Required.""" correlationid: str = rest_field() - """Correlationid item. Required.""" + """CorrelationId item. Required.""" @overload def __init__( @@ -1157,14 +1181,14 @@ def __init__( execution_parameters: "_models.ExecutionParameters", resources: "_models.Resources", correlationid: 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) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py index 39cb4fb555d4..1b073f3da1b0 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/__init__.py @@ -5,17 +5,23 @@ # 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 ScheduledActionsOperations +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 ScheduledActionsOperations # 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__ = [ "Operations", "ScheduledActionsOperations", ] -__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/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py index bd6da5b14722..a22209e54381 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/azure/mgmt/computeschedule/operations/_operations.py @@ -1,4 +1,4 @@ -# pylint: disable=too-many-lines,too-many-statements +# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -9,7 +9,7 @@ from io import IOBase import json import sys -from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Type, TypeVar, Union, overload +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, TypeVar, Union, overload import urllib.parse from azure.core.exceptions import ( @@ -30,13 +30,13 @@ from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models -from .._model_base import SdkJSONEncoder, _deserialize +from .._model_base import SdkJSONEncoder, _deserialize, _failsafe_deserialize from .._serialization import Serializer 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 @@ -49,7 +49,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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -71,7 +71,7 @@ def build_scheduled_actions_virtual_machines_submit_deallocate_request( # pylin _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -101,7 +101,7 @@ def build_scheduled_actions_virtual_machines_submit_hibernate_request( # pylint _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -131,7 +131,7 @@ def build_scheduled_actions_virtual_machines_submit_start_request( # pylint: di _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -161,7 +161,7 @@ def build_scheduled_actions_virtual_machines_execute_deallocate_request( # pyli _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -191,7 +191,7 @@ def build_scheduled_actions_virtual_machines_execute_hibernate_request( # pylin _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -221,7 +221,7 @@ def build_scheduled_actions_virtual_machines_execute_start_request( # pylint: d _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -251,7 +251,7 @@ def build_scheduled_actions_virtual_machines_get_operation_status_request( # py _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -281,7 +281,7 @@ def build_scheduled_actions_virtual_machines_cancel_operations_request( # pylin _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -311,7 +311,7 @@ def build_scheduled_actions_virtual_machines_get_operation_errors_request( # py _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-08-15-preview")) + api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-10-01")) accept = _headers.pop("Accept", "application/json") # Construct URL @@ -364,7 +364,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, @@ -427,7 +427,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 @@ -461,7 +461,8 @@ def virtual_machines_submit_deallocate( content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -480,7 +481,8 @@ def virtual_machines_submit_deallocate( def virtual_machines_submit_deallocate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -499,7 +501,8 @@ def virtual_machines_submit_deallocate( def virtual_machines_submit_deallocate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -521,7 +524,8 @@ def virtual_machines_submit_deallocate( request_body: Union[_models.SubmitDeallocateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesSubmitDeallocate: submitDeallocate for a virtual machine. + """VirtualMachinesSubmitDeallocate: Schedule deallocate operation for a batch of virtual machines + at datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -534,7 +538,7 @@ def virtual_machines_submit_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -583,7 +587,7 @@ def virtual_machines_submit_deallocate( 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: @@ -605,7 +609,8 @@ def virtual_machines_submit_hibernate( content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -624,7 +629,8 @@ def virtual_machines_submit_hibernate( def virtual_machines_submit_hibernate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -643,7 +649,8 @@ def virtual_machines_submit_hibernate( def virtual_machines_submit_hibernate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -665,7 +672,8 @@ def virtual_machines_submit_hibernate( request_body: Union[_models.SubmitHibernateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesSubmitHibernate: submitHibernate for a virtual machine. + """VirtualMachinesSubmitHibernate: Schedule hibernate operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -678,7 +686,7 @@ def virtual_machines_submit_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -727,7 +735,7 @@ def virtual_machines_submit_hibernate( 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: @@ -749,7 +757,8 @@ def virtual_machines_submit_start( content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -768,7 +777,8 @@ def virtual_machines_submit_start( def virtual_machines_submit_start( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -787,7 +797,8 @@ def virtual_machines_submit_start( def virtual_machines_submit_start( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -806,7 +817,8 @@ def virtual_machines_submit_start( def virtual_machines_submit_start( self, locationparameter: str, request_body: Union[_models.SubmitStartRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesSubmitStart: submitStart for a virtual machine. + """VirtualMachinesSubmitStart: Schedule start operation for a batch of virtual machines at + datetime in future. :param locationparameter: The location name. Required. :type locationparameter: str @@ -818,7 +830,7 @@ def virtual_machines_submit_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -867,7 +879,7 @@ def virtual_machines_submit_start( 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: @@ -889,7 +901,8 @@ def virtual_machines_execute_deallocate( content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -908,7 +921,8 @@ def virtual_machines_execute_deallocate( def virtual_machines_execute_deallocate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -927,7 +941,8 @@ def virtual_machines_execute_deallocate( def virtual_machines_execute_deallocate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -949,7 +964,8 @@ def virtual_machines_execute_deallocate( request_body: Union[_models.ExecuteDeallocateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.DeallocateResourceOperationResponse: - """virtualMachinesExecuteDeallocate: executeDeallocate for a virtual machine. + """VirtualMachinesExecuteDeallocate: Execute deallocate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -962,7 +978,7 @@ def virtual_machines_execute_deallocate( :rtype: ~azure.mgmt.computeschedule.models.DeallocateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1011,7 +1027,7 @@ def virtual_machines_execute_deallocate( 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: @@ -1033,7 +1049,8 @@ def virtual_machines_execute_hibernate( content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1052,7 +1069,8 @@ def virtual_machines_execute_hibernate( def virtual_machines_execute_hibernate( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1071,7 +1089,8 @@ def virtual_machines_execute_hibernate( def virtual_machines_execute_hibernate( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1093,7 +1112,8 @@ def virtual_machines_execute_hibernate( request_body: Union[_models.ExecuteHibernateRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.HibernateResourceOperationResponse: - """virtualMachinesExecuteHibernate: executeHibernate for a virtual machine. + """VirtualMachinesExecuteHibernate: Execute hibernate operation for a batch of virtual machines, + this operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1106,7 +1126,7 @@ def virtual_machines_execute_hibernate( :rtype: ~azure.mgmt.computeschedule.models.HibernateResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1155,7 +1175,7 @@ def virtual_machines_execute_hibernate( 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: @@ -1177,7 +1197,8 @@ def virtual_machines_execute_start( content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1196,7 +1217,8 @@ def virtual_machines_execute_start( def virtual_machines_execute_start( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1215,7 +1237,8 @@ def virtual_machines_execute_start( def virtual_machines_execute_start( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1234,7 +1257,8 @@ def virtual_machines_execute_start( def virtual_machines_execute_start( self, locationparameter: str, request_body: Union[_models.ExecuteStartRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.StartResourceOperationResponse: - """virtualMachinesExecuteStart: executeStart for a virtual machine. + """VirtualMachinesExecuteStart: Execute start operation for a batch of virtual machines, this + operation is triggered as soon as Computeschedule receives it. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1246,7 +1270,7 @@ def virtual_machines_execute_start( :rtype: ~azure.mgmt.computeschedule.models.StartResourceOperationResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1295,7 +1319,7 @@ def virtual_machines_execute_start( 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: @@ -1317,7 +1341,8 @@ def virtual_machines_get_operation_status( content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1336,7 +1361,8 @@ def virtual_machines_get_operation_status( def virtual_machines_get_operation_status( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1355,7 +1381,8 @@ def virtual_machines_get_operation_status( def virtual_machines_get_operation_status( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1377,7 +1404,8 @@ def virtual_machines_get_operation_status( request_body: Union[_models.GetOperationStatusRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationStatusResponse: - """virtualMachinesGetOperationStatus: getOperationStatus for a virtual machine. + """VirtualMachinesGetOperationStatus: Polling endpoint to read status of operations performed on + virtual machines. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1390,7 +1418,7 @@ def virtual_machines_get_operation_status( :rtype: ~azure.mgmt.computeschedule.models.GetOperationStatusResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1439,7 +1467,7 @@ def virtual_machines_get_operation_status( 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: @@ -1461,7 +1489,8 @@ def virtual_machines_cancel_operations( content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1480,7 +1509,8 @@ def virtual_machines_cancel_operations( def virtual_machines_cancel_operations( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1499,7 +1529,8 @@ def virtual_machines_cancel_operations( def virtual_machines_cancel_operations( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1521,7 +1552,8 @@ def virtual_machines_cancel_operations( request_body: Union[_models.CancelOperationsRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.CancelOperationsResponse: - """virtualMachinesCancelOperations: cancelOperations for a virtual machine. + """VirtualMachinesCancelOperations: Cancel a previously submitted (start/deallocate/hibernate) + request. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1534,7 +1566,7 @@ def virtual_machines_cancel_operations( :rtype: ~azure.mgmt.computeschedule.models.CancelOperationsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1583,7 +1615,7 @@ def virtual_machines_cancel_operations( 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: @@ -1605,8 +1637,8 @@ def virtual_machines_get_operation_errors( content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1625,8 +1657,8 @@ def virtual_machines_get_operation_errors( def virtual_machines_get_operation_errors( self, locationparameter: str, request_body: JSON, *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1645,8 +1677,8 @@ def virtual_machines_get_operation_errors( def virtual_machines_get_operation_errors( self, locationparameter: str, request_body: IO[bytes], *, content_type: str = "application/json", **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1668,8 +1700,8 @@ def virtual_machines_get_operation_errors( request_body: Union[_models.GetOperationErrorsRequest, JSON, IO[bytes]], **kwargs: Any ) -> _models.GetOperationErrorsResponse: - """virtualMachinesGetOperationErrors: getOperationErrors associated with an operation on a virtual - machine. + """VirtualMachinesGetOperationErrors: Get error details on operation errors (like transient errors + encountered, additional logs) if they exist. :param locationparameter: The location name. Required. :type locationparameter: str @@ -1682,7 +1714,7 @@ def virtual_machines_get_operation_errors( :rtype: ~azure.mgmt.computeschedule.models.GetOperationErrorsResponse :raises ~azure.core.exceptions.HttpResponseError: """ - error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object + error_map: MutableMapping = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError, @@ -1731,7 +1763,7 @@ def virtual_machines_get_operation_errors( 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: diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list.py similarity index 91% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list.py index 5bf902740449..059c2519b258 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python operations_list_maximum_set_gen.py + python operations_list.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -35,6 +35,6 @@ def main(): print(item) -# x-ms-original-file: 2024-08-15-preview/Operations_List_MaximumSet_Gen.json +# x-ms-original-file: 2024-10-01/Operations_List.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py deleted file mode 100644 index 3a9c63bada5f..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/operations_list_minimum_set_gen.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python operations_list_minimum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operations.list() - for item in response: - print(item) - - -# x-ms-original-file: 2024-08-15-preview/Operations_List_MinimumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations.py similarity index 82% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations.py index af51ef04a684..d91d3e081019 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_cancel_operations_maximum_set_gen.py + python scheduled_actions_virtual_machines_cancel_operations.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_cancel_operations( - locationparameter="tdxypnse", + locationparameter="eastus2euap", request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", + "correlationid": "23480d2f-1dca-4610-afb4-gg25eec1f34r", "operationIds": ["23480d2f-1dca-4610-afb4-dd25eec1f34r"], }, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MaximumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesCancelOperations.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py deleted file mode 100644 index 8b0f08b67688..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_cancel_operations_minimum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_cancel_operations( - locationparameter="lwapkjsbltcqp", - request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", - "operationIds": ["23480d2f-1dca-4610-afb4-dd25eec1f34r"], - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesCancelOperations_MinimumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py similarity index 83% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py index d0fadf3043a0..ca2887c4c9d8 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_execute_deallocate_minimum_set_gen.py + python scheduled_actions_virtual_machines_execute_deallocate.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,13 +31,13 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_deallocate( - locationparameter="irbtacrhjgfpyvhvjo", + locationparameter="eastus2euap", request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eddf1f3c1", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 4, "retryWindowInMinutes": 27}}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource2" + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" ] }, }, @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesExecuteDeallocate.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py deleted file mode 100644 index ea548c282d7b..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_execute_deallocate_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_execute_deallocate( - locationparameter="mklyzgztbivwzo", - request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eddf1f3c1", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource2" - ] - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteDeallocate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py similarity index 81% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py index 13d0ac838fb0..b83004f355c8 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_execute_hibernate_minimum_set_gen.py + python scheduled_actions_virtual_machines_execute_hibernate.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,10 +31,10 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_hibernate( - locationparameter="kga", + locationparameter="eastus2euap", request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 5, "retryWindowInMinutes": 27}}, "resources": { "ids": [ "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesExecuteHibernate.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py deleted file mode 100644 index add056b85208..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_execute_hibernate_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_execute_hibernate( - locationparameter="sejdmamuhhvfpljomwumsplc", - request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" - ] - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteHibernate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py similarity index 80% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py index 37b87f4b99a8..ab3af28b87a9 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_execute_start_minimum_set_gen.py + python scheduled_actions_virtual_machines_execute_start.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,13 +31,13 @@ def main(): ) response = client.scheduled_actions.virtual_machines_execute_start( - locationparameter="qegbgjculewswqvnmaclcgpqqidl", + locationparameter="eastus2euap", request_body={ - "correlationid": "23230d2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 2, "retryWindowInMinutes": 27}}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" ] }, }, @@ -45,6 +45,6 @@ def main(): print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesExecuteStart.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py deleted file mode 100644 index 60adcbd68d21..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_execute_start_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_execute_start( - locationparameter="ysfrwcfmfsh", - request_body={ - "correlationid": "23230d2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" - ] - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesExecuteStart_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors.py similarity index 86% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors.py index e064c1eebcca..52b7eae34cdc 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_get_operation_errors_minimum_set_gen.py + python scheduled_actions_virtual_machines_get_operation_errors.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,12 +31,12 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_errors( - locationparameter="ggxoaxzxtdbi", - request_body={"operationIds": ["qeicik"]}, + locationparameter="eastus2euap", + request_body={"operationIds": ["23480d2f-1dca-4610-afb4-dd25eec1f34r"]}, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesGetOperationErrors.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py deleted file mode 100644 index b7b1b2abffdf..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_get_operation_errors_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_get_operation_errors( - locationparameter="hfsa", - request_body={"operationIds": ["DE84A209-5715-43E7-BC76-3E208A9A323"]}, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesGetOperationErrors_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status.py similarity index 82% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status.py index ee045200ec32..71cbcaaac628 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_get_operation_status_minimum_set_gen.py + python scheduled_actions_virtual_machines_get_operation_status.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,15 +31,15 @@ def main(): ) response = client.scheduled_actions.virtual_machines_get_operation_status( - locationparameter="csay", + locationparameter="eastus2euap", request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", - "operationIds": ["01080d2f-1dca-4610-afb4-dd25eec1f3df"], + "correlationid": "35780d2f-1dca-4610-afb4-dd25eec1f34r", + "operationIds": ["23480d2f-1dca-4610-afb4-dd25eec1f34r"], }, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesGetOperationStatus.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py deleted file mode 100644 index 7435565df0e6..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_get_operation_status_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_get_operation_status( - locationparameter="htxxasfxaesuecem", - request_body={ - "correlationid": "01080d2f-1dca-4610-afb4-dd25eec1f3c1", - "operationIds": ["01080d2f-1dca-4610-afb4-dd25eec1f3df"], - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesGetOperationStatus_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py similarity index 74% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py index 004c13b6420e..577024f94eec 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_submit_deallocate_minimum_set_gen.py + python scheduled_actions_virtual_machines_submit_deallocate.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,25 +31,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_deallocate( - locationparameter="qwfcdtmshnlownbkyh", + locationparameter="eastus2euap", request_body={ - "correlationid": "23519o2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 4, "retryWindowInMinutes": 27}}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource2" + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" ] }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, + "schedule": {"deadline": "2024-11-01T17:52:54.215Z", "deadlineType": "InitiateAt", "timezone": "UTC"}, }, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesSubmitDeallocate.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py deleted file mode 100644 index 0cf2448a1df6..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_submit_deallocate_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_submit_deallocate( - locationparameter="ibfxsvilwrgqttuslbduzdtxcckdet", - request_body={ - "correlationid": "23519o2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource2" - ] - }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitDeallocate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py similarity index 75% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py index c5ef79c44122..3df671ad7099 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_submit_hibernate_minimum_set_gen.py + python scheduled_actions_virtual_machines_submit_hibernate.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,25 +31,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_hibernate( - locationparameter="fvjciwudfbndlqumcgqs", + locationparameter="eastus2euap", request_body={ - "correlationid": "23519o2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 2, "retryWindowInMinutes": 27}}, "resources": { "ids": [ "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" ] }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, + "schedule": {"deadline": "2024-11-01T17:52:54.215Z", "deadlineType": "InitiateAt", "timezone": "UTC"}, }, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesSubmitHibernate.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py deleted file mode 100644 index e94dd963610e..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_submit_hibernate_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_submit_hibernate( - locationparameter="bgxeayimbxqzev", - request_body={ - "correlationid": "23519o2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" - ] - }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitHibernate_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py similarity index 77% rename from sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py rename to sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py index 2a4dfbd46bb7..46a5ffe7df18 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start.py @@ -15,7 +15,7 @@ pip install azure-identity pip install azure-mgmt-computeschedule # USAGE - python scheduled_actions_virtual_machines_submit_start_minimum_set_gen.py + python scheduled_actions_virtual_machines_submit_start.py Before run the sample, please set the values of the client ID, tenant ID and client secret of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, @@ -31,25 +31,21 @@ def main(): ) response = client.scheduled_actions.virtual_machines_submit_start( - locationparameter="httzei", + locationparameter="eastus2euap", request_body={ - "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": {}, + "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34r", + "executionParameters": {"retryPolicy": {"retryCount": 5, "retryWindowInMinutes": 27}}, "resources": { "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" + "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource3" ] }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, + "schedule": {"deadline": "2024-11-01T17:52:54.215Z", "deadlineType": "InitiateAt", "timezone": "UTC"}, }, ) print(response) -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MinimumSet_Gen.json +# x-ms-original-file: 2024-10-01/ScheduledActions_VirtualMachinesSubmitStart.json if __name__ == "__main__": main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py deleted file mode 100644 index 6d5254e6d4e3..000000000000 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_samples/scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) Python Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential - -from azure.mgmt.computeschedule import ComputeScheduleMgmtClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-computeschedule -# USAGE - python scheduled_actions_virtual_machines_submit_start_maximum_set_gen.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ComputeScheduleMgmtClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.scheduled_actions.virtual_machines_submit_start( - locationparameter="fxiidszhrokwjmewlahfqjiocnes", - request_body={ - "correlationid": "23480d2f-1dca-4610-afb4-dd25eec1f34", - "executionParameters": { - "optimizationPreference": "Cost", - "retryPolicy": {"retryCount": 30, "retryWindowInMinutes": 27}, - }, - "resources": { - "ids": [ - "/subscriptions/YourSubscriptionId/resourceGroups/YourResourceGroupName/providers/Microsoft.Compute/virtualMachines/testResource4" - ] - }, - "schedule": { - "deadLine": "2024-07-12T18:06:53.361Z", - "deadlineType": "Unknown", - "timeZone": "zlcujrtgxtgyik", - }, - }, - ) - print(response) - - -# x-ms-original-file: 2024-08-15-preview/ScheduledActions_VirtualMachinesSubmitStart_MaximumSet_Gen.json -if __name__ == "__main__": - main() diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py index 71a2939107f3..06ea32cbb288 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations.py @@ -30,7 +30,13 @@ def test_scheduled_actions_virtual_machines_submit_deallocate(self, resource_gro "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) @@ -49,7 +55,13 @@ def test_scheduled_actions_virtual_machines_submit_hibernate(self, resource_grou "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) @@ -68,7 +80,13 @@ def test_scheduled_actions_virtual_machines_submit_start(self, resource_group): "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py index 5cab7a1881c0..67c11fba2ac7 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/generated_tests/test_compute_schedule_mgmt_scheduled_actions_operations_async.py @@ -31,7 +31,13 @@ async def test_scheduled_actions_virtual_machines_submit_deallocate(self, resour "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) @@ -50,7 +56,13 @@ async def test_scheduled_actions_virtual_machines_submit_hibernate(self, resourc "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) @@ -69,7 +81,13 @@ async def test_scheduled_actions_virtual_machines_submit_start(self, resource_gr "retryPolicy": {"retryCount": 0, "retryWindowInMinutes": 0}, }, "resources": {"ids": ["str"]}, - "schedule": {"deadLine": "2020-02-20 00:00:00", "deadlineType": "str", "timeZone": "str"}, + "schedule": { + "deadlineType": "str", + "deadLine": "2020-02-20 00:00:00", + "deadline": "2020-02-20 00:00:00", + "timeZone": "str", + "timezone": "str", + }, }, ) diff --git a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py index cc7bbcb621ab..56159aa9035c 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_async_test.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_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/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py index 535047551112..b4f9009c66bc 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_mgmt_operations_test.py +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tests/test_compute_schedule_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/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml index 68e2a76acd98..3ad83f883734 100644 --- a/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml +++ b/sdk/computeschedule/azure-mgmt-computeschedule/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/computeschedule/ComputeSchedule.Management -commit: 4883fa5dbf6f2c9093fac8ce334547e9dfac68fa +commit: 5c9c8e3bfdcf71f5dafa59571ac6890bb579426a repo: Azure/azure-rest-api-specs additionalDirectories: